Hello there This is your first time to login from this IP. Have fun with Enterprise Q&A
0 投票
分类:Other related | 用户:

http://edoceo.com/notabene/ova-to-vmdk-to-qcow2

Using Evergreen ILS for example:

~ $ file Evergreen_trunk_Squeeze.ova
Evergreen_trunk_Squeeze.ova:                POSIX tar archive (GNU)
I'ts possible to use the tar command to list the contents

~ $ tar -tf Evergreen_trunk_Squeeze.ova 
Evergreen_trunk_Squeeze.ovf
Evergreen_trunk_Squeeze-disk1.vmdk
Simply extract those things...

~ $ tar -xvf Evergreen_trunk_Squeeze.ova
Evergreen_trunk_Squeeze.ovf
Evergreen_trunk_Squeeze-disk1.vmdk
Now take a look at the created files The OVF XML file describes the image, it makes for some interesting reading about the expectations of the running environment.

~ $ file Evergreen_trunk_Squeeze*
Evergreen_trunk_Squeeze-disk1.vmdk: VMware4 disk image
Evergreen_trunk_Squeeze.ova:        POSIX tar archive (GNU)
Evergreen_trunk_Squeeze.ovf:        XML document text
Recent versions of qemu are able to run directly from the VMDK file, buy why do that? Use QCOW2, it's better. Execute: qemu-img -h and the last line of output shows the supported formats.

~ $ qemu-img -h |tail -n1
Supported formats: raw cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2 parallels nbd blkdebug sheepdog host_cdrom host_floppy host_device file
Now actually convert it, this may take some time.

~ $ qemu-img convert -O qcow2 Evergreen_trunk_Squeeze-disk1.vmdk Evergreen_trunk_Squeeze.qcow2
Contents of OVF Files
The OVA is intended to run an Appliance and this OVF file describes the appliance. Examine the contents of this file to determine information about the expected CPU, Memory and other appliance details. These will be important to getting the image to run under KVM. Noteably, Windows has a terrible time moving, ensure you have the MergeIDE fix in place.

5 个回答

0 投票
用户:
qemu-img resize 50G.OVF_ESXi_5.5_UP2_006-01416-0000_V10.0.12.1.B_v1.0.qcow2 +40G

felix@arch:~/Documents/swms $ file 50G.OVF_ESXi_5.5_UP2_006-01416-0000_V10.0.12.1.B_v1.0.qcow2
50G.OVF_ESXi_5.5_UP2_006-01416-0000_V10.0.12.1.B_v1.0.qcow2: QEMU QCOW2 Image (v3), 53687091200 bytes
0 投票
用户:
qemu-img convert -O qcow2 -c OVF_ESXi_5.5_UP2_006-01416-0000_V10.0.12.1.B_v1.0-disk1.vmdk 10G.OVF_ESXi_5.5_UP2_006-01416-0000_V10.0.12.1.B_v1.0.qcow2

-c 压缩文件,去除空余的资料空间
0 投票
用户:
0 投票
用户:

https://docs.openstack.org/image-guide/convert-images.html

qemu-img convert: raw, qcow2, qed, vdi, vmdk, vhd

The qemu-img convert command can do conversion between multiple formats, including qcow2, qed, raw, vdi, vhd, and vmdk.

qemu-img format strings

Image format

Argument to qemu-img

QCOW2 (KVM, Xen)

qcow2

QED (KVM)

qed

raw

raw

VDI (VirtualBox)

vdi

VHD (Hyper-V)

vpc

VMDK (VMware)

vmdk

This example will convert a raw image file named image.img to a qcow2 image file.

$ qemu-img convert -f raw -O qcow2 image.img image.qcow2

Run the following command to convert a vmdk image file to a raw image file.

$ qemu-img convert -f vmdk -O raw image.vmdk image.img

Run the following command to convert a vmdk image file to a qcow2 image file.

$ qemu-img convert -f vmdk -O qcow2 image.vmdk image.qcow2

Note

The -f format flag is optional. If omitted, qemu-img will try to infer the image format.

When converting an image file with Windows, ensure the virtio driver is installed. Otherwise, you will get a blue screen when launching the image due to lack of the virtio driver. Another option is to set the image properties as below when you update the image in the Image service to avoid this issue, but it will reduce virtual machine performance significantly.

$ openstack image set --property hw_disk_bus='ide' image_name_or_id

VBoxManage: VDI (VirtualBox) to raw

If you’ve created a VDI image using VirtualBox, you can convert it to raw format using the VBoxManage command-line tool that ships with VirtualBox. On Mac OS X, and Linux, VirtualBox stores images by default in the ~/VirtualBox VMs/ directory. The following example creates a raw image in the current directory from a VirtualBox VDI image.

$ VBoxManage clonehd ~/VirtualBox\ VMs/image.vdi image.img --format raw
0 投票
用户:
qcow2 转换为vmdk的方式

qemu-img convert -O vmdk RHEL_OSP_6.0_KVM_006-01430-0000_V10.2.3.0_v1.0.qcow2 RHEL_OSP_6.0_KVM_006-01430-0000_V10.2.3.0_v1.0.vmdk
Welcome to Memo QA
欢迎来到Memo快速问答

分类

...