how to shrink or convert VMDK format image ?


===============================================================

how to shrink vmdk


in guest:

for OS X :

su diskutil secureErase freespace 0 [harddrive name]

for some other linux/unix OS , we should do below two steps to replace "diskutil":

1)  cat /dev/zero > zero.fill

2)  rm -f zero.fill


on host:
C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe -k [vmdk path]


REFERENCE:

    https://www.insanelymac.com/forum/topic/308367-how-to-shrink-os-x-vmdk/

================================================================

about VMDK and VDI format convert

as we know, VMDK is the shortname of Virtual Machine Disk, initially developed by VMWare and now it's an

open format.

VDI is the shortname of VirtualBox Disk Image, it's specified for virtualbox but the others VMM also support

this format. In some place, the VDI means Virtual Desktop Infrastructure, but here we are talking about a file format.

---------------------------------------------------------------------------------------------------------

1) performance

at first, in my opinion I supposed the VMDK image has a higher performance than VDI on VMWare or the VDI image

worked better than VMDK on VBox. but finally I found there is no difference. they are just image formats to content

data.

----------------------------------------------------------------------------------------------------------

2) format convert

raw / vdi / vmdk / vhd / qcow2

using qemu-img:

    qemu-img covert -f [origin format] -o [target format]

using vboxmanager:

    vboxmanager  clonehd   --format [target format]

===================================================================

    


你可能感兴趣的:(Virtualization)