Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

3.2.3. 为转换一个运行 Windows 的虚拟机做准备

重要

virt-v2v 不支持对 Windows 恢复控制台(Recovery Console) 的转换。如果一个虚拟机安装了恢复控制台,并且 VirtIO 在转换过程中被启用,引导到恢复控制台将会导致一个错误。
Windows XP x86 不支持 VirtIO 系统上的 Windows 恢复控制台。但是,Windows XP AMD64 和 Windows 2003(x86 和 AMD64)系统支持它。用户可以在虚拟机转换完成后重新安装恢复控制台来正常使用它。这个重新安装的过程与初始安装的过程相同,用户也不需要先删除恢复控制台后再安装它。
在转换一个运行 Windows 的虚拟机前,请确认以下步骤已经完成。
  1. 在运行 virt-v2v 的主机上安装 libguestfs-winsupport 软件包。这个软件包提供了对 NTFS(许多 Windows 系统都需要使用它)的支持。libguestfs-winsupport 软件包由 RHEL V2VWIN (v. 6 for 64-bit x86_64) 频道提供。请确认您的系统订阅到这个频道后以 root 身份运行以下命令:
    yum install libguestfs-winsupport
    如果您在没有安装 libguestfs-winsupport 软件包的情况下转换使用 NTFS 的虚拟机,这个转换过程将失败。与 例 3.2 “在没有安装 libguestfs-winsupport 的情况下转换 Windows 虚拟机出现的错误信息” 相似的错误信息将会被显示。

    例 3.2. 在没有安装 libguestfs-winsupport 的情况下转换 Windows 虚拟机出现的错误信息

    No operating system could be detected inside this disk image.
    
    This may be because the file is not a disk image, or is not a virtual machine
    image, or because the OS type is not understood by virt-inspector.
    
    If you feel this is an error, please file a bug report including as much
    information about the disk image as possible.
  2. 在运行 virt-v2v 的主机上安装 virtio-win 软件包。这个软件包为 Windows 虚拟机提供了准虚拟化的块设备和网络驱动。virtio-win 软件包由 RHEL V2VWIN (v. 6 for 64-bit x86_64) 频道提供。请确认您的系统订阅到这个频道后以 root 身份运行以下命令:
    yum install virtio-win
    如果您在没有安装 virtio-win 软件包的情况下转换 Windows 虚拟机,这个转换过程将失败。与 例 3.3 “在没有安装 virtio-win 的情况下转换 Windows 虚拟机出现的错误信息” 相似的错误信息会被显示。

    例 3.3. 在没有安装 virtio-win 的情况下转换 Windows 虚拟机出现的错误信息

    virt-v2v: Installation failed because the following files referenced in the configuration file are required, but missing: /usr/share/virtio-win/drivers/i386/Win2008

注意

当对运行 Windows 的虚拟机进行转换输出到 Red Hat Enterprise Virtualization 时,Red Hat Enterprise Virtualization Manager 会对转换后的虚拟机映像进行处理来安装更新的驱动。请参阅 第 7.2.2 节 “Windows 虚拟机的配置改变” 来获得相关的详细信息。当对运行 Windows 的虚拟机进行转换输出到 libvirt 时,不需要这一步。