Well, I have to admit I sort of failed in this one ...
zoneadm clone
wasn't really an option as I need to have freedom creating and destroying snapshots on both zones. zoneadm clone -m copy
probably never worked. I spent a lot of time with zfs send|zfs receive, esp. with the idea of
# /usr/sbin/zfs snapshot -r tank/zones/build@1movebut it never worked. I spent hours trying, looking into the scripts in
# /usr/sbin/zfs send tank/zones/build/ROOT/zbe@1move > build.backup
# zfs create tank/zones/debugbuild
# zonecfg -z debugbuild
zonecfg:debugbuild> export
create -b
set zonepath=/tank/zones/debugbuild
set brand=ipkg
set autoboot=true
set ip-type=shared
add fs
set dir=/home
set special=/export/home
set type=lofs
end
add net
set address=10.10.2.44
set physical=e1000g0
end
# cat build.backup|zoneadm -z debugbuild attach -r zfs
/usr/lib/brand/ipkg/
, but it was probabaly not meant to be working anyway.So in the end I hacked it like this:
# /usr/sbin/zfs snapshot -r tank/zones/build@1move
# /usr/sbin/zfs send tank/zones/build/ROOT/zbe@1move > build.backup
# zfs create tank/zones/debugbuild
# chmod 700 tank/zones/debugbuild
# zonecfg -z debugbuild
# zoneadm -z debugbuild install
# cat build.backup| pfexec /usr/sbin/zfs receive -F tank/zones/debugbuild/ROOT/zbe@1test
# zoneadm -z debugbuild boot
Not really a clean way, since I had to waste some extra bandwidth and time, but a working one.
No comments:
Post a Comment