VMware Cloud Community
nmdhussain
Contributor
Contributor

new-vm permission to perform this operatio is denied

Hi am trying to create vm from template in esx server through powershell, the script works fine when I execute it from Win 7 system but it is not working when I try it from the windows server 2008. Any help will be apprriciated. Thanks

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership

Are you using the same account on the W7 and the W2K8 machine ?

Could you perhaps include the command you try to execute ?

And the full error message ?


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

Reply
0 Kudos
nmdhussain
Contributor
Contributor

Command:

Connect-VIServer -Server $server -User $user -Password $password -ErrorAction SilentlyContinue -WarningAction SilentlyContinue

new-vm -Location $folderName -vmhost $vmHost -Name $vmName -Template $templateName -Datastore $dataStore

Error:
New-VM : 10/11/2011 11:37:14 AM    New-VM        Permission to perform this operation was denied.
At C:\Users\Administrator\Desktop\CreateClone__.ps1:55 char:18
+            new-vm <<<<  -vmhost $vmHost -Name $vmName -Template $templateName -Datastore $dataStore
    + CategoryInfo          : NotSpecified: (:) [New-VM], NoPermission
    + FullyQualifiedErrorId : Client20_VMServiceImpl_NewVM_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM
Reply
0 Kudos
nmdhussain
Contributor
Contributor

Am using the same credentials and same script

Reply
0 Kudos
nmdhussain
Contributor
Contributor

I think this is the issue with 32 bit and 64 bit.

New-vm cmdlet works only for 32 bit systems as mentioned in the documentation

Thanks LucD

Reply
0 Kudos