Logical Domains 1.3 Administration Guide

Cloning a Boot Disk Image

When a boot disk image is cloned, the new image is exactly the same as the original boot disk, and it contains any information that has been stored on the boot disk before the image was cloned, such as the host name, the IP address, the mounted file system table, or any system configuration or tuning.

Because the mounted file system table is the same on the original boot disk image and on the cloned disk image, the cloned disk image has to be assigned to the new domain in the same order as it was on the original domain. For example, if the boot disk image was assigned as the first disk of the original domain, then the cloned disk image has to be assigned as the first disk of the new domain. Otherwise, the new domain is unable to boot.

If the original domain was configured with a static IP address, then a new domain using the cloned image starts with the same IP address. In that case, you can change the network configuration of the new domain by using the sys-unconfig(1M) command. To avoid this problem you can also create a snapshot of a disk image of an unconfigured system.

If the original domain was configured with the Dynamic Host Configuration Protocol (DHCP), then a new domain using the cloned image also uses DHCP. In that case, you do not need to change the network configuration of the new domain because it automatically receives an IP address and its network configuration as it boots.


Note –

The host ID of a domain is not stored on the boot disk, but it is assigned by the Logical Domains Manager when you create a domain. Therefore, when you clone a disk image, the new domain does not keep the host ID of the original domain.


ProcedureCreate a Snapshot of a Disk Image of an Unconfigured System

  1. Bind and start the original domain.

  2. Execute the sys-unconfig command.

  3. After the sys-unconfig command completes, the domain halts.

  4. Stop and unbind the domain; do not reboot it.

  5. Take a snapshot of the domain boot disk image.

    For example:


    primary# zfs snapshot ldmpool/ldg1/disk0@unconfigured
    

    At this point you have the snapshot of the boot disk image of an unconfigured system.

  6. Clone this image to create a new domain which, when first booted, asks for the configuration of the system.