All Posts programming qemu: machine emulator and virtualizer

qemu: machine emulator and virtualizer

Β· 226 words Β· 2 minute read

qemu πŸ”—

qemu is composed of the initial letters of the phrase “(Q)uick (Emu)lator”.

Generic machine emulator and virtualizer. Supports a large variety of CPU architectures.

More information: https://www.qemu.org .

Boot from image emulating i386 architecture:

qemu-system-i386 -hda image_name.img

Boot from image emulating x64 architecture:

qemu-system-x86_64 -hda image_name.img

Boot QEMU instance with a live ISO image:

qemu-system-i386 -hda image_name.img -cdrom os_image.iso -boot d

Specify amount of RAM for instance:

qemu-system-i386 -m 256 -hda image_name.img -cdrom os-image.iso -boot d

Boot from physical device (e.g. from USB to test bootable medium):

qemu-system-i386 -hda /dev/storage_device

qemu-img πŸ”—

Create and manipulate Quick Emulator Virtual HDD images.

More information: https://qemu.readthedocs.io/en/master/tools/qemu-img.html .

Create disk image with a specific size (in gigabytes):

qemu-img create image_name.img gigabytesG

Show information about a disk image:

qemu-img info image_name.img

Increase or decrease image size:

qemu-img resize image_name.img gigabytesG

Dump the allocation state of every sector of the specified disk image:

qemu-img map image_name.img

Convert a VMware .vmdk disk image to a KVM .qcow2 disk image:

qemu-img convert -f vmdk -O qcow2 path/to/file/foo.vmdk path/to/file/foo.qcow2

I hope you enjoyed reading this post as much as I enjoyed writing it. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , and GitHub .