首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >移动-vm不工作:找不到带有名称的VirtualMachine

问移动-vm不工作:找不到带有名称的VirtualMachine
EN

Server Fault用户
提问于 2022-10-12 12:26:21
回答 4查看 180关注 0票数 1

我正试图用move命令跨两个Vcenters (从6.5迁移到7.0)迁移VM,但是有些地方出错了,无法找到我的测试-vm,甚至基本的get-vm也找不到它。

代码语言:javascript
复制
$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,看起来我只能在整个命令中使用该选项一次

代码语言:javascript
复制
 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
EN

回答 4

Server Fault用户

回答已采纳

发布于 2022-10-15 21:55:52

由于在两个Vcenters上共享相同的数据存储,因此,对于我来说,这个解决方案工作得最好:

  1. 保存VMs路径文件,例如Get-VM | Select Name, @{N="VM Config File";E={$_.extensiondata.config.files.vmpathname}}
  2. 在Vc1上注销VM
  3. 在Vc2:New-VM -VMFilePath '' -ResourcePool 'Cluster'上注册VM
票数 0
EN

Server Fault用户

发布于 2022-10-14 23:42:55

如果要将VM从vCenter A移动到vCenter B,请使用VMware转换器工具。您可以毫无问题地移动VM打开。此外,还有一个测试程序,也许你可以尝试新的工具。请注意VM,因为vSphere 7上不推荐某些操作系统。

票数 1
EN

Server Fault用户

发布于 2022-10-12 12:44:48

在当前的配置中,迁移是不可能的。

对VMware VM迁移到另一个vCenter

的需求

  • 源和目标vCenter服务器实例和ESXi主机必须运行Version6.0或更高版本。是
  • 源vCenter和目标vCenter应该在同一个版本上。不是
  • 跨vCenter服务器和远程vMotion功能需要企业+许可证。未知
  • 在使用vSphere Web客户端时,两个vCenter服务器实例必须处于增强链接模式,并且必须位于同一个vCenter单登录(SSO)域中,以便源vCenter服务器能够对目标vCenter服务器进行身份验证。不是

正如您所看到的,在当前的配置中,不可能进行简单的直接迁移。如果您拥有Enterprise许可证,您可以更新6.5个vCenter并将其链接到其他vCenter,那么迁移应该可以工作。

否则,您可以手动迁移它(关闭VM,从vCenter中删除,必要时将文件移动到新的数据存储,注册VM,打开VM ),也可以使用VMware转换器进行转换(VM也必须关闭)。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1112904

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档