Cloning the base LDOM image to create new LDOMs
From Peter Pap's Technowiki
Revision as of 05:57, 1 June 2011 by Ppapa (talk | contribs) (Created page with "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 s...")
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