I had to migrate a running Solaris Zone (let's call it myZone) from host A to host B. The 2 hosts and the zone didn't have the same patches and packages. Making the zone running on host B was quite painfull. Follows how I did proceed (use it at your own risk).

  • On the source host (host A) :

    1. Copy the zone filesystem (the zone path) to the host B. Copy the file /etc/zones/myZone.xml to the host B's /tmp folder.

  • On the destination host (host B) :

    1. Attach the zone by issuing the command zoneadm attach -F -n /tmp/zoneName.xml 2>&1. This command will return packages and patches not matching the host B. Those lists are preceded by These packages installed on this system were not installed on the source system: for packages and These patches installed on this system were not installed on the source system: for patches.

    2. Add all the patches listed to the file /usr/lib/brand/native/bad_patches. After adding the pataches to the, reissuing the previous command should not complain about the missing pataches.

    3. Edit the file /etc/zones/index and add myZone:configured:zonePath: at the end of the file.

    4. Move the /tmp/zoneName.xml to /etc/zones/myZone.xml.

    5. Attach the zone using zoneadm -z myZone attach -u.

    6. Boot the by zoneadm -z zoneName boot. It should boot. If not, the config (network interface, mount points) should be adopted.

  • Once, the container has been successfully booted, the lines added to the file /usr/lib/brand/native/bad_patches on the host should be removed


Post your comment

Simple HTML markup is allowed.