7 Replies Latest reply on Dec 6, 2018 10:23 AM by a.p.

    Move VMDKs to a another VM

    helderguzman Lurker



      Here is the situation:


      I have a Windows Server 2003 Server that I need to decommission and move the disks to a Windows Server 2016. In order to move the disk, i need to offline the disks and detach them from the source vm.  The problem that i have is the the offline option is not available in 2003 under Disk Management.



      What would it be the best way to move the disk to the new vm?  do I need to shutdown the server and remove the disk that way? or there is a way to take the drives offline on a power on state vm?


      I tried diskpart but it does not work to take the drives offline.


      Thanks in advance.

        • 1. Re: Move VMDKs to a another VM
          a.p. Guru
          vExpertCommunity WarriorsUser Moderators

          Since you are going to decommission the server, I assume that you are going to shut it down anyway!?

          In this case make sure that none of the disks has active snapshots (no "...-00000x.vmdk" names in the VM's virtual disk settings)! If there are snapshots, run "Delete All" from the Snapshot Manager. Once the VM has been powered off, remove the virtual disks from the VM's settings (DON't delete from disk!!!), and then add these virtual disks to the new server.


          Make sure you backup the VM prior to doing this, so that you have a way back in case something unexpected happens.


          • 2. Re: Move VMDKs to a another VM
            helderguzman Lurker

            Thanks for the quick response.


            do you need to rename the disk to the new server first. before attaching to new server.

            • 3. Re: Move VMDKs to a another VM
              a.p. Guru
              User ModeratorsvExpertCommunity Warriors

              Renaming is optional, but will avoid later confusion.

              Please note that renaming a virtual disk should be done using:

              vmkfstools -E oldname.vmdk newname.vmdk

              This will rename both, the descriptor, as well as the data .vmdk file, and also update the metadata.


              • 4. Re: Move VMDKs to a another VM
                Dave_the_Wave Hot Shot

                I had to read this post three times. I still don't get it.


                I think you may be confused what a vm and host are, and what a vmdk and datastore are.


                Unless more detail is provided, my guess is your 2003 is a physical box (you didn't say if it was).


                If that is the case, why disconnect anything at all? I can't imagine what will happen to physical sata drives upon disconnection. Just drive share those and Teracopy it over to your 2016 vm.


                But wait, are you saying the host machine where the 2016 vm is on, doesn't have much of a datastore, so you want to take the 2003's physical sata drives, keep it all intact, and have them all appear in the host machine's datastore?



                • 5. Re: Move VMDKs to a another VM
                  helderguzman Lurker

                  Both machines are VMs:


                  in windows server 2003 you can't take the disk offline, even with the help of diskpart.  so my thinking is to do the following...




                  1. Turn off old vm

                  2. remove the D: and E drives

                  3. Add Drives to new server 2016

                  4. Rename the old disks name into new one (Question on the process) by using previous notes vmkfstools -E oldname.vmdk newname.vmdk.  would it name all the necessary files as need to?


                  5. Set them online


                  hope that helps

                  • 6. Re: Move VMDKs to a another VM
                    Dave_the_Wave Hot Shot

                    No one does what you are suggesting.


                    Simply create the 2016 VM to your satisfaction, you can even go as fancy as using the same logical drive letters.


                    Then Teracopy off the shares of the 2003 VM.

                    • 7. Re: Move VMDKs to a another VM
                      a.p. Guru
                      vExpertUser ModeratorsCommunity Warriors

                      The steps are slightly different.

                      1. turn off old Windows 2003 VM
                      2. Important: make sure that there are no snapshots (...-00000x.vmdk) files. In case there are some, run "Delete All" from the Snapshot manager
                      3. remove the virtual disks from the virtual machine's configuration on the ESXi host
                      4. optional: rename the disks. The previously mentioned command will rename the "<vmname>.vmdk", as well as its associated "<vmname>-flat.vmdk"
                      5. add the renamed virtual disks to new server 2016
                      6. set them online from within the guest OS if necessary