понедельник, 21 сентября 2009 г.

VBoxManage clonehd Clone HDD storage in VirtualBOX

How - to clone Virtual hdd storage in VirtualBOX?

Introduction:

5.4. Cloning disk images
You can duplicate hard disk image files on the same host to quickly produce a second virtual machine with the same operating system setup. However, you should only make copies of virtual disk images using the utility supplied with VirtualBox; see Section 8.16, “VBoxManage clonehd”. This is because VirtualBox assigns a unique identity number (UUID) to each disk image, which is also stored inside the image, and VirtualBox will refuse to work with two images that use the same number. If you do accidentally try to reimport a disk image which you copied normally, you can make a second copy using VirtualBox's utility and import that instead.


8.16. VBoxManage clonehd

This command duplicates a registered virtual hard disk image to a new image file with a new unique identifier (UUID). The new image can be transferred to another host system or imported into VirtualBox again using the Virtual Disk Manager; see Section 3.5, “The Virtual Disk Manager” and Section 5.4, “Cloning disk images”. The syntax is as follows:
VBoxManage clonehd |
  [--format VDI|VMDK|VHD|RAW|]
  [--variant Standard,Fixed,Split2G,Stream,ESX]
  [--type normal|writethrough|immutable]
  [--remember]
where the parameters mean:
format
Allow to choose a file format for the output file different from the file format of the input file.
variant
Allow to choose a file format variant for the output file. It is a comma-separated list of variant flags. Not all combinations are supported, and specifying inconsistent flags will result in an error message.
type
Only honored if --remember is also specified. Defines what kind of hard disk type this image should be.
remember
Keep the destination image registered after it was successfully written.
Note
For compatibility with earlier versions of VirtualBox, the "clonevdi" command is also supported and mapped internally to the "clonehd" command. 


Example for me: $ VBoxManage clonehd ~/.VirtualBox/HardDisks/FreeBSD_7.2.vdi --format VDI --type normal /media/sdc1/FreeBSD_7.2.vdi 

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

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 3725067e-69a4-4ab4-843f-a5646732177c

Complete! You may it uses now!

Комментариев нет: