Solaris 11 Express upgrade to Solaris 11/11

Solaris 11/11 has been out for some time I've been slow to move. Mostly the Solaris 11 express I run know works well and fits my needs so I have not need to upgrade. However I'm working on some side project and some software is going to need complied, that and I figured I need to keep my hand in so best move up to the current release.

So should be pretty straight forward:
# mount neo:/ISO /mnt
# lofiadm -a /ISO/Oracle/sol-11-1111-repo-full.iso
# mount -F hsfs /dev/lofi/1 /mnt2
# pkg set-publisher -G http://192.168.0.31/ -g file:///mnt2/repo solaris
# pkg update --accept --be-name Solaris_11_11
Don't forget to tiddy up:
umount /mnt2
# lofiadm -d /ISO/Oracle/sol-11-1111-repo-full.iso
# umount /mnt
Check my new BE is there and restart:
# beadm list
# init 6
Quick look on the console as is starting up some SMF upgrade messages, no errors messages so we might have success. VNC is still working , so all look ok. Zpool needs upgrading but I might hold off on the for now just in case I need to move back. Hmm small issue zone boot layout needs to be converted and it's a one way deal. I only have one zone I want to keep here and thats the one the servers my repo.

Ok bite the bullet just convert it:

# /usr/lib/brand/shared/dsconvert jones
jones: Creating zone rpool dataset
jones: Creating zone export dataset
jones: Creating zone export/home dataset
jones: Creating zone ROOT dataset
jones: Cloning datasets from ROOT to rpool/ROOT
jones: Remounting zone at /zones/jones/root

NOTICE: zone jones needs to be updated with attach -u
Run: "zoneadm -z jones detach" to detach, then
Run: "zoneadm -z jones attach -u" to attach.

jones: Removing obsolete datasets
promoting 'rpool/zones/jones/rpool/ROOT/zbe-4'.
promoting 'rpool/zones/jones/rpool/ROOT/zbe-3'.
promoting 'rpool/zones/jones/rpool/ROOT/zbe-2'.
promoting 'rpool/zones/jones/rpool/ROOT/zbe-1'.
promoting 'rpool/zones/jones/rpool/ROOT/zbe'.
jones: Converting dataset aliases

jones: Verifying zone with zoneadm

jones: Checking for potential configuration conflicts

jones: Conversion complete
And that's where things start to go pair shaped. Attached failed... ah yep I recall this from the last time need to remount the local file repo. In hind sight if would seem now silly to have the repo in a zone. I read during my last 11 express SRU update that the pkg repp server needs to be at the same OS version as the package it was servering, so I go through this strange update process of updating the global from a file repo and then needing to update the zone via detach attach process ... kind of makes it pointless to have a repo.

Anyway proceed and reattach:

mount /mnt/Oracle/sol-11-1111-repo-full.iso /mnt2
mount -F hsfs /mnt/Oracle/sol-11-1111-repo-full.iso /mnt2
zoneadm -z jones attach -u
Failed again ... check the log something about system publisher in maintenance ok clear that
svcadm clear svc:/application/pkg/system-repository
Ok try again, failed hmm Image format already up to date

Image format already current.
ERROR: Updating image format failed
... ok lets just attach then

Updating image format
ERROR: Updating image format failed
Result: Attach Failed.
... Oh please give me strength, already updated, then failed to update got to love the error messages. At this point I'm thinking ok it's just my repo I could just scrape it. Still should fix it, best take a look in the log file.

Updating image format
pkg: 0/1 catalogs successfully updated:

Framework error: code: 7 reason: Failed connect to localhost:80; Connection refused
URL: 'http://localhost/versions/0/'.
Hmm the zone is using it's own pkg repo to update which is of course it's self since the zone is my repo server.

Ok so here is the problem:
# pkg -R /zones/jones/root publisher                               
PUBLISHER TYPE STATUS URI
solaris (syspub) origin online http://localhost/
solaris (syspub) origin online http://localhost:1008/solaris/79680b7ee82a9c8eeb3e86d7e17dfabb67cf0cfe/
After much messing around and reading the man page to understand the nuances of setting and unsetting publisher, especial system ones, I eventual figure out out to remove the offending publisher

pkg -R /zones/jones/root set-publisher -G http://localhost/ solaris
Bingo Update on attach now works.