Quantcast
Channel: VMware Communities: Message List - vSphere Hypervisor
Viewing all articles
Browse latest Browse all 3837

Re: How to move Hypervisor VMDK to different datastore without vmotion

$
0
0

Welcome to the Community,

 

without vCenter Server in place, one option to migrate the virtual disk to another datastore is to do it from the command line.

For this task it's important to know that each virtual disc consists of two files, a descriptor file "<vmname>.vmdk", and a data file "<vmname>-flat.vmdk".

 

  1. power off the VM
  2. make sure the VM doesn't have active snashots!!! (i.e. no delta .vmdk files in the VM's folder)
  3. create a new target folder on the destination datastore
  4. clone the virtual disk, using the following command
    vmkfstools -i /vmfs/volumes/source-ds/vm-folder/virtual-disk.vmdk /vmfs/volumes/target-ds/vm-folder/virtual-disk.vmdk
    if you want the destination virtual disk to become thin provisioned, append -d thin to the above command line
    for details see e.g. https://kb.vmware.com/s/article/1028042
  5. from the GUI, edit the VM's settings, i.e. remove the migrated virtual disk from the VM's configuration (do not yet select delete from disk), save the VM's settings,, then open the settings again and add the existing virtual disk from the target location to the VM (make sure you select the same adapter, e.g. scsi0:1 to which the original virtual disk was connected)

If everything works as expected you may then carefiully delete the obsolete/migrated virtual disk file(s) from the source datasatore.

 

André


Viewing all articles
Browse latest Browse all 3837

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>