`
caihorse
  • 浏览: 145916 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

vmdk/vhd 转 vdi(vmdk/vhd to vdi)、vdi 转 vmdk/vhd(vdi to vmdk/vhd)

阅读更多

vmdk/vhd 转 vdi(vmdk/vhd to vdi)、vdi 转 vmdk/vhd(vdi to vmdk/vhd)一步完成

最近由于要把 vmdk 转成 vdi 格式(本来想继续用 VMware 的,但由于 VMware 的无缝模式没有 VirtualBox 好,且内存、CPU 占有太高,所以又换回了 VirtualBox。换来换去,换了好几次了,我是不折腾会死星人( ̄▽ ̄")),想上网找一下有没有比上一篇文章提到的更简单的方法。搜索了一下,除了上一篇写的要用到 qemu 软件进行两次转换外,还真让我找到了一个一步转换完成的方法。

      原来新版的 VirtualBox 附带的 VBoxManage 已经可以实现转换虚拟磁盘格式的功能,不再需要借助 qemu 等第三方软件(將vmdk/vhd轉換為VDI格式)。

      把 vmdk 转成 vdi 的命令是:

VBoxManage clonehd source.vmdk target.vdi --format VDI

   --format

    是指target的格式,source的格式似乎会自动判断

Your are no longer needed to use vditool, the tool "VBoxManage" comes with recent revision VirtualBox.

Just type the command:

VBoxManage clonehd source.vmdk target.vdi --format VDI

- format

refers to the target format, source format seems to be automatically determined.

VirtualBox Command Line Management Interface Version 3.1.0
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Usage:

VBoxManage clonehd          <uuid>|<filename> <outputfile>
                            [--format VDI|VMDK|VHD|RAW|<other>]
                            [--variant Standard,Fixed,Split2G,Stream,ESX]
                            [--type normal|writethrough|immutable]
                            [--remember] [--existing]</other></outputfile></filename></uuid>

 

        VBoxManage 的其他参数可以通过在命令提示符中输入 VBoxManage 或 "E:\Program Files\VirtualBox\VBoxManage.exe"(VBoxManage.exe 文件路径) 来获取。

 

All rights reserved.
Usage:
VBoxManage [-v|--version]    print version number and exit
VBoxManage [-q|--nologo] ... suppress the logo
VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|
bridgedifs|hostonlyifs|dhcpservers|hostinfo|
hostcpuids|hddbackends|hdds|dvds|floppies|
usbhost|usbfilters|systemproperties
VBoxManage showvminfo       <uuid>|<name> [--details] [--statistics]
[--machinereadable]

VBoxManage showvminfo <uuid>|<name> --log <idx>

 

………………

实例操作(图)

      命令:

"E:\Program Files\VirtualBox\VBoxManage.exe" clonehd "D:\Backup\我的文档\Virtual Machines\Ubuntu\Ubuntu.vmdk" "D:\Backup\我的文档\Virtual Machines\Ubuntu\Ubuntu.vdi" --format VDI

或 "E:\Program Files\VirtualBox\VBoxManage.exe" clonehd Ubuntu.vmdk Ubuntu.vdi --format VDI

[Image]   

     好了,转换完了。

     同理,把 vdi 转成 vmdk 的命令是:

VBoxManage clonehd source.vdi target.vmdk --format VMDK

     vhd 格式的转换也是同一个道理,只需改一下相关的参数即可。

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics