【发布时间】:2015-10-26 15:45:44
【问题描述】:
我想将一些 VHDX 文件转换为 VHD,以便我可以将它们上传到 Microsoft Azure,因为我必须将一些服务器迁移到公司的云中。问题是,我的服务器似乎不知道 PowerShell 中的 VHD 命令。
Get-VHD : The term 'Get-VHD' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-VHD -Path * | %{Convert-VHD -Path $_.Path -DestinationPath ($_.Pa ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-VHD:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
和
Convert-VHD -Path ".\VHDName.vhdx" -DestinationPath ".\VHDName.vhd"
Convert-VHD : The term 'Convert-VHD' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Convert-VHD -Path ".\Windows 8.1 x86 Update1 UpdatePack Upgrade.vhdx" ...
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Convert-VHD:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
有人知道如何解决这个问题吗? Hyper-V 无法安装,VirtualBox 也无法安装。 服务器本身是托管在 Azure 上的 Windows 10 Technical Preview 3 VM。 Powershell 的版本是 5.0.10514.0。
【问题讨论】:
-
“无法安装 Hyper-V”是什么意思?如果您有 .vhdx 文件,则 Hyper-V已经安装。
-
不。上传 VHDX 文件以供进一步处理。场景是这样的:在德国的一个办公室里有一台 Hyper-V 服务器,我在奥地利。德国的公司希望将他们的虚拟机迁移到 Azure,因此他们将 VHDX 文件上传到我用来转换磁盘的服务器,然后在 Azure 上创建虚拟机。此外,存储 VHDX 文件的服务器是 Hyper-V 管理程序(由 Microsoft 管理)中的来宾
-
此信息与问题完全无关。如果您有一个带有 vhdx 文件的 VM,那么您已经有了 Hyper-V。即使您使用桌面主机,该技术仍然是 Hyper-V。 Convert-VHD 命令在Windows 8 和Windows 10 的RTM 中可用,只要在相应的服务器中即可。
-
您不是在尝试从虚拟机内部转换 vhdx 文件吗?
-
不,当然不是。 VHDX 文件已上传到我无法启用 Hyper-V 的虚拟化服务器。 Convert-VHD 命令在此 VM 中不可用,因此我无法转换文件。由于我们讨论的是大约 150GB 的多个文件,因此我不想重新上传它们。
标签: powershell azure vhd