ADVERTISE HERE

Storage vMotion only one hard disk to another datastore in vSphere

Title: Storage vMotion only one hard disk to another datastore in vSphere
Author(s): (ICT-Freak.nl) Arne Fokkema
Target Audience: Technical - Intermediate
Current Revision:
First Published: 21 April 2011
Products: VMware, vSphere
UID: XD10405

How to migrate just one hard disk to make sure the VMFS datastore will not fill up

Punchy Text: 

How to migrate just one hard disk to make sure the VMFS datastore will not fill up

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:

Migrate Virtual MachineIn the Select Datastore wizard, click the Advanced button:

Migrate Virtual Machine 02Now you’re able to select the hard disk you want to migrate and the datastore. Don’t change the other settings:

Migrate Virtual Machine 03Review the summary and press finish to execute this Storage vMotion:

Migrate Virtual Machine 04

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:

vSphere PowerCLI

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

Technology Exchange: