Install Alpine in QEMU: Difference between revisions
Prabuanand (talk | contribs) (changed heading levels and comment added to use Heading level3 instead of level2) |
m (Adding nowiki tags because the template broke.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
The following command starts QEMU with the Alpine ISO image as CDROM, the default network configuration, 512MB RAM, the disk image that was created in the previous step, and CDROM as the boot device. | The following command starts QEMU with the Alpine ISO image as CDROM, the default network configuration, 512MB RAM, the disk image that was created in the previous step, and CDROM as the boot device. | ||
{{Cmd|1=qemu-system-x86_64 -m 512 -nic user -boot d -cdrom alpine-standard-{{AlpineLatest}}-x86_64.iso - | {{Cmd|1=qemu-system-x86_64 -m 512 -nic user -boot once=d -cdrom alpine-standard-{{AlpineLatest}}-x86_64.iso -drive file=alpine.qcow2 -display gtk -enable-kvm}} | ||
{{Tip|Remove option <code>-enable-kvm</code> if your hardware does not support this.}} | {{Tip|Remove option <code>-enable-kvm</code> if your hardware does not support this.}} | ||
Line 29: | Line 29: | ||
After the installation, QEMU can be started from disk image (<code>-boot c</code>) without CDROM. | After the installation, QEMU can be started from disk image (<code>-boot c</code>) without CDROM. | ||
{{Cmd|qemu-system-x86_64 -m 512 -nic user - | {{Cmd|<nowiki>qemu-system-x86_64 -m 512 -nic user -drive file=alpine.qcow2</nowiki>}} | ||
[[Category:Virtualization]] | [[Category:Virtualization]] |
Latest revision as of 01:56, 4 September 2025
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)
If you are using Alpine Linux, you can install:
# apk add qemu qemu-img qemu-system-x86_64 qemu-ui-gtk
Create the Virtual Machine
Create a disk image if you want to install Alpine Linux.
qemu-img create -f qcow2 alpine.qcow2 8G
The following command starts QEMU with the Alpine ISO image as CDROM, the default network configuration, 512MB RAM, the disk image that was created in the previous step, and CDROM as the boot device.
qemu-system-x86_64 -m 512 -nic user -boot once=d -cdrom alpine-standard-3.22.1-x86_64.iso -drive file=alpine.qcow2 -display gtk -enable-kvm
-enable-kvm
if your hardware does not support this.
Log in as root
(no password) and run:
setup-alpine
Follow the setup-alpine installation steps.
Run poweroff
to shut down the machine.
Booting the Virtual Machine
After the installation, QEMU can be started from disk image (-boot c
) without CDROM.
qemu-system-x86_64 -m 512 -nic user -drive file=alpine.qcow2