I've just pushed vdiskadm import/export/convert to the
3.3 vdisk and vbox repos.

You can now import a disk image from a block device or file
to a vdisk, convert (in place) to a different type
of vdisk and export from a vdisk to a block device or file.

I've also pushed the full vhd support (sparse and fixed) and
the ability to import a vmdk 1.1 optimized stream file.  An optimized
stream file is readonly and must be imported to another type
(vmdk:sparse by default) in order to be used as a vdisk.
Currently, there is no support for exporting a vmdk 1.1 optimized stream file.

Thanks,
Susan

------------------------------

Examples:

Here are the interfaces for import/export/convert:

# vdiskadm help import

import - import a zvol, raw file, or virtual disk

USAGE:
  vdiskadm import [-fnpqm] [-x <type>] -d <file|zvol|dsk> [-t <type[:opt]>] 
vdname

EXAMPLE:
  vdiskadm import -d /downloads/image.vmdk /export/new_guests/disk1

----
The [-fnpqm] flags are unchanged from the original vdiskadm import and
are used mostly by virt-convert.
-x gives the optional vdisk import file or block device type (vmdk, raw, vhd)
-t gives the imported vdisk type (default vmdk:sparse)

Here are some examples:
vdiskadm import -d /dev/zvol/dsk/tpool/t1  -t vmdk:fixed /vdisk1test
vdiskadm import -d /dev/dsk/c4t1d0s1 -t vhd:sparse /vdisk1test
vdiskadm import -d /export/home/test/test1.vmdk /vdisk1test

If importing a raw file, you may have to explicitly give the
input file type if vdiskadm can't detect the input file type:
vdiskadm import -x raw -d rawfile /vdisk1test


=======================================================

# vdiskadm help convert

convert - convert a virtual disk to different type

USAGE:
  vdiskadm convert [-t <type[:opt]>] vdname

  TYPES AND OPTIONS SUPPORTED
    vmdk:sparse
    vmdk:fixed
    vdi:sparse
    vdi:fixed
    vhd:sparse
    vhd:fixed
    raw
EXAMPLE:
  vdiskadm convert -t vmdk:fixed /guests/winxp/winxp-001

----
Convert converts a file in place so your vdisk name doesn't change.
Example:
vdiskadm convert -t vmdk:fixed /vdisk1test

=========================================================

# vdiskadm help export

export - export virtual disk to raw file, disk, zvol

USAGE:
 vdiskadm export -x <type>[:opt] -d <file|zvol|dsk> vdname

EXAMPLE:
  vdiskadm export -x raw -d /dev/zvol/dsk/pool/t1 /export/guests/disk1

---
The -x option gives the vdisk type (vmdk, raw, vhd) of the exported file.
-d gives the exported file or block device.

-----
Examples:
vdiskadm export -x vdi:sparse -d test_export.vdi xxx
vdiskadm export -x vmdk -d test_export.vmdk xxx
vdiskadm export -x raw -d test_export root-172-20-24-161
vdiskadm export -x raw -d test_export zzz
vdiskadm export -x raw -d /dev/dsk/c0t1d0s0 xxx
vdiskadm export -x raw -d root.raw root-172-20-24-161
vdiskadm export -x raw -d /dev/zvol/dsk/testpool/export_test root-172-20-24-161
_______________________________________________
xen-discuss mailing list
[email protected]

Reply via email to