vbox虚拟机vdi文件用VMware打开
转自:https://blog.51cto.com/dahui09/1863486方法一:使用VirtualBox?自带的VBoxManage来进行格式转换: 1、安装VBoxManage 2、使用VBoxManage格式转换指令转为Vmware能识别的(vmdk)格式 ? 方法二:vdi转成VM虚拟机文件vmdk文件并生成vm虚拟机配置文件 1、vbox导出ova虚拟机文件 2、用VM虚拟机打开ova文件 方法三:我们将使用qemu-img工具。QEMU磁盘镜像工具(这个要在能开机的情况下开始,安装qemu-kvm可能导致virtualbox无法启动) 1、安装qemu-kvm?软件 2、修改已经建好的虚拟机,更改格式 ?======================================================================== ? 方法一:1.VBoxManage.exe在VirtualBox?安装目录下,如下图,我们进VirtualBox?安装目录查看到VBoxManage.exe ? 2.命令行进入VirtualBox目录,运行相关VBoxManage格式转换指令,语法如下: ? 3.将VDI文件转成VHD文件,如下图命令将vdi的虚拟机文件转换成微软vhd虚拟机文件: ? 执行进度至100%结束完成转换,随后我们用微软虚拟机软件挂载顺利运行 至此,利用VBoxManage对三种常见虚拟硬盘格式转换介绍结束,vmdk、vhd转VDI等按格式套用即可。 ? ? ? 方法二:xp.vdi转成VM虚拟机文件vmdk文件并生成vm虚拟机的配置文件vmx文件 1. virtal box?导入vdi文件 文件转换步骤 ? 2.导出ova虚拟机文件 (1). ovf文件选择1.0格式。 (2). 2.0格式,第三步通不过。 ? ? (3).?用vmworkstaion打开ova文件 ? (4).打开step_2.vmx 方法三:在Ubuntu下可以很方便的安装 [email?protected]:~# sudo apt-get install qemu-kvm 使用如下一个命令就可以轻松完成转换。 [email?protected]:~# qemu-img convert??-f vdi -O vmdk Winxp.vdi Winxp.vmdk 直接修改已经建好的虚拟机,(Ubuntu系统在~/vmware/) ? 例如我建立的虚拟机叫Win,则修改~/vmware/Win/Win.vmx,找到?ide0:0.fileName = "Win.vmdk" ? 把其中的Win.vmdk修改成你转换生成的文件名即可。 [注]: 1,Winxp.vdi要根据VitrualBox虚拟机的名称修改,在目录~/.VirtualBox/HardDisks下可以找到。 2,.vmx?是VMware虚拟机的配置文件,是一个文本文件可以直接修改,也可以在程序中更改,删除原来的硬盘,再添加转换后的硬盘。 ====================== [email?protected]:~$ qemu-img qemu-img version 0.12.3,Copyright (c) 2004-2008 Fabrice Bellard usage: qemu-img command [command options] QEMU disk p_w_picpath utility Command syntax: check [-f fmt] filename create [-f fmt] [-o options] filename [size] commit [-f fmt] filename convert [-c] [-f fmt] [-O output_fmt] [-o options] filename [filename2[...]] output_filename info [-f fmt] filename snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename Command parameters: ‘filename‘ is a disk p_w_picpath filename ‘fmt‘ is the disk p_w_picpath format. It is guessed automatically in most cases ‘size‘ is the disk p_w_picpath size in bytes. Optional suffixes ‘k‘ or ‘K‘ (kilobyte,1024),‘M‘ (megabyte,1024k),‘G‘ (gigabyte,1024M) and T (terabyte,1024G) are supported. ‘b‘ is ignored. ‘output_filename‘ is the destination disk p_w_picpath filename ‘output_fmt‘ is the destination format ‘options‘ is a comma separated list of format specific options in a name=value format. Use -o ? for an overview of the options supported bythe used format ‘-c‘ indicates that target p_w_picpath must be compressed (qcow format only) ‘-h‘ with or without a command shows this help and lists the supportedformats Parameters to snapshot subcommand: ‘snapshot‘ is the name of the snapshot to create,apply or delete ‘-a‘ applies a snapshot (revert disk to saved state) ‘-c‘ creates a snapshot ‘-d‘ deletes a snapshot ‘-l‘ lists all snapshots in the given p_w_picpath Supported formats: cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2parallels nbd host_cdrom host_floppy host_device raw tftp ftps ftp https http ====================== 参考: Howto ConvertVmware Image to Virtualbox Image or Import Vmware Image into Virtualbox ====================================== 安装qemu-kvm可能导致virtualbox无法启动,在我的机器上出现了如下提示: Failed to open a session for the virtual machine WinXP. VirtualBox can‘t operate in VMX root mode. Please disable the KVM kernelextension,recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE). Details: Result Code: NS_ERROR_FAILURE (0x80004005) Component: Console Interface: IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3} ? 说 可能导致 的原因是系统环境比较复杂:安装在USB硬盘上,经常在T60p和Dell的740上工作,他们的?CPU一个是Intel、另外一个是AMD,在网上找到一个解决方案。 [email?protected]:~$ sudo modprobe -r kvm_intel #因为我当前的CPU是Intel,你也可以直接使用sudo modprobe -r kvm来删除kvm模块,无论你使用什么样的CPU。 然后打开VirtualBox就可以了,但是你需要在每次重启开机后执行这个命令,如果你需要启动Vbox的话。 参照: VirtualBox can‘t operate in VMX rootmode. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |