Monday, August 5, 2013

solaris flar p2v

notes to self...
on your zone system, make sure you've got all the consistinuent packages;

# pkginfo | egrep brand

    system      SUNWs8brandr                     Solaris 8 Containers: solaris8 brand support (Root)
    system      SUNWs8brandu                     Solaris 8 Containers: solaris8 brand support (Usr)
    system      SUNWs9brandr                     Solaris 9 Containers: solaris9 brand support (Root)
    system      SUNWs9brandu                     Solaris 9 Containers: solaris9 brand support (Usr)

If not, then you need to download the proper patch set from Oracle.  Sadly, you need an OS subscription for that.

# pkgadd -d  s9containers-bundle/1.0/Product 
# pkgadd -d  s8containers-bundle/1.0/Product 
# pkgadd -d  s9containers-bundle/1.0.1/Product
# pkgadd -d  s8containers-bundle/1.0.1/Product

And... for flarcreate...

    109318-41 | 5.8
    109319-40 | 5.8_x86 

    113434-40 | 5.9 
    114196-38 | 5.9_x86


cool we're going to use flar & cpio

flarcreate -S -n s10-system -L cpio /net/target/export/s10-system.flar

or without compression:
flarcreate -R / -n engr -c -x /opt/flash /opt/flash/engr.flar


flar info s9-image.flar 
of importance:
s9-image.flar :    Flash Archive  2.0
files_archived_method=cpio 

this means we first have to use flar (2.0) to extract files.  and then those component files must be extracted using cpio.
morerover, flar 2.0 will tell you the os.  if using flar 1.0, well, you're prolly looking at a sol 5.8 image.

flar split -d /opt/s9-image.zone /opt/s9-image/s9-image.flar

cpio -idmv < /opts/s9-image/archive
cat s9-image.flar | cpio -ivt 

that's just extract

supposedly if you do this:

flar split -d /opt/s9-image.zone -f /opt/s9-image/s9-image.flar

the flar will be extracted complete

and then you can run:

zoneadm -z s9-image install -p -v -d /opt/s9-image.zone/archive

or -d -

that -d - is sort of important.  that says, use this directory, and oh by the way, it exists, so no copying stuff from there as specified in your previous zonecfg process.
and get your imaged system to install.  that -u means initialize the system so all that fun name, ip and auth system stuff is zapped.

No comments: