8 Replies Latest reply on Mar 30, 2012 5:16 AM by DaveP

    Using VHD as virtual disk

    DaveP Master

      Upto Workstation 8.0.2 VHD files could be used a virtual disks in the same way as VMDK files. We have use VHDs as a common packaging mechansim for certain tasks. In the Tech Preview a message box is now displayed that stops the VHD from being used. Host is Windows 7 x64 Enterprise Edition. The guest is set to Workstation 8 compatibility. We do not want to have to roundtrip VHD-->VMDK-->VHD

       

      VMware used to support several other conatiner for virtual disks, and I hope will contnue to do so. Also one request, if you do support other formatscan you add them to the dropdown selector for adding an exisitng virtual disk?

        • 1. Re: Using VHD as virtual disk
          AJ Master

          vhd format is not supported.

           

          supported formats are ovf and vmdk

          • 2. Re: Using VHD as virtual disk
            continuum Guru
            Community WarriorsvExpertUser Moderators

            cooldude
            thats not correct
            this used to work:

             

            # Disk DescriptorFile
            version=1
            CID=3bc2f3e3
            parentCID=00000000
            isNativeSnapshot="no"
            createType="twoGbMaxExtentSparse"
            parentFileNameHint="..\Vista.vhd"
            # Extent description
            RW 4192256 SPARSE "drive-0-s001.vmdk"
            RW 4192256 SPARSE "drive-0-s002.vmdk"
            ...
            RW 4192256 SPARSE "drive-0-s032.vmdk"
            RW 65536 SPARSE "drive-0-s033.vmdk"

             

            # The Disk Data Base
            #DDB

            • 3. Re: Using VHD as virtual disk
              continuum Guru
              Community WarriorsvExpertUser Moderators

              Hi Dave
              it still works for me though it is quite painful ...

               

              Steps:
              1. find out original size in sectors of the vhd
              2. create a temporary vmdk with exactly the same size
              3. create a snapshot for that temporary vmdk
              4. edit snapshot descriptor so that it looks like

               

              # Disk DescriptorFile
              version=1
              encoding="windows-1252"
              CID=e89cb9dd
              parentCID=00000000

              isNativeSnapshot="no"
              createType="twoGbMaxExtentSparse"
              parentFileNameHint="Windows XP Mode base.vhd"

              # Extent description
              RW 4192256 SPARSE "xpmode-000001-s001.vmdk"
              RW 4192256 SPARSE "xpmode-000001-s002.vmdk"
              RW 4192256 SPARSE "xpmode-000001-s003.vmdk"

              ...

               

              set value for parentCID to 00000000 - dont forget that otherwise WS will complain

               

              As far as I know vhds never could be used directly - it always required a snapshot so that the vhd could be used in readonly mode

              • 4. Re: Using VHD as virtual disk
                DaveP Master

                Hi Ulli

                 

                Well in 8.0.2 on Windows I was directly attaching them and booting 2 weeks ago. After some more investigation the messagebox is just from the front-end. I opened an existing guest with VHD and boots just fnie on Tech Preview. No magic needed and the VMX file is attached.

                 

                However will document the workaround if I need it.

                 

                Question for VMware upto 6.5 VHDs and some other format weger suppoted Have you dropped support?

                 

                UPDATE: OK create a new guest with Tech Preview virtual hardware and no error message. Use lower level of compatibility and message pops up. I think it is probably meant to be a warning but instead stops the creation process.

                • 5. Re: Using VHD as virtual disk
                  continuum Guru
                  User ModeratorsvExpertCommunity Warriors

                  Hi Dave
                  with your settings

                   

                  ide0:0.mode = "independent-nonpersistent"
                  ide0:0.fileName = "D:\Backup\MAND60213694A.VHD"

                   

                  the vhd will be used readonly as well.
                  Are you sure that earlier versions could use vhds in writeable mode ?

                  • 6. Re: Using VHD as virtual disk
                    DaveP Master

                    Yes works read-write as we have used it to provision VHDs for native boot to VHD.

                    • 7. Re: Using VHD as virtual disk
                      continuum Guru
                      vExpertUser ModeratorsCommunity Warriors

                      Wow - how could I miss that  ? ;-)

                       

                      the beta uses a vhd without any complaints if you edit the vmx-file manually and assign an existing vhd

                      • 8. Re: Using VHD as virtual disk
                        DaveP Master

                        Well I didn't know about the snapshot hack. It's good to learn something new ever day!

                         

                        I need to spend more time back in these forums. Had too many distractions over that last couple of years.