Storage vMotion only one hard disk to another datastore in vSphere
By Arne Fokkema - ICT-Freak.nl
Sometimes it’s necessary to only migrate a single hard disk from a VM. This is the case when someone adds two 1 TB VMDK’s and fills them up completely. The maximum size of a VMFS datastore is 2TB minus 512 bytes. So in this case the datastore will be completely filled with no space left to keep the VM running. So if you want to migrate just one hard disk to make sure the VMFS datastore will not fill up. You can use the vSphere client or PowerCLI to perform this “advanced” Storage vMotion.
Note: if you want to reclaim your “wasted” storage back from your SAN, you have to recycle the whole datastore. So you have to migrate the other hard disks and configuration files as well.
vSphere Client
Start the Migrate Virtual Machine wizard and select datastore:
In the Select Datastore wizard, click the Advanced button:
Now you’re able to select the hard disk you want to migrate and the datastore. Don’t change the other settings:
Review the summary and press finish to execute this Storage vMotion:
PowerCLI
Or you can use the following PowerCLI one-liner to migrate the Hard disk:
Get-HardDisk -vm <vmname> | Where {$_.Name -eq "Hard disk <#>"} | `
% {Set-HardDisk -HardDisk $_ -Datastore "<datastore>" -Confirm:$false}
The following output will be generated:
- xtravirt's blog
- Login or register to post comments
Spotlight:
VMware Documentation Downloader v11.08.30
Updated for vSphere 5 - A free tool for those on the move who need information FAST
vSphere 5 License Entitlement Changes
See what has changed in the license entitlement in vSphere 5?
Thin Client vs Zero Client
The differences between Thin and Zero desktop clients for VDI


