Hello,
So I've been looking into PowerCLI and wrote a Script which automaticly creates a VM. I tested in my Testlab an there it worked perfectly.
I then proceeded to test it in the productive enviroment which is a vCenter 6.5 there I get the Null Error from the New-VM cmdlt.
On the second productive vCenter 6.0 it works fine and also in my testlab with vCenter 6.7 installed.
I've read a few community post where other people have those problem but they didn't pass the portgroup parameter.
I passed the parametes Name, PortGroup, ResourcePool and Datastore. I also tired it with NetworkName instead of PortGroup and/or VMHost instead of ResourcePool.
Anybody an idea what I'm doing wrong or is it just a bug?
Best
Noah
The problem is still there afaik (the changes log doesn't mention a fix for this issue).
As in the other thread, I would suggest to open a SR
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can you share your code and any messages this returned?
A screenshot will work
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hello LucD
Thanks for your reply.
Here are two screenshots, one with VMHost and the other one with ResourcePool. I am already connected to the vCenter server. Also this codeline I just used for testing but not even this one works.
As I undestand I passed the required parameters
And which PowerCLI version are you using?
Get-Module -Name VMware.PowerCLI -ListAvailable
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok, you are probably referring to Re: New-VM in 11.2 requires a portgroup
Did you also try with passing a Portgroup object instead of a Portgroup name (string)?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The problem is still there afaik (the changes log doesn't mention a fix for this issue).
As in the other thread, I would suggest to open a SR
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Okay, but the behaviour is strange, that it works on an older and a newer vCenter.
I guess I'll have to open an SR.
Thank you very much.