Difference between revisions of "Install Alpine in Qemu"

From Alpine Linux
Jump to: navigation, search
(fix template parameter)
(Ubuntu install hints)
Line 1: Line 1:
 
==Before You Start==
 
==Before You Start==
  
* First [http://alpinelinux.org/downloads download the latest Alpine CD image].
+
* Download the [http://alpinelinux.org/downloads latest Alpine image].
* Install qemu on your system (e.g. <tt>yum -y install qemu</tt> on a Fedora based system)
+
* Install QEMU on your system (e.g. <code>sudo apt install qemu</code> on Ubuntu, <code>yum -y install qemu</code> on Fedora)
  
 
==Create the Virtual Machine==
 
==Create the Virtual Machine==

Revision as of 18:26, 14 September 2019

Before You Start

  • Download the latest Alpine image.
  • Install QEMU on your system (e.g. sudo apt install qemu on Ubuntu, yum -y install qemu on Fedora)

Create the Virtual Machine

Create a disk image if you want to install Alpine Linux.

qemu-img create alpine.qcow 8G

The following command starts qemu with the alpine iso image as cdrom and boot device, the default network configuration, 256 MB memory, and the disk image that was created in the previous step.

qemu -cdrom alpine-2.3.6-x86_64.iso -hda alpine.qcow -boot d -net nic -net user -m 256 -rtc base=localtime

Tip: Add option --enable-kvm if your hardware support this.

Log in as root (no password) and run:

setup-alpine

At the question on how to use the disk select sys.

Booting the Virtual Machine

After the installation qemu can be started from disk image (-boot c) without cdrom.

qemu alpine.qcow -boot c -net nic -net user -m 256 -localtime