Automation

 View Only
  • 1.  New-VM command not working for cloning

    Posted Nov 25, 2019 12:15 PM

    I have installed a windows 10 machine in our esx server manually.

    When I am trying to clone it, I am getting below error.

    $myDatastore = Get-Datastore -Name DataStore01

    $vmhost = Get-VMHost

    PS C:\Windows\system32> New-VM -Name MyVM2 -VM $win10 -Datastore $myDatastore -VMHost $vmhost

    New-VM : 25-11-2019 17:38:40    New-VM        The operation for the entity "win10build" failed with the following

    message: "The operation is not supported on the object."

    At line:1 char:1

    + New-VM -Name MyVM2 -VM $win10 -Datastore $myDatastore -VMHost $vmhost

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

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

        + FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_OperationFailed,VMware.VimAutomation

       .ViCore.Cmdlets.Commands.NewVM

    I tried with snapshot,without snapshot, with poweredon,without poweredon

    All same output



  • 2.  RE: New-VM command not working for cloning

    Posted Nov 25, 2019 12:46 PM

    Are you connected to a vCenter?

    You can not clone VMs on free ESXI node.



  • 3.  RE: New-VM command not working for cloning

    Posted Dec 04, 2019 09:49 AM

    It is a licensed one.



  • 4.  RE: New-VM command not working for cloning

    Posted Dec 04, 2019 09:53 AM

    Which PowerCLI version are you using?
    Can you do

    Get-Module -Name VMware* -ListAvailable