VMware Cloud Community
pallakke
Contributor
Contributor

New-VM/Start-VM give license error

Hi,

   I am new to PowerCLI. Using vSphere client, I am able to clone/create VMs comfortably. Lately, we were thinking of having sort of scripts to automate creation of VMs. Found that PowerCLI is best bet for this. InstalledPowerCLI 5.1 on my laptop to play with commandlets. Some of the commands provided me the information, but when it came to creating a new VM or powering of an existing VM, it gives following error:

Can you please let me know whether it is a licensing issue or some privilage issue?

(x86)\VMware\Infrastructure\vSphere PowerCLI> C:\vm_Analysis\VM_SCRIPTING\50vmClon.ps1
Name                           Port  User
----                           ----  ----
10.23.174.2                    443   admin
Shutdown-VMGuest : 2/22/2013 4:05:50 PM    Shutdown-VMGuest        Operation "Shutdown VM guest." failed for VM "VirtualHybrid1000" for the following reason: Current license or ESXi version prohibits
execution of the requested operation.
At C:\vm_Analysis\VM_SCRIPTING\50vmClon.ps1:4 char:17
+ Shutdown-VMGuest <<<<  -VM $vm -Confirm:$false
    + CategoryInfo          : NotSpecified: (:) [Shutdown-VMGuest], VimException
    + FullyQualifiedErrorId : Client20_VmGuestServiceImpl_ShutdownVmGuest_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.ShutdownVmGuest
New-VM : 2/22/2013 4:05:55 PM    New-VM        The operation for the entity VirtualMachine-1315 failed with the following message: "The operation is not supported on the object."
At C:\vm_Analysis\VM_SCRIPTING\50vmClon.ps1:7 char:18
+ 1..2 | % { New-VM <<<<  -Name newvm$_ -VM $vm -Datastore $datastore -VMHost $vmhost }
    + CategoryInfo          : NotSpecified: (:) [New-VM], NotSupported
    + FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_OperationFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>

Thanks,

Pallakke

0 Kudos
2 Replies
a_p_
Leadership
Leadership

Which license do you use on the host? With the free ESXI Hypervisor license the API is restricted.

André

Note: Discussion moved from VMware® Horizon™ View to VMware vSphere™ PowerCLI

0 Kudos
pallakke
Contributor
Contributor

Hi Andre,

   We use VMware ESXi 5.1.0, 799733. I can findout with my IT team, but it may not be free version. I am not using root account (which is administrative account). Will that be the reason for not having this previlage?

Using connect-vserver commandlet, I am directly connecting to blade and executing these commands.

Thanks for your quick response.

Pallakke

0 Kudos