[OpenIndiana-discuss] tip - moving different zones into different distros
Gabriele Bulfon
gbulfon at sonicle.com
Wed Jun 1 12:17:05 UTC 2016
Hi,
I'd like to share this experience of mine, maybe useful to someone else.
Just happened to work on moving old zones coming from old OI-like servers, with totally different and older origin pkg repos, into a fresh XStreamOS global zone.
I wanted to bring them into the latest XStreamOS, moving the datasets and updating the zones kernel without affecting specific application data/softwares, or at least have a chance to make them work in some way on the new system.
As you may already know, attaching and updating the old zones on the new system will try to bring pkg consistency of the zone to the current hosting global zone. This will fail in this case. Too different packagings and consolidations.
But I found this trick to work:
- zonecfg -z myzone: use it to configure the zone on the new system, then set zonepath to the path of the moved zone's zfs dataset
- zoneadm -z myzone attach -u: let the new system try to update the zone's dataset with the new global-zone pkg publisher, and then fail to update because of old pkg and others inconsistencies
- zoneadm -z myzone attach -F: force the zone into installed state and attach without checks
- pkg update -r -z myzone : let the global zone take care of updating the zone packages through its own lates pkg, bringing kernel binaries, libs and boot-environment consistent with the global zone
- zfs set mountpoint=legacy [myzone-dataset-ROOT-zbe] : this is necessary because previous commands left the zbe dataset in a mounted and non-legacy state, which won't let you boot the zone
- zoneadm -z myzone boot
Now zlogin into the zone and check that the system is running on latest kernel!
Sure, you may find software that is not running because of different libraries, but this can be addressed once moved.
I had no problem at all, as all the running software is under its own directory, with its own libs, and few system libs dependencies that were happily resolved.
Gabriele
----------------------------------------------------------------------------------------
Sonicle S.r.l.
:
http://www.sonicle.com
Music:
http://www.gabrielebulfon.com
Quantum Mechanics :
http://www.cdbaby.com/cd/gabrielebulfon
More information about the openindiana-discuss
mailing list