Some useful command to help running and setup qemu…
Create an empty compressed 10 Go disk image (in qcow2 format):
1
$ qemu-img create -f qcow2 /home/kevin/qemu-disk-image.qcow 10GBoot on your machine’s CD-Rom in qemu with previous disk image as primary HDD:
1
$ qemu -cdrom /dev/cdrom -hda /home/kevin/qemu-disk-image.qcow -boot dSame as above but with a CD-Rom iso image:
1
$ qemu -cdrom /home/kevin/ubuntu.iso -hda /home/kevin/qemu-disk-image.qcow -boot dBoot the previously created disk image:
1
$ qemu /home/kevin/qemu-disk-image.qcowConvert qcow image to a raw image:
1
$ qemu-img convert /home/kevin/qemu-disk-image.qcow -O raw /home/kevin/qemu-disk-image.rawConvert raw image to a qcow image:
1
$ qemu-img convert -f raw qemu-disk-image.raw -O qcow2 qemu-disk-image.qcowMount a RAW disk image:
1
$ mount -o loop,offset=32256 /home/kevin/qemu-disk-image.raw /media/qemu/Mount a qcow2 disk image via the nbd protocol (don’t forget to install the nbd-client package):
1
$ modprobe nbd max_part=632$ qemu-nbd -c /dev/nbd0 /home/kevin/qemu-disk-image.qcow23$ mount /dev/nbd0p1 /media/qemuTo run a x86_64 guest system on a 32-bit host, simply use qemu-system-x86_64 binary command instead of qemu.