1.Install QEMU in Ubuntu
QEMU is available in the default repositories of Ubuntu. So, we can install it with front-end tool Virt Manager using command:
sudo apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin
After installing the above packages, reboot your system.
2. Create the Virtual hard disk image
First create the Virtual hard disk image for the new VM. For example, let us create 20GB size hard disk image.
qemu-img create aios.img 20G
Or you can create the image with the Qemu’s default disk image format ‘qcow2’ using the following command
qemu-img create -f qcow2 ubuntu.qcow 40G
3. Install
qemu-system-x86_64 -hda ubuntu.qcow -boot d -cdrom /data/disk1/install/ubuntu-16.04.6-desktop-amd64.iso -m 1024 -machine ubuntu,accel=kvm
For 32bit VM, use:
qemu-system-xi386 -hda ubuntu.img -boot d -cdrom /home/sk/Soft_Backup/OSImages/New/ubuntu-15.04-server-i386.iso -m 1024 -machine ubuntu,accel=kvm
Here, I have allocated 1024MB RAM to my guest OS.
4.start
After the installation is done, the system can be booted with
qemu-system-x86_64 -hda ubuntu.qcow -m 1024 -machine ubuntu,accel=kvm