Virtual Disk Development Kit from VMware makes virtual disk manipulation easy, however, C/C++ interface is not suitable for thrown-away scripting style. ctypes-vddk acts as glue, and makes VMDK operation a lot easier. Currently, 32bit Windows and 32bit Linux are fully supported.
Python3000 is required. VMware Virtual Disk Development Kit is required, which can be downloaded from VMware official site. For help on VDDK, please refer to Virtual Disk API Programming Guide.
from VMDK import *
vddk = PyVDDK()
100 * 2048))
MBR = b'1' * VIXDISKLIB_SECTOR_SIZE
vddk.Open(r'test.vmdk', VIXDISKLIB_FLAG_OPEN_UNBUFFERED).Write(0, 1, MBR)
vmdk = vddk.Open(r'test.vmdk')
print('MasterBootRecord', vmdk.Read(0, 1))
for key in vmdk.GetMetadataKeys():
Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.