[OmniOS-discuss] ZBEs when moving zones

Ben Summers ben at fluffy.co.uk
Sat Oct 12 19:39:38 UTC 2013


Hello,

I'm writing a script to move zones between OmniOS servers, using snapshots zfs send | recv, so I can transfer it while it's running, then do a final snapshot when it's finally down.

The problem comes when I come to import it. I get the problem described here:

  http://everycity.co.uk/alasdair/2010/09/moving-zones-between-servers-on-opensolaris/

However, I have multiple zbes, and so I have to mount the right one on the destination server. Something like:

  zonecfg -z app0 -f /zones/app0/zone-config
  zfs set zoned=off rpool/zones/app0/ROOT 
  mount -F zfs rpool/zones/app0/ROOT/zbe-2 /zones/app0/root
  zoneadm -z app0 attach
  zoneadm -z app0 boot

And this works. Rebooting gets the right BE. But I have no idea why. The org.opensolaris.libbe:active property is 'on' for every one of those zbe datasets.

If it's moving between different revisions of OmniOS, it will patch when it's attached. To get all the updates, I do

  pkg -R /zones/app0/root update

This doesn't create a new zbe. I'm mildly concerned something won't be quite right in the future, as I can't see why it appears to be doing the right thing.

Thanks for any advice on how to do this properly!

Ben





More information about the OmniOS-discuss mailing list