我尝试使用qemu-img命令将VMDK映像(安装Windows)转换为RAW格式。 但是,它失败,出现以下错误:
$ qemu-img convert -f vmdk -O raw image.vmdk /tmp/image.img qemu-img: Could not open 'image.vmdk': invalid VMDK image descriptor qemu-img: Could not open 'image.vmdk'
据我所知,图像本身似乎很好,至less我可以从它使用VMWare播放器正确启动。 我使用的是qemu-img 2.0.0版本。
这可能是VMDK文件使用QEMU不支持的图像格式。 这里的一个例子是http://brezular.com/2014/07/22/how-to-run-juniper-firefly-perimeter-vsrx-on-gns3/ ,其中Juniper发布的映像使用的VMDK文件格式是streamOptimized vmdk,需要由VMDK工具转换为QEMU支持的格式。
不要使用.vmdk图像本身,而是使用引用图像的较小的.vmdk文件。
我倾向于使用VirtualBox附带的VBoxManage将虚拟磁盘映像从一种格式转换为另一种格式。 这是非常灵活和快速。
VBoxManage clonehd /path/to/image.vdmk /path/to/newimage.raw --format RAW