1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="cloningvdis">
|
---|
4 | <title>Cloning Disk Images</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>
|
---|
8 | You can duplicate hard disk image files on the same host to
|
---|
9 | quickly produce a second virtual machine with the same OS setup.
|
---|
10 | However, you should <i>only</i> make copies of
|
---|
11 | virtual disk images using the utility supplied with
|
---|
12 | Oracle VM VirtualBox. See <xref href="man_VBoxManage-clonemedium.dita#vboxmanage-clonemedium"/>.
|
---|
13 | This is because Oracle VM VirtualBox assigns a UUID to each disk image,
|
---|
14 | which is also stored inside the image, and Oracle VM VirtualBox will
|
---|
15 | refuse to work with two images that use the same number. If you do
|
---|
16 | accidentally try to reimport a disk image which you copied
|
---|
17 | normally, you can make a second copy using the <userinput>VBoxManage
|
---|
18 | clonevm</userinput> command and import that instead.
|
---|
19 | </p>
|
---|
20 | <p>
|
---|
21 | Note that Linux distributions identify the boot hard disk from the
|
---|
22 | ID of the drive. The ID Oracle VM VirtualBox reports for a drive is
|
---|
23 | determined from the UUID of the virtual disk image. So if you
|
---|
24 | clone a disk image and try to boot the copied image the guest
|
---|
25 | might not be able to determine its own boot disk as the UUID
|
---|
26 | changed. In this case you have to adapt the disk ID in your boot
|
---|
27 | loader script, for example
|
---|
28 | <filepath>/boot/grub/menu.lst</filepath>. The disk ID looks like
|
---|
29 | the following:
|
---|
30 | </p>
|
---|
31 | <pre xml:space="preserve">scsi-SATA_VBOX_HARDDISK_VB5cfdb1e2-c251e503</pre>
|
---|
32 | <p>
|
---|
33 | The ID for the copied image can be determined as follows:
|
---|
34 | </p>
|
---|
35 | <pre xml:space="preserve">hdparm -i /dev/sda</pre>
|
---|
36 | </body>
|
---|
37 |
|
---|
38 | </topic>
|
---|