Installation
QEMU is a hypervisor, that can emulate many number of architectures.Some of the architectures include:
- i386
- x86_64
- Alpha
- Arm
- MIPS
- MIPS64
- PPC
- PPC64
- Sparc
- Sparc64
In this article lets look at, how to install QEMU on FreeBSD 11. By default, QEMU on FreeBSD supports the following architectures.
- i386
- x86_64
Install Qemu using the following command.
pkg install qemu
Testing the installation
Create a virtual HDD file.
qemu-img create -f qcow2 image.img 10G
Download ISO file of a current version of linux distribution say Debian
fetch http://cdimage.debian.org/debian-cd/9.0.0/amd64/iso-cd/debian-9.0.0-amd64-netinst.iso
Start off the installation of Debian from the ISO we just downloaded.
qemu-x86_64 -m 1024 -cdrom debian-9.0.0-amd64-netinst.iso -hda image.img -boot d -net nic -net user -nographic -vnc :0
Connect to the Virtual machine we ran just now using the following entry on any VNC client.
<ip-address>:0
Once the Operating system is installed in the Virtual Machine, boot it using the following command.
qemu-x86_64 -m 1024 -cdrom debian-9.0.0-amd64-netinst.iso -hda image.img -boot c -net nic -net user -nographic -vnc :0