Hi all,
I am working off of Ruben garcia's excellent linked clone scripts and one thing I am trying to add is to have the vApp created on a differnt datastore.
I'm at a loss to what im doing wrong
Message was edited by: BrianRTS - Fix formatting
You can specify the datastore where you want to create linked clone delta files.
This requires a small change to Ruben's script
# Generate specs for clone $cloneSpec = new-object Vmware.Vim.VirtualMachineCloneSpec
$cloneSpec.Snapshot = $sourceVM.Snapshot.CurrentSnapshot
$cloneSpec.Location = new-object Vmware.Vim.VirtualMachineRelocateSpec
$cloneSpec.Location.DiskMoveType = [Vmware.Vim.VirtualMachineRelocateDiskMoveOptions]::createNewChildDiskBacking
$cloneSpec.Location.Datastore = (Get-Datastore -Name $tgtDatastoreName).ExtensionData.MoRef
The Datastore property is used to indicate where the clone should be located.
Or do you want create the clones and then move them ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can specify the datastore where you want to create linked clone delta files.
This requires a small change to Ruben's script
# Generate specs for clone $cloneSpec = new-object Vmware.Vim.VirtualMachineCloneSpec
$cloneSpec.Snapshot = $sourceVM.Snapshot.CurrentSnapshot
$cloneSpec.Location = new-object Vmware.Vim.VirtualMachineRelocateSpec
$cloneSpec.Location.DiskMoveType = [Vmware.Vim.VirtualMachineRelocateDiskMoveOptions]::createNewChildDiskBacking
$cloneSpec.Location.Datastore = (Get-Datastore -Name $tgtDatastoreName).ExtensionData.MoRef
The Datastore property is used to indicate where the clone should be located.
Or do you want create the clones and then move them ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks! I'll make the change to the vApp script and test on Tuesday. Will assign points ASAP
Sent from my iPad
No hurry, remember that you will have to provide the datastorename in this $tgtDatastoreName variable.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference