It has been a while since I used the script written for mouting VHDs. I started re-writing the code for mouting/unmount VHDs for the Codeplex project and realized that MS changed the output format for this method. Earlier this method used to return a string similar to instance of Msvm_VirtualHardDiskInfo {Type = 3;FileSize = 2405406208;MaxInternalSize = 32212254720;InSavedState = TRUE;InUse = FALSE;}; But now, they have converted the output to XML format. It looks something like <INSTANCE CLASSNAME=”Msvm_VirtualHardDiskInfo”><PROPERTY NAME=”FileSize” TYPE=”uint64″> <VALUE>10514432</VALUE> </PROPERTY> <PROPERTY NAME=”InSavedState” TYPE=”boolean”> <VALUE>FALSE</VALUE> </PROPERTY> <PROPERTY NAME=”InUse” TYPE=”boolean”> <VALUE>TRUE</VALUE> </PROPERTY> <PROPERTY NAME=”MaxInternalSize” TYPE=”uint64″> <VALUE>2147483648</VALUE> </PROPERTY> <PROPERTY NAME=”ParentPath” PROPAGATED=”true” TYPE=”string”> </PROPERTY> <PROPERTY NAME=”Type” TYPE=”uint16″> <VALUE>3</VALUE> </PROPERTY> </INSTANCE>. If you have downloaded the script earlier from this blog, it will work without any issues. However, the error checking capability of it is actually broken. For example, if you have mounted a VHD using the VHDmount.vbs and try to mount the same VHD again, you will get no error. I am fixing this and will release an updated script soon
↧