solaris 11 zonereplication and start

Migrate the zone to other machine using replication.
example: zonename azone; zonepath root zones/azone
# zfs snapshot -r zones/azone@0
# zfs send -R zones/azone@0 | ssh root@othermachine zfs receive zones/azone

Run script on other machine
#./script zones/azone/rpool
--------------------------------------
#!/bin/bash

zfsfs=$1
root=${zfsfs}/ROOT
zbe=${root}/solaris

for i in $zbe $root $zfsfs ; do
for j in zoned mountpoint ; do
zfs inherit $j $i
done
done

zfs set mountpoint=legacy $root
zfs set zoned=on $root
zfs set canmount=noauto $zbe
zfs set org.opensolaris.libbe:active=on $zbe

rbe=`zfs list -H -o name /`
uuid=`zfs get -H -o value org.opensolaris.libbe:uuid $rbe`

zfs set org.opensolaris.libbe:parentbe=$uuid $zbe

-----------------------------------------------
# mount -F zfs zones/azone/rpool/ROOT/solaris /zones/azone/root

Add the zone to /etc/zones/index

Create the /etc/zones/azone.xml file

 

# zoneadm -z azone boot

This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.