<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>funcptr - OpenSolaris</title>
    <subtitle>An engineer&#x27;s technical notebook</subtitle>
    <link rel="self" type="application/atom+xml" href="https://funcptr.net/os/opensolaris/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://funcptr.net/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2009-02-21T00:10:26+00:00</updated>
    <id>https://funcptr.net/os/opensolaris/atom.xml</id>
    <entry xml:lang="en">
        <title>Hosting NFS shares from a Zone</title>
        <published>2009-02-21T00:10:26+00:00</published>
        <updated>2009-02-21T00:10:26+00:00</updated>
        
        <author>
          <name>
            
              Delta Regeer
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://funcptr.net/2009/hosting-nfs-shares-from-a-zone/"/>
        <id>https://funcptr.net/2009/hosting-nfs-shares-from-a-zone/</id>
        
        <content type="html" xml:base="https://funcptr.net/2009/hosting-nfs-shares-from-a-zone/">&lt;p&gt;I am currently trying to get my web development environment all set up.
While I like using vi, I really do prefer TextMate on my Mac OS X to do
the real heavy lifting and all of the editing.&lt;&#x2F;p&gt;
&lt;p&gt;As I was working on getting my homedir on my zone to be shared over NFS I
was getting errors that NFS was not a valid protocol from &lt;code&gt;sharemgr&lt;&#x2F;code&gt;, the
program that is used to add new shares to the system.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:~# sharemgr create -P nfs homedir  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Invalid protocol specified: nfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A little bit of Googling brought me to a mailing list message saying that
some server packages may be missing. This is entirely possible since my
Zone was created with a minimal set of packages, so I log into the global
host where NFS sharing does work and run the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@Keyhole.network.lan:~# pkg list | grep nfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SUNWnfsc                                      0.5.11-0.101    installed  ----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SUNWnfsckr                                    0.5.11-0.101    installed  ----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SUNWnfss                                      0.5.11-0.101    installed  ----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SUNWnfsskr                                    0.5.11-0.101    installed  ----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Ah, so those are probably not installed in the zone, quick &lt;code&gt;pkg install&lt;&#x2F;code&gt;
later:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:~# pkg install SUNWnfsc SUNWnfsckr SUNWnfss SUNWnfsskr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DOWNLOAD                                    PKGS       FILES     XFER (MB)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Completed                                    3&#x2F;3       17&#x2F;17     0.28&#x2F;0.28 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PHASE                                        ACTIONS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Install Phase                                  55&#x2F;55 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PHASE                                          ITEMS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Reading Existing Index                           9&#x2F;9 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Indexing Packages                                3&#x2F;3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, lets re-run the &lt;code&gt;sharemgr&lt;&#x2F;code&gt; command again and see if this time we do
indeed get our group created:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:~# sharemgr create -P nfs homedir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:~# sharemgr show -vp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;default nfs=()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;homedir nfs=()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Yes, there we go. Now I can add a share to that group. Until more errors
start showing up:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:~# sharemgr add-share -s &#x2F;export&#x2F;home&#x2F;xistence&#x2F; homedir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NFS: Cannot share remote filesystem: &#x2F;export&#x2F;home&#x2F;xistence&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NFS: Service needs to be enabled by a privileged user&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Failed to enable share for &amp;quot;nfs&amp;quot;: system error&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This time Google does not help out, instead it gives me the option to
search without quotes around the search terms which gives me absolutely
nothing.&lt;&#x2F;p&gt;
&lt;p&gt;Well, lets see if the services are running in the first place:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:~# svcs -a | grep nfs    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;disabled       22:19:04 svc:&#x2F;network&#x2F;nfs&#x2F;client:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;disabled       22:24:26 svc:&#x2F;network&#x2F;nfs&#x2F;server:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;online         22:24:20 svc:&#x2F;network&#x2F;nfs&#x2F;rquota:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;online         22:24:20 svc:&#x2F;network&#x2F;nfs&#x2F;status:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;online         22:24:20 svc:&#x2F;network&#x2F;nfs&#x2F;mapid:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;online         22:24:20 svc:&#x2F;network&#x2F;nfs&#x2F;cbd:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;online         22:24:21 svc:&#x2F;network&#x2F;nfs&#x2F;nlockmgr:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Nope, for some reason the nfs server keeps being disabled even though I
did enable it using &lt;code&gt;svcadmin&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Okay, lets take a look with &lt;code&gt;svcs&lt;&#x2F;code&gt; what is going on:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:&#x2F;# svcs -l nfs&#x2F;server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;fmri         svc:&#x2F;network&#x2F;nfs&#x2F;server:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;name         NFS server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;enabled      false (temporary)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;state        disabled&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;next_state   none&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;state_time   Fri Feb 20 22:25:26 2009&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;logfile      &#x2F;var&#x2F;svc&#x2F;log&#x2F;network-nfs-server:default.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;restarter    svc:&#x2F;system&#x2F;svc&#x2F;restarter:default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;contract_id  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   require_any&#x2F;error svc:&#x2F;milestone&#x2F;network (online)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   require_all&#x2F;error svc:&#x2F;network&#x2F;nfs&#x2F;nlockmgr (online)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   optional_all&#x2F;error svc:&#x2F;network&#x2F;nfs&#x2F;mapid (online)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   require_all&#x2F;restart svc:&#x2F;network&#x2F;rpc&#x2F;bind (online)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   optional_all&#x2F;none svc:&#x2F;network&#x2F;rpc&#x2F;keyserv (disabled)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   optional_all&#x2F;none svc:&#x2F;network&#x2F;rpc&#x2F;gss (absent)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   optional_all&#x2F;none svc:&#x2F;network&#x2F;shares&#x2F;group (multiple)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dependency   require_all&#x2F;error svc:&#x2F;system&#x2F;filesystem&#x2F;local (online)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Ah, it has a log file, lets see what that log file says:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:&#x2F;# cat &#x2F;var&#x2F;svc&#x2F;log&#x2F;network-nfs-server\:default.log &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ Feb 20 22:11:07 Disabled. ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ Feb 20 22:11:07 Rereading configuration. ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ Feb 20 22:18:43 Enabled. ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ Feb 20 22:19:04 Enabled. ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ Feb 20 22:24:21 Executing start method (&amp;quot;&#x2F;lib&#x2F;svc&#x2F;method&#x2F;nfs-server start&amp;quot;). ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;The NFS server is not supported in a local zone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Eh? What? That seems weird, but it is of course plausible. Zones are new
to Solaris and thus not everything may be virtualised yet. Taking that
query to google brings me to a web page asking the same question I am
asking: Local zone as NFS server. Taking a look it brings me to a bug
report and ultimately to: Bug ID 4964859 RFE: Zones should be able to be
NFS servers. Well, I guess that ends that little stunt. I will be sharing
it from the global zone. While this is acceptable to me, I do not believe
that it is acceptable to most other people using Zones, and while it is
unfortunate but it does not look like there is a whole lot of activity on
the bug, as apparently there are no resources available.&lt;&#x2F;p&gt;
&lt;p&gt;I ended up doing the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sharemgr create -P nfs webdev-homedir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then I followed that up with some servers that should be allowed access,
and others that should not:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sharemgr set -P nfs -S sys -p &amp;#39;rw=10.10.10.226 none=*&amp;#39; webdev-homedir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And then finally I added the share I wanted to share all along:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sharemgr add-share -r &amp;quot;homedir&amp;quot; -d &amp;quot;xistence home dir&amp;quot; -s &#x2F;storage&#x2F;zones&#x2F;dev-web&#x2F;root&#x2F;export&#x2F;home&#x2F;xistence webdev-homedir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This creates a long NFS share to type in, since the full path now becomes:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;nfs:&#x2F;&#x2F;keyhole&#x2F;storage&#x2F;zones&#x2F;dev-web&#x2F;root&#x2F;export&#x2F;home&#x2F;xistence&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Which is not that big of a problem for me, especially since I just save
it in my favourites in Mac OS X and everything is peachy. It works like a
charm.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Upgrading an OpenSolaris ipkg zone</title>
        <published>2009-01-18T00:10:02+00:00</published>
        <updated>2009-01-18T00:10:02+00:00</updated>
        
        <author>
          <name>
            
              Delta Regeer
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://funcptr.net/2009/so-you-want-to-upgrade-your-zone/"/>
        <id>https://funcptr.net/2009/so-you-want-to-upgrade-your-zone/</id>
        
        <content type="html" xml:base="https://funcptr.net/2009/so-you-want-to-upgrade-your-zone/">&lt;p&gt;Recently I was working on my OpenSolaris machine (file server, ZFS rocks, will
write more on that later), and I have one non-global zone, one that use for web
development, which is aptly called dev-web.&lt;&#x2F;p&gt;
&lt;p&gt;So the following shows up when I run zoneadm:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# zoneadm list -iv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ID NAME             STATUS     PATH                           BRAND    IP    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   0 global           running    &#x2F;                              native   shared&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   4 dev-web          running    &#x2F;storage&#x2F;zones&#x2F;dev-web         ipkg     shared&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The thing is, I had upgraded the global zone with the latest update available for the version (&lt;code&gt;snv_101b&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;font-style: italic;&quot;&gt;pkg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECC48D;&quot;&gt; image-update&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; -v&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This had not upgraded my one none-global zone. And running &lt;code&gt;pkg image-update&lt;&#x2F;code&gt;
from within the zone itself is not possible, because you can&#x27;t do an upgrade on
a &quot;live&quot; system, mainly because the &lt;code&gt;image-update&lt;&#x2F;code&gt; wants to create a new bootable
environment, something that was already created when I upgraded the global
zone. So what we have to do is mount the non-global zone to &lt;code&gt;&#x2F;mnt&lt;&#x2F;code&gt; and tell &lt;code&gt;pkg&lt;&#x2F;code&gt;
with &lt;code&gt;-R&lt;&#x2F;code&gt; where to find it and upgrade it anyway!&lt;&#x2F;p&gt;
&lt;p&gt;First we are going to halt the current zone, important is running on the test
system, I just used:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;font-style: italic;&quot;&gt;zoneadm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; -z&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECC48D;&quot;&gt; dev-web halt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;However, the better way is to off course use the shutdown command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;font-style: italic;&quot;&gt;zlogin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECC48D;&quot;&gt; dev-web shutdown&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and then for good measure a halt!&lt;&#x2F;p&gt;
&lt;p&gt;Next up, looking at what we are going to be mounting.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# zfs list&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NAME                               USED  AVAIL  REFER  MOUNTPOINT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool                             11.9G  42.7G    75K  &#x2F;rpool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;ROOT                        2.93G  42.7G    18K  legacy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;ROOT&#x2F;opensolaris            7.34M  42.7G  2.74G  &#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;ROOT&#x2F;opensolaris-1          2.92G  42.7G  2.74G  &#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;dump                        1.87G  42.7G  1.87G  -&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;export                      5.27G  42.7G    19K  &#x2F;export&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;export&#x2F;home                 5.27G  42.7G    21K  &#x2F;export&#x2F;home&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;export&#x2F;home&#x2F;guest           5.24G  14.8G  5.24G  &#x2F;export&#x2F;home&#x2F;guest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;export&#x2F;home&#x2F;xistence        37.0M  42.7G  37.0M  &#x2F;export&#x2F;home&#x2F;xistence&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rpool&#x2F;swap                        1.87G  43.0G  1.51G  -&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage                            493G  3.08T  35.1K  &#x2F;storage&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;media                      398G  3.08T   398G  &#x2F;storage&#x2F;media&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;virtualbox                2.10G  3.08T  2.10G  &#x2F;storage&#x2F;virtualbox&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;xistence                  91.7G  3.08T  91.7G  &#x2F;storage&#x2F;xistence&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;zones                      957M  99.1G  30.4K  &#x2F;storage&#x2F;zones&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;zones&#x2F;dev-web              957M  19.1G  32.0K  &#x2F;storage&#x2F;zones&#x2F;dev-web&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;zones&#x2F;dev-web&#x2F;ROOT         957M  19.1G  28.8K  legacy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;zones&#x2F;dev-web&#x2F;ROOT&#x2F;zbe    1.60M  19.1G   936M  legacy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;storage&#x2F;zones&#x2F;dev-web&#x2F;ROOT&#x2F;zbe-1   955M  19.1G   935M  legacy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When &lt;code&gt;pkg image-update&lt;&#x2F;code&gt; was run on the global zone it created a new bootable
environment named opensolaris-1, the cool thing is, that &lt;code&gt;beadm&lt;&#x2F;code&gt; at the same time
will also create a new bootable environment for your zones. That way you can
upgrade your zones afterwards, and if stuff does not work, you can revert the
ENTIRE machine back to the previous state (ZFS is cool like that), thereby also
making sure that your zones are reverted so that there are no
incompatibilities.&lt;&#x2F;p&gt;
&lt;p&gt;So what we are looking for in this case is a zbe-1, this is the new root for
the zone that we need to update, so we now need to mount it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;font-style: italic;&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; -F&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECC48D;&quot;&gt; zfs storage&#x2F;zones&#x2F;dev-web&#x2F;ROOT&#x2F;zbe-1 &#x2F;mnt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Note, that there is no &lt;code&gt;&#x2F;&lt;&#x2F;code&gt; in front of storage, this is because we are specifying
a pool name, since there is no &quot;real&quot; path that is defined as
&lt;code&gt;&#x2F;storage&#x2F;zones&#x2F;dev-web&#x2F;ROOT&#x2F;zbe-1&lt;&#x2F;code&gt;. Now that it is mounted, we are able to pass
the -R flag to pkg, to get it to update our zone:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# pkg -R &#x2F;mnt image-update -v&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Creating Plan &#x2F; Before evaluation:     &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;UNEVALUATED:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;+pkg:&#x2F;entire@0.5.11,5.11-0.101:20081204T010954Z&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;After evaluation:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pkg:&#x2F;entire@0.5.11,5.11-0.101:20081119T235706Z -&amp;gt; pkg:&#x2F;entire@0.5.11,5.11-0.101:20081204T010954Z&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Actuators:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;None&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PHASE                                        ACTIONS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Update Phase                                     1&#x2F;1 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PHASE                                          ITEMS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Reading Existing Index                           9&#x2F;9 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Indexing Packages                                1&#x2F;1 &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---------------------------------------------------------------------------&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NOTE: Please review release notes posted at:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   http:&#x2F;&#x2F;opensolaris.org&#x2F;os&#x2F;project&#x2F;indiana&#x2F;resources&#x2F;relnotes&#x2F;200811&#x2F;x86&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---------------------------------------------------------------------------&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Voilá, and the deed is done. The last command is to off course unmount the
zone, that we can then issue a zoneadm boot command to start it back up:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;font-style: italic;&quot;&gt;umount&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECC48D;&quot;&gt; &#x2F;mnt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #82AAFF;font-style: italic;&quot;&gt;zoneadm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #82AAFF;&quot;&gt; -z&lt;&#x2F;span&gt;&lt;span style=&quot;color: #ECC48D;&quot;&gt; dev-web boot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And then on the zone after we log into it (over SSH in my case):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D6DEEB; background-color: #011627;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xistence@webdev.network.lan:~# pkg list -u&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;No installed packages have available updates&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Which is exactly what we wanted! Your zone is now upgraded with the latest
version available from the global zone.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
