In this article, we would focus on how to convert disk images to various formats using command-line utility qemu-img in Ubuntu distribution. Disk images are virtual hard disks which are used with virtual machines. These disk images are used to emulate disk storage devices. Furthermore depending on virtualization used, different disk images are utilized by different applications like QEMU/KVM, VirtualBox etc.
A vhd file extension is commonly used for virtual hard drives for Microsoft Virtual Server. A vhd file contains disk image used in virtual machines. Several programs can work with.vhd files including Microsoft Virtual PC, or ISOBuster. There is one other file type using. The VHD file extension!. Vhd - Quartus II VHDL design data. Differing from physical hard disk, the virtual hard disk is a file used as storage media for the virtual machine. P2V (physical to virtual) can help you: Migrate the operating system on the physical machine to a virtual machine when creating a new virtual machine. Convert physical disk image to virtual disk image to transfer data easily. DMG is Mac OS X native disk image format while virtual machines (VmWare, Parallels or VirtualBox) are able to mount ISO images only. With AnyToISO program you can convert DMG to ISO and mount the resulting ISO image to your virtual machine (running Mac OS X). Converting a bootable ISO into a Virtual disk VHD/VMDK on Mac is almost the same with Windows. All you need is to open Terminal on your Mac and run commands. However, as mentioned earlier, you need to have VirtualBox app already installed on your Mac. Otherwise, you are unable to convert the ISO file to VHD/VMDK. Mounting DMG image files to Vmware, Palallels or VirtualBox on Windows & Mac. DMG is Mac OS X native disk image format while virtual machines (VmWare, Parallels or VirtualBox) are able to mount ISO images only. With AnyToISO program you can convert DMG to ISO and mount the resulting ISO image to your virtual machine (running Mac OS X).
First we would discuss how to get command-line utility qemu-img (Qemu disk image utility).
Note: Following operations would require you to have superuser privileges. In case you don’t have one, then contact your System Administrator for assistance.
Install qemu-img in Ubuntu distribution
The required package is already available in standard Ubuntu repository. Therefore, we need to first update the repository. So, issue the following in terminal –
Now, qemu-img command-line utility is packaged with qemu-utils. Hence –
Convert RAW image to Qcow2, VDI, VMDK & VHD
I. Convert Raw image to Qcow2:
II. Convert Raw image to VDI:
III. Convert Raw image to VMDK:
IV. Convert Raw image to VHD:
Convert Qcow2 image to RAW, VDI, VMDK & VHD
I. Convert Qcow2 image to RAW:
II. Convert Qcow2 image to VDI:
III. Convert Qcow2 image to VMDK:
Dmg To Vhd
IV. Convert Qcow2 image to VHD:
Convert VDI image to RAW, Qcow2, VMDK & VHD
I. Convert VDI image to RAW:
II. Convert VDI image to Qcow2:
III. Convert VDI image to VMDK:
IV. Convert VDI image to VHD:
Convert VMDK image to RAW, Qcow2, VDI & VHD
I. Convert VMDK image to RAW:
II. Convert VMDK image to Qcow2:
III. Convert VMDK image to VDI:
IV. Convert VMDK image to VHD:
Convert VHD image to RAW, Qcow2, VDI & VMDK
Dmg To Vhd
I. Convert VHD image to RAW:
II. Convert VHD image to Qcow2:
III. Convert VHD image to VDI:
IV. Convert VHD image to VMDK:
Convert Dmg To Vhd
In conclusion, we have discussed how to convert disk images to various formats using qemu-img in Ubuntu.