0

こんにちは、6 つの Vspher サーバーがあり、私の 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
4

1 に答える 1

-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")
于 2015-03-07T16:02:07.643 に答える