SiMpLeNeTwKs – Virtualization …we make everything simple…


WorkAround: How to use NFS for Solaris Zones

Yes, Solaris Zones are cool. Yes, it is the first step to Solaris Virtualization. When compared to Vmware and KVM, it is still behind. By default, you can not configure it to move from one box to another without scping the files back and forth. There is no way to use shared storage.

What if we were to tell you there is a way. By using NFS and lofiadm, we can show you how to move a zone from one box to another in seconds.

Here are the steps to make it happen...

NOTE: let's say that /nfs is a mount point to an NFS server somewhere.

- create disk file
cd /nfs
mkfile 20G wiki

- mount it
lofiadm -a /nfs/wiki

NOTE: it will show up like /dev/lofi/1

- create filesystem on it
newfs /dev/lofi/1

- mount to real path
mkdir /zones
mkdir /zones/wiki
mount /dev/lofi/1 /zones/wiki
chmod 700 /zones
chmod 777 /zones/wiki

- create a zone using this path

- create the same configuration on another server

- shutdown/umount the zone on one server
zoneadm -z wiki halt
umount /zones/wiki

- turn it on a second server
mount /dev/lofi/1 /zones/wiki
chmod 700 /zones
chmod 700 /zones/wiki
zoneadm -z wiki boot

Filed under: SOLARIS Leave a comment
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.