1 2 Previous Next 27 Replies Latest reply on Aug 29, 2019 10:39 AM by jbruns2019

    New-VM fails and raises little help

    jbruns2019 Novice

      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?)

       

      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.

        1 2 Previous Next