Automation

 View Only
  • 1.  how do I clone a vm from powercli with thin disk format

    Posted Sep 11, 2010 06:39 PM

    I am trying to clone a vm from powershell using thin disk format. What options can I add to the command below to do it?

    C:\Program Files\VMware\Infrastructure\vSphere PowerCLI> New-VM -Name web2clone -VM (Get-VM web2) -VMHost (Get-VMHost ESX5.domain.com) -Datastore (Get-Datastore "ESX LUN 0")



  • 2.  RE: how do I clone a vm from powercli with thin disk format

    Posted Sep 11, 2010 07:41 PM

    There are two things I'm not aware of at the moment. The first is whether there is a command line option like "-Transform sparse" and the second, whether LucD is currently online :smileywink:

    Therefore I'd suggest you take a look at Simon Long's PowerCLI: A Simple VM Backup Script for an example of how to clone with thin provisioned disks.

    André



  • 3.  RE: how do I clone a vm from powercli with thin disk format

    Posted Sep 11, 2010 11:53 PM

    Sorry, was offline for a couple of hours :smileywink:

    Simon's script is indeed a great backup script but I think the snapshot is unnecessary overhead for a pure clone.

    ____________

    Blog: LucD notes

    Twitter: lucd22



  • 4.  RE: how do I clone a vm from powercli with thin disk format

    Posted Sep 11, 2010 11:50 PM

    I think you can use the DiskStorageFormat parameter for that with the New-VM cmdlet.

    ____________

    Blog: LucD notes

    Twitter: lucd22