Automation

 View Only
  • 1.  Move-VM + thin-provisioning?

    Posted Jul 29, 2009 05:55 AM

    In vSphere, you can (via the GUI) Storage VMotion a VM and change its disk type to Thin Provisioned. Is there any way to do this through the provided Move-VM cmdlet? Or do I need to resort to using the API RelocateVM_Task and provide the VirtualMachineRelocateTransformation as sparse?

    If it's the latter - might I put in a feature request? :smileyhappy:



  • 2.  RE: Move-VM + thin-provisioning?

    Posted Sep 29, 2009 09:29 PM

    I'd like to see this too. I migrated 500 machines to a new NFS volume that were previously thick, and it didn't take advantage of the thin-provisioning on NFS :smileysad:



  • 3.  RE: Move-VM + thin-provisioning?

    Posted Sep 29, 2009 10:11 PM

    If it worked like this would it be good enough?

    Get-VM -datastore X | Move-VM -datastore Y | Get-HardDisk | Set-HardDisk -StorageFormat Thin

    =====

    Carter Shanklin

    Read the PowerCLI Blog
    [Follow me on Twitter|http://twitter.com/cshanklin]



  • 4.  RE: Move-VM + thin-provisioning?

    Posted Sep 29, 2009 10:21 PM

    Carter,

    That seems like it would take longer... I believe a storage VMotion from thick to thin should take less time than thick to thick (i think).

    Also, would the -StorageFormat be available hot? As it stands, you cannot "inflate" a hard disk from the GUI hot - you have to Storage VMotion to do that.

    If the Move-VM command took the same amount of time, and you could do Set-HardDisk hot... that would be fine. Otherwise being able to set the option in Move-VM like..

    Move-VM -Datastore Y -StorageFormat Thin

    would be best.



  • 5.  RE: Move-VM + thin-provisioning?

    Posted Sep 29, 2009 10:26 PM

    I think that would be fine if it worked like that - doesn't help me today tho. :smileysad:



  • 6.  RE: Move-VM + thin-provisioning?

    Posted Sep 29, 2009 10:29 PM

    Ok, actually what if it worked like THIS:

    Get-Datastore X | Get-VM | Get-HardDisk | Set-HardDisk -Datastore Y -StorageFormat Thin

    I was hoping we were going to get a Move-HardDisk cmdlet, but this works too.

    =====

    Carter Shanklin

    Read the PowerCLI Blog
    [Follow me on Twitter|http://twitter.com/cshanklin]



  • 7.  RE: Move-VM + thin-provisioning?

    Posted Sep 29, 2009 10:37 PM

    Are you saying this would work today?



  • 8.  RE: Move-VM + thin-provisioning?

    Posted Sep 30, 2009 12:00 AM

    No it won't work in PowerCLI 4.0 unfortunately.

    =====

    Carter Shanklin

    Read the PowerCLI Blog
    [Follow me on Twitter|http://twitter.com/cshanklin]



  • 9.  RE: Move-VM + thin-provisioning?

    Posted Sep 30, 2009 12:04 AM

    Carter,

    Not to be a negative nelly but...

    This wouldn't actually move the VM, just its hard drives. What if we want to move the whole VM, VMX file and all? then we'd have to run a Move-VM command immediately after, which would involve yet another copy....