VMware Cloud Community
debajyotipal
Contributor
Contributor

Not able to clone from PowerCLI

Hi All ,


I have a Vcenter Setup and having one ESXi host . When i am trying to clone a VM residing in the ESXi via Powercli , its giving error not able to find storage datastore1 . Below is the command i gave from vCenter .
Powercli > New-VM -name clone1 -Datastore datastore1 -VM <sourcevm name>  -VMHost <ESXI name>

New- New-VM Unable to get objects by name: server <ESXI name> not connected .

New-VM : New-VM Could not find StorageResource w
ith name 'datastore1'.

But I was able to do the cloning from Vsphere GUI .

Note : Datastore1 is local storage in ESXi host .

Regards

Deb

0 Kudos
41 Replies
LucD
Leadership
Leadership

That is the latest version.

That error has been popping up in all kinds of operations.

Can you check the PowerShell version you are using ? Do a

$psversiontable

And the .Net version you have installed

Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |
Get-ItemProperty -name Version -EA 0 |
Where { $_.PSChildName -match '^(?!S)\p{L}'} |
Select PSChildName, Version


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
debajyotipal
Contributor
Contributor

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $psversi

ontable

Name                           Value

----                           -----

CLRVersion                     2.0.50727.5466

BuildVersion                   6.1.7601.17514

PSVersion                      2.0

WSManStackVersion              2.0

PSCompatibleVersions           {1.0, 2.0}

SerializationVersion           1.1.0.1

PSRemotingProtocolVersion      2.1

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Chil

dItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |

>> Get-ItemProperty -name Version -EA 0 |

>> Where { $_.PSChildName -match '^(?!S)\p{L}'} |

>> Select PSChildName, Version

>>

PSChildName                             Version

-----------                             -------

v2.0.50727                              2.0.50727.5420

v3.0                                    3.0.30729.5420

Windows Communication Foundation        3.0.4506.5420

Windows Presentation Foundation         3.0.6920.5011

v3.5                                    3.5.30729.5420

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>

0 Kudos