Subscribe

new-clone cmdlet

I am trying to clone a VM in a CSV. I do not have SCVMM installed in this enviornoment. I installed OnCommand on a cluster node and the CSV that the VM is on is owned by the same node.

When i run new-clone, I get an error that says

New-Clone : Operation failed. Exiting progress message processing. Status VMCloneEngine::Clone: ValidateVHDDiskPaths failed reason Validate VHD path found that following VHD paths are not on NetApp LUN

C:\ClusterStorage\Volume3\base\SubLunBase\Virtual Hard Disks\BigBase.vhd

This VHD is definitely on a NetApp LUN.

Thanks,

Andy

Re: new-clone cmdlet

Correct.  New-Clone -template requires SCVMM.

If you want to just clone a file, use CLONE-FILE.

Like this:

clone-file C:\ClusterStorage\Volume1\VMs\W2kr2SysPrep.vhd C:\ClusterStorage\Volume1\VMs\PSCLone.vhd

Note that you must specify the full path to the source and the target in this build of the cmdlet.

Alex

new-clone cmdlet

That makes sense. However, when I run clone-file, I am getting an error that says

Clone-File : Operation failed. Exiting progress message processing. Status Coul

d not connect to net.tcp://localhost/VIM/VIMSubscriptionService/v_10. The conne

ction attempt lasted for a time span of 00:00:00. TCP error code 10061: No conn

ection could be made because the target machine actively refused it 127.0.0.1:8

08.

new-clone cmdlet

new-clone -template requires SCVMM

new-clone -vmname does not require SCVMM.  OCPM has its onw cloning engine.

Andy, can you post the cmdlet you ran?

new-clone cmdlet

never mind.. just realized the service was stopped... i think my GPO is shutting it down.

new-clone cmdlet

A couple things. i was able to get clone-file to work. I just had to add a storage credential.

Now I cannot repeat the initial error I was seeing with new-clone, but I am consistently getting another problem.

PS C:\> new-clone  -VMName SubLunBase -BaseVMName newVM -AllInSourceLUN -nc 1
New-Clone : Operation failed. Exiting progress message processing. Status Clone
of vhd file failed
At line:1 char:10
+ new-clone <<<<   -VMName SubLunBase -BaseVMName newVM -AllInSourceLUN -nc 1
    + CategoryInfo          : InvalidArgument: (NetApp.SystemCenter.ScCloneCmd
   let:ScCloneCmdlet) [New-Clone], Exception
    + FullyQualifiedErrorId : NetApp.SystemCenter.ScCloneCmdlet

SubLunBase is the name of the VM that I am trying to clone into the same LUN.

new-clone cmdlet

Can you post your clone log please?  Should be here:

C:\Program Files\NetApp\OnCommand\MS_Plugin\OC.VIM.WebService

Alex

new-clone cmdlet

So the error that was occurring before was that the destination file already existed. Seems like when it failed, it didn't clean up the file. I manually deleted the destination vhd file and now am getting an error that says Object reference not set to an instance of an object.

/08/2011 02:45:26:837 :  ProcessID= 2808 ThreadID= 3 OperationProgressEvent called
06/08/2011 02:45:26:837 :  ProcessID= 2808 ThreadID= 3 OperationProgressEvent done
06/08/2011 02:45:26:837 :  ProcessID= 2808 ThreadID= 3 the VIMPublishService client state = Opened
06/08/2011 02:45:26:837 :  ProcessID= 2808 ThreadID= 3 An error occured while executing the VMCloneEngine::Clone.
Object reference not set to an instance of an object.Source: OC.VSMServices
Stack Trace:    at NetApp.SCI.Common.VSMServices.VirtualSystemManagementService.CloneVirtualSystemConfigOnlyEx(String vmName, String exportDirectory, Boolean isDirectory, String newVMName, Int32 count, String DestinationHost, String SourceHost)
   at NetApp.SCI.Common.VSMServices.VirtualSystemManagementService.CloneVirtualSystemConfigOnly(String vmName, String exportDirectory, Boolean isDirectory, String newVMName, Int32 count, String DestinationHost, String SourceHost)
   at NetApp.SystemCenter.VMCloneEngine.Clone(ScCreateCloneRequest request)

06/08/2011 02:45:26:852 :  ProcessID= 2808 ThreadID= 3 An error occured while executing the VMCloneEngine::Clone.
Object reference not set to an instance of an object.
06/08/2011 02:45:26:852 :  ProcessID= 2808 ThreadID= 3 VMCloneEngine::Clone-Exit
06/08/2011 02:45:26:852 :  ProcessID= 2808 ThreadID= 3 VMCloneCommand::Execute-Exit
06/08/2011 02:45:26:852 :  ProcessID= 2808 ThreadID= 3 An error occured while executing the VMCloneEngine::Clone.

I'll attach the entire log file as well

new-clone cmdlet

We would appreciate if cmdlets can be executed with -verbose switch, that will help the team to troubleshoot

For example new-clone  -VMName SubLunBase -BaseVMName newVM -AllInSourceLUN -nc 1  -verbose

Re: new-clone cmdlet

Hi Andy,

We can see this "Object reference not set to an instance of an object" error when we try to clone a VM which is owned by any another

node in the cluster and not the node from where the cmdlet is running

I can see that you have already mentioned that the CSV storage is owned by the same node from where the cmdlet is running which

is fine, along with this we should also make sure that the VM which resides in that CSV storage is also owned by the same node

from where you are running the cmdlet

Shankar