我正试图用move命令跨两个Vcenters (从6.5迁移到7.0)迁移VM,但是有些地方出错了,无法找到我的测试-vm,甚至基本的get-vm也找不到它。
$global:DefaultVIServers
Name Port User
---- ---- ----
host1.. 443 x.LOCAL\Admini...
host2.. 443 y.LOCAL\Admini...
$destination = 'new-host'
get-vm test-vm
Name PowerState Num CPUs MemoryGB
---- ---------- -------- --------
test-vm PoweredOff 2 4.000
Move-VM -VM test-vm -Destination $destination
Move-VM : 10/12/2022 7:16:06 AM Move-VM Could not find VirtualMachine with name 'test-vm'.
At line:1 char:1
+ Move-VM -VM test-vm -Destination $destination
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (test-vm:String) [Move-VM], VimException
+ FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM
Move-VM : 10/12/2022 7:16:06 AM Move-VM Value cannot be found for the mandatory parameter VM
At line:1 char:1
+ Move-VM -VM test-vm -Destination $destination
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Move-VM], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM尝试使用-Server选项: not,看起来我只能在整个命令中使用该选项一次
Move-VM -VM test-vm -server 'host1' -Destination $destination -Server 'host2'
Move-VM : Cannot bind parameter because parameter 'Server' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter value1,value2,value3".
At line:1 char:98发布于 2022-10-15 21:55:52
由于在两个Vcenters上共享相同的数据存储,因此,对于我来说,这个解决方案工作得最好:
Get-VM | Select Name, @{N="VM Config File";E={$_.extensiondata.config.files.vmpathname}}New-VM -VMFilePath '' -ResourcePool 'Cluster'上注册VM发布于 2022-10-14 23:42:55
如果要将VM从vCenter A移动到vCenter B,请使用VMware转换器工具。您可以毫无问题地移动VM打开。此外,还有一个测试程序,也许你可以尝试新的工具。请注意VM,因为vSphere 7上不推荐某些操作系统。
发布于 2022-10-12 12:44:48
在当前的配置中,迁移是不可能的。
的需求
正如您所看到的,在当前的配置中,不可能进行简单的直接迁移。如果您拥有Enterprise许可证,您可以更新6.5个vCenter并将其链接到其他vCenter,那么迁移应该可以工作。
否则,您可以手动迁移它(关闭VM,从vCenter中删除,必要时将文件移动到新的数据存储,注册VM,打开VM ),也可以使用VMware转换器进行转换(VM也必须关闭)。
https://serverfault.com/questions/1112904
复制相似问题