VMware Cloud Community
marklemon
Enthusiast
Enthusiast
Jump to solution

New-VM clone command worked in v5.5, failing in v6 with error below:

command:

PowerCLI F:\scripts\PowerCLI\vBlock-XIO> New-VM -Name vCenter.fqdn.org-cloned

-VM vCenter.fqdn.org-cloned -VMhost host.fqdn.org -datastore DS_Main_Shared_01 -DiskStorageFormat Thin -Notes "weekly clone-copy-backup of vCenter"

error message:

New-VM : 14/11/2016 11:23:43    New-VM        One or more objects are specified by name. There is no server list explicitly specified, so an attempt was made

to determine a single server by the  managed objects passed to the cmdlet as arguments. However the arguments come from more than one server which makes it im

possible to unambiguously  select single server.

At line:1 char:7

+ New-VM <<<<  -Name vCenter.fqdn.org-cloned -VM vCenter.fqdn.org -VMhost host.fqdn.apmn.org -datastore DS_Main_Shared_01 -DiskStorageFormat Thin -Notes "weekly clone-copy-backup of vCenter"

    + CategoryInfo          : InvalidResult: (System.Collecti...1.VIConnection   ]:List`1) [New-VM], ViServerConnectionException    + FullyQualifiedErrorId : Core_ObnSelector_GetClientListFromCmdletParameters_AmbiguousServer,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

New-VM : 14/11/2016 11:23:44    New-VM        One or more objects are specified

by name. There is no server list explicitly specified, so an attempt was made

to determine a single server by the  managed objects passed to the cmdlet as ar

guments. However the arguments come from more than one server which makes it im

possible to unambiguously  select single server.

At line:1 char:7

+ New-VM <<<<  -Name   -VM vCenter.fqdn.org -VMhost host.fqdn.org -datastore DS_Main_Shared_01 -DiskStorageFormat Thin -Notes "weekly clone-copy-backup of vCenter"

    + CategoryInfo          : InvalidResult: (System.Collecti...1.VIConnection

   ]:List`1) [New-VM], ViServerConnectionException

    + FullyQualifiedErrorId : Core_ObnSelector_GetClientListFromCmdletParamete

   rs_AmbiguousServer,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

New-VM : 14/11/2016 11:23:45    New-VM        StorageResource parameter: Could

not find any of the objects specified by name.

At line:1 char:7

blah blah

Notes "weekly clone-copy-backup of vCenter"

    + CategoryInfo          : ObjectNotFound: (VMware.VimAutom...ource Datasto

   re:RuntimePropertyInfo) [New-VM], ObnRecordProcessingFailedException

    + FullyQualifiedErrorId : Core_ObnSelector_SetNewParameterValue_ObjectNotF

   oundCritical,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

I disconnected all VIServer sessions, then did a fresh reconnect before running this command.

Can you please help?  points thankfully provided for any help.

cheers

KC

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Did you check the contents of $global:defaultviservers after the Disconnect?

Did you try stopping/starting your PowerShell/PowerCLI prompt?


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Did you check the contents of $global:defaultviservers after the Disconnect?

Did you try stopping/starting your PowerShell/PowerCLI prompt?


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

0 Kudos
marklemon
Enthusiast
Enthusiast
Jump to solution

Thanks LucD.  I knew you'd be the one to sort me out.  closed the PowerCLI session and opened a new one and it's working now.  Never would have guessed it from the error message.  cheers again.  You, sir, rock!

0 Kudos