Difference between revisions of "Cloning the base LDOM image to create new LDOMs"

From Peter Pap's Technowiki
Jump to: navigation, search
Line 45: Line 45:
 
   storage/ldomclone/disk0                  0  620G  9.24G  -
 
   storage/ldomclone/disk0                  0  620G  9.24G  -
  
4. Now follow steps 3-12 of [[Creating a base LDOM image]], except you do not need to perform a Jumpstart as the OS is already built!
+
4. Now follow steps 3-12 of [[Creating a base LDOM image]], except you do not need to perform a Jumpstart as the OS is already built!  in Step 6, you should substitute the values for the new cloned disk image!
  
 
5. Once you telnet to the console of the new LDOM, it should prompt you with few questions about the hostname, IP and DNS settings.  Once done, the LDOM will reboot and be ready to use!
 
5. Once you telnet to the console of the new LDOM, it should prompt you with few questions about the hostname, IP and DNS settings.  Once done, the LDOM will reboot and be ready to use!

Revision as of 06:04, 1 June 2011

So You should by now have create a base LDOM image and be ready to clone it into lots of different LDOMs.

1. Create a snapshot of the base LDOMs ZFS disk image

 zfs snapshot storage/base/disk0@unconfigured_base

ZFS table should look something like this:

 # zfs list
 NAME                                   USED  AVAIL  REFER  MOUNTPOINT
 rpool                                 25.4G   109G    93K  /rpool
 rpool/ROOT                            5.36G   109G    18K  legacy
 rpool/ROOT/s10s_u7wos_08              5.36G   109G  5.36G  /
 rpool/dump                            10.0G   109G  10.0G  -
 rpool/swap                              10G   118G  16.4M  -
 storage                               46.4G   620G  36.5K  /storage
 storage/base                          46.4G   620G  34.9K  /storage/base
 storage/base/disk0                    46.4G   658G  9.24G  -
 storage/base/disk0@unconfigured_base      0      -  9.24G  -

Note that the snapshot has a size of 0!

2. Create a new ZFS filesystem to hold the disk image of the new LDOM you want to create

 zfs create storage/ldomclone

3. Clone the base LDOM disk image from it's snapshot

 zfs clone storage/base/disk0@unconfigured_base storage/ldomclone/disk0

This create a disk image called storage/ldomclone/disk0 which is an exact copy of the base image. Again, notice that the clone has a size of 0:

 # zfs list
 NAME                                   USED  AVAIL  REFER  MOUNTPOINT
 rpool                                 25.4G   109G    93K  /rpool
 rpool/ROOT                            5.36G   109G    18K  legacy
 rpool/ROOT/s10s_u7wos_08              5.36G   109G  5.36G  /
 rpool/dump                            10.0G   109G  10.0G  -
 rpool/swap                              10G   118G  16.4M  -
 storage                               46.4G   620G  38.2K  /storage
 storage/base                          46.4G   620G  34.9K  /storage/base
 storage/base/disk0                    46.4G   658G  9.24G  -
 storage/base/disk0@unconfigured_base      0      -  9.24G  -
 storage/ldomclone                     34.9K   620G  34.9K  /storage/ldomclone
 storage/ldomclone/disk0                   0   620G  9.24G  -

4. Now follow steps 3-12 of Creating a base LDOM image, except you do not need to perform a Jumpstart as the OS is already built! in Step 6, you should substitute the values for the new cloned disk image!

5. Once you telnet to the console of the new LDOM, it should prompt you with few questions about the hostname, IP and DNS settings. Once done, the LDOM will reboot and be ready to use!