【问题标题】:Vmware VM move from one host to other host via PowerCLIVmware VM 通过 PowerCLI 从一台主机移动到另一台主机
【发布时间】:2014-06-16 17:37:30
【问题描述】:

您好,我们有 6 个 Vsphere 服务器,我的 Vcenter 是基于 Linux 的,版本是 Vsphere 5.5。

我们正在尝试通过 PowerCLI 脚本自动管理我们的 VMware 环境。

我在互联网上获得了一个脚本,但出现错误。感谢 Lucd 和 Kunaludapi 的帮助。

需要一些帮助。

Move-VM : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomation.Vi
Core.Types.V1.Inventory.VIContainer' required by parameter 'Destination'. Speci
fied method is not supported.
At C:\Scheduled tasks\Vmware DRS Script.ps1:103 char:53
+                        $objVM | move-vm -destination <<<<  (get-vmhost $strDe
st);
    + CategoryInfo          : InvalidArgument: (:) [Move-VM], ParameterBinding
   Exception
    + FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.ViCor
   e.Cmdlets.Commands.MoveVM

【问题讨论】:

    标签: vmware-server


    【解决方案1】:

    谷歌是你的朋友

    http://kc-tek.blogspot.co.nz/2012/06/vmotion-vms-from-one-given-host-to.html

    As always when using PowerCLI you have to connect to your vCentre server
    Connect-VIserver SeverName
    Issue the command to 'get' the VMs from the host you want to move them off and then 'move' them to the target host.
    Get-VM -Location "HostName" | Move-VM -Destination (Get-Vmhost "NewHost")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-22
      • 1970-01-01
      • 2015-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-29
      • 2013-07-25
      相关资源
      最近更新 更多