VMware Cloud Community
jbruns2019
Enthusiast
Enthusiast

New-VM fails and raises little help

Running 11.1 of PowerCLI

vCenter cluster is 6.5

I can create VMs with GUI without fail

I am connected to my vcenter server as evident from using $global:defaultviserver

My Get-Datastore and Get-VMHost return valid entries and the store I want to use and host I want to use

This is all you get when PowerCLI does not like your command or it fails:

New-VM : 4/24/2019 7:48:23 AM   New-VM

At D:\git\moe\build\testVMCreate.ps1:14 char:1

+ New-VM -Name $targetvm1 -Datastore $datastore -VMHost $VMHost -Locati ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [New-VM], VimException

    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

Not much to go on (hint PowerCLI developers, can we enhance this to give more feedback please?)

pastedImage_4.png

This is the command I am using with obvious variables

Get-Folder returns the location I have unfocused in command above

I have tried stripping out many arguments and parameters to get to basic command and nothing works.

The odd thing is the New-VM command documentation says -Template is required.  Can't I simply create a new VM from raw parameters?

Creating a new template requires a VM to create it from.  See the issue there?  New-VM needs a template, New-Template needs a VM, according to the docs.

28 Replies
jbruns2019
Enthusiast
Enthusiast

You do realize that your link is simply pointing to the beginning of this thread right?

jbruns2019
Enthusiast
Enthusiast

Does 11.2 fix this thread?

0 Kudos
LucD
Leadership
Leadership

Afaik, no, the problem was reported in 11.2.
You'll have to wait for the next release I'm afraid.


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

0 Kudos
jbruns2019
Enthusiast
Enthusiast

When is 11.4 releasing so I can see if the new-vm works?

0 Kudos
LucD
Leadership
Leadership

I don't think the roadmap is made public.


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

0 Kudos
jbruns2019
Enthusiast
Enthusiast

I see 11.4 is available.

Did this issue get fixed?

0 Kudos
LucD
Leadership
Leadership

It is not explicitly listed in the 11.4.0 release notes, but you can give it a try.


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

0 Kudos
jbruns2019
Enthusiast
Enthusiast

Tried 11.4, same thing

Useless

0 Kudos
jbruns2019
Enthusiast
Enthusiast

So, 28 months goes by, I try to use 12.3 of PowerCLI with a vcenter running 6.7 and I get:

+ New-VM -Name $targetvm1 -Datastore $datastore -VMHost $VMHost -Locati ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-VM], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

Same response, over 2 years go by and zero done to this command to raise more diagnostic information.

Went back to 12.2 and it works.

Not much to go on (hint PowerCLI developers, can we enhance this to give more feedback please?)

0 Kudos