新虚拟机 - "The operation is not supported on this object"

New-VM - "The operation is not supported on this object"

我正在尝试使用 PowerCLI 克隆虚拟机。 运行 以下片段 return 错误 "The operation is not supported on the object."

$vmHost = Get-VMHost
New-VM -Name VM1 -VM SourceVM -VMHost $vmHost

为什么会这样 return:'operation not supported on the object error'

只有一台主机,所以这不是 $vmHost 选择的问题。

谢谢

我使用直接连接到 ESXi 主机而不是 vCenter 服务器(使用 Connect-VIServer)的 PowerCLI 6.5R1 重现了这个错误。当连接到 vCenter 时,您拥有的 New-VM 线路工作正常。所以如果可以的话,我建议你这样做。否则它可能会成为 VMware 的问题。如果您没有支持合同,可以试试他们的 Forums.

编辑 - 你 can't clone a vm without vCenter (thanks @Jelphy) although in a pinch you could copy the disks.