VMware Cloud Community
vipclubber
Enthusiast
Enthusiast

Moving to new VM by reattaching large vmdk

I am having an issue with a large sized Win 2012 R2 VM running on 6.0U2 with multiple vmdk files.

I have tried many solutions to resolve my slow dragging VM issue after ESXi update, unsuccessfully.

I would like to build a new Win 2012 R2 VM on the same host, properly configure it and then reattach the 11Tb 😧 drive to this new VM.

How can it be done?

I cannot move/copy the 😧 drive (VIPFS_2.vmdk) from its original source on datastore because it is too big.

I want to build new VM with more RAM and CPU cores and reattach large vmdk (with an option to roll back to original VM if needed).

Please point me to an article if one exists.

Any advice is greatly appreciated.

pastedImage_0.png

pastedImage_1.png

11 Replies
TheBobkin
Champion
Champion

Hello,

Is there any reason why you cannot just increase the RAM and CPU cores on the existing VM?

Which version/build did you update from and to?

Creating a new VM and attaching the existing disks to it is easy to do if you want to go this route:

- Consolidate any snapshots on the disks of the VM (and double-check that this completed by looking at each disk using 'Edit Setttings' and verify they are all poiting to base-disk e.g. VMname.vmdk not snapshots such as VMname-000001.vmdk).

- Power off the existing VM, and unregister it from the host ('Remove from inventory')

- Create a new VM, customise as needed  and attach the existing disks - Remove the default existing disk, select 'New device' Select 'Existing Hard Disk' click 'Add', navigate to the location on datastore that the original VM disks are located and add each disk

When doing this, ensure that you are adding each disk as they were on the original VM, e.g. the boot disk should be attached at 0:0, and any other disks that are attached to seperate controllers should be added correctly after adding the relevant controller (e.g. add a second SCSI Controller and add disks at 1:0 etc.).

You can of course create a VM and remove/add disks after creation.

Relevant Documentation:

pubs.vmware.com/vsphere-60/index.jsp#com.vmware.vsphere.vm_admin.doc/GUID-BDDECFBC-2FD5-4E4A-ABC7-AD274F4F40B4.html

Bob

-o- If you found this comment useful please click the 'Helpful' button and/or select as 'Answer' if you consider it so, please ask follow-up questions if you have any -o-

vipclubber
Enthusiast
Enthusiast

To respond to your questions, please see my thread below:

"Is there any reason why you cannot just increase the RAM and CPU cores on the existing VM?"

"Which version/build did you update from and to?"

Issues after Migratrion

In other words, I have tried number of things and feel that creating new VM with fresh OS install and reattaching vmdk is best final option.

So to proceed with this option I have the following follow up questions:

FYI my goal here is to create NEW VM with NEW C: drive (fresh OS) but use OLD 😧 drive from old VM (11Tb) which is full of data.

I do not have any snapshots of this vmdk. I simply do not have space on the server for a snapshot of 11Tb 😧 drive.

Respectfully I also not able to copy this vmdk to another datastore or server since there is not enough space.

So my question is after I remove old VM from inventory/unregister, do I have to move this vmdk file, leave it in its original location or can I move it without copying to new VM?

I would prefer to have it in new VM folder if possible but I can't copy it. I only have 1Tb space on server available.

When creating new VM I want to create new bootable OS C: drive but then attache 😧 drive from old VM.

Should I create 😧 drive at a time of new instillation and then just replace it with old 😧 drive or just attach it later as old 😧 drive from my old VM?

This drive to be retired on old VM and replaced with new C: drive on new VM with fresh OS install.

pastedImage_1.png

The below drive to be MOVED to new VM with all data intact.

pastedImage_2.png

TheBobkin
Champion
Champion

Hello,

You don't have to move it, you are merely repointing the new VM to the original disk descriptor and location.

So provided there is access to that datastore you can add that large data disk to a new VM with a new OS (assuming it is a compatible or same OS) as a data drive, it should be picked up as a drive in the Guest OS (likely D:).

The only thing to mention is put them on the same SCSI controllers, you only have one here (SCSI controller 0) so basically only needs the new boot OS on 0:0 and the data drive on 0:1 (or any other connection other than 0:0 which is default boot).

No need to attach a dummy drive on VM creation and add later - you can add the original data disk to the new VM during VM creation using the steps I provided previously.

(or attach it later, either works). Though I will mention that you should consider testing this VM without data drive and also try a second SCSI controller for the data drive as Madmax01​ advised.

Bob

-o- If you found this comment useful please click the 'Helpful' button and/or select as 'Answer' if you consider it so, please ask follow-up questions if you have any -o-

vipclubber
Enthusiast
Enthusiast

Is there a possibility to actually "move" large vmdk into new VM folder so that I can delete old VM?

Do you recommend attaching the D drive during VM creation or after?

Are there video tutorial available on attaching existing drive?

vipclubber
Enthusiast
Enthusiast

Can you please assist further and respond to my previous questions posted?

What if I create new VM with the same name as the original while I disable original VM and unregister it.

Then I will delete all files from original VM folder except for large disk vmdk and replace them with new files from new VM folder.

Then I will re register old VM back again?

Will new VM settings remain?

Will this work?

0 Kudos
dekoshal
Hot Shot
Hot Shot

Make sure that any vmdk new or existing is connected to only one VM ( old or new)

You can detach the vmdk from existing VM and attach it to the new VM without any issues. Its just the mapping of the VMDK in the VMX.

You can attach the existing disk to the new VM during the VM creation or after the VM is created. It's totally up to you

If you found this or any other answer helpful, please consider the use of the Helpful to award points.

Best Regards,

Deepak Koshal

CNE|CLA|CWMA|VCP4|VCP5|CCAH

TheBobkin
Champion
Champion

Hello,

You don't need to move a disk to attach it to a VM, the only thing that is required is that the datastore that this disk resides on is accessible from the host.

If you require all the files in one location you can create a new VM and simply copy the .vmx to the original VMs namespace folder, then change the namespace folder name to match the new .vmx name.

While it is *possible* to move data-disks (e.g. -flat files) using 'mv' I strongly advise against doing this as you can end up corrupting the data permanently, so use 'cp' wherever possible.

As previously advised, adding an existing disk to a VM is a fairly trivial operation and a multitude of resources relevant to this can be found online e.g.:

https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.vm_admin.doc%2FGUID-BDDECFB...

Bob

-o- If you found this comment useful please click the 'Helpful' button and/or select as 'Answer' if you consider it so, please ask follow-up questions if you have any -o-

vipclubber
Enthusiast
Enthusiast

Thanks. Is there a test or utility I can perform to test the integrity or test vmdk file for errors?

I want to make sure that the current vmdk file is healthy.

Thanks in advance and please advise.

0 Kudos
vipclubber
Enthusiast
Enthusiast

In addition, when setting up new VM, what are some things to worry about when adding such huge vmdk file to maximize performance.

What setting you recommend to set for:

Network Adapter

Disk Controller

CPU/MMU Virtualization

Any other suggestions are greatly appreciated....

0 Kudos
dekoshal
Hot Shot
Hot Shot

Check out Check VMDK for Corruption  Comment#3

If you found this or any other answer helpful, please consider the use of the Correct or Helpful to award points.

Best Regards,

Deepak Koshal

CNE|CLA|CWMA|VCP4|VCP5|CCAH

0 Kudos
vipclubber
Enthusiast
Enthusiast

What setting you recommend to set for:

Network Adapter

Disk Controller

CPU/MMU Virtualization

Any other suggestions are greatly appreciated....

0 Kudos