Some QEMU Commands

 

  • Create an empty compressed 10 Go disk image (in qcow format):
    1.qemu-img create -f qcow /home/kevin/qemu-disk-image.qcow 10G
  • Boot 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 d
  • Same as above but with a CD-Rom iso image:
    1.qemu -cdrom /home/kevin/ubuntu.iso -hda /home/kevin/qemu-disk-image.qcow -boot d
  • Boot the previously created disk image:
    1.qemu /home/kevin/qemu-disk-image.qcow
  • Convert qcow image to a raw image:
    1.qemu-img convert /home/kevin/qemu-disk-image.qcow -O raw /home/kevin/qemu-disk-image.raw
  • Mount a RAW disk image:
    1.mount -o loop,offset=32256 /home/kevin/qemu-disk-image.raw /mnt/qemu/
  • To run a x86_64 guest system on a 32-bit host, simply use qemu-system-x86_64 binary command instead of qemu.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s