Information Technology Reference
In-Depth Information
If the host system is running Oracle Solaris, ZFS data set cloning can be used
instead of cloning the virtual disk device with VBoxManage . The result is much
faster cloning time. Because ZFS needs to allocate space only for the additional
blocks that are changed in the clone, this approach also results in a smaller total
storage requirement for the new guest.
To use ZFS cloning, two steps must be completed. The first step is the creation
of the ZFS clone, which requires two commands. Because ZFS cloning occurs on a
data set level, you should place the guest disk images in separate ZFS file systems.
If a guest machine has several disks and they will always be used together, place
them all in the same ZFS file system so that one ZFS operation can manage all of
them.
The second step is the creation of a new UUID for the cloned virtual disk.
Without this step, the cloned disk image would have the same UUID as a disk that
is already registered. VirtualBox provides a method of creating a new UUID that
must be used after completing the ZFS cloning operation.
The following example compares the time and space required to clone a disk im-
age. The source is a 5 GB Solaris 10 boot disk. To simplify management of virtual
disk devices, the source disk image is placed in a ZFS file system named pandora/
HardDisks/s10guest1 , which is mounted on the host as /vbox/HardDisks/
s10guest1 .
We first clone the disk image into the directory /vbox/HardDisks/
s10guest2-trad using the VirtualBox clonehd method. For a consistent com-
parison of used space, the target directory is also a ZFS file system.
# time VBoxManage clonehd \
"/vbox/HardDisks/s10guest1/Solaris 10 boot disk.vdi" \
"/vbox/HardDisks/s10guest2-trad/Solaris 10 boot disk.vdi" \
--remember
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 19fb45a2-3773-4580-9e85-bb54af784d9a
real 9m40.680s
user 0m2.233s
sys 0m2.352s
Now we can clone the disk image using ZFS. The specific steps to do so are
shown below. To record the total time of this operation, these commands were run
from a script. The resulting time is indicated after the commands.
 
Search WWH ::




Custom Search