<div dir="ltr"><div><div><div><div>hi,<br><br></div>This is bugging me and cannot get it to work properly.<br><br></div>Disclaimer: I am no solaris old timer so all info I have on this is from the omnios wiki and my own trial and errors.<br>
<br></div>So I have an omnios real hardware host with just 1 physical nic (bge0):<br><br>root@zfstank:~# dladm show-phys<br>LINK         MEDIA                STATE      SPEED  DUPLEX    DEVICE<br>bge0         Ethernet             up         1000   full      bge0<br>
<br></div>To simplify my lab I would very much like to use dhcp for the hosts/vms/zones. I create vnics like this<br><br>
<code><pre># dladm create-vnic -l bge0 vnic1
<br></pre><pre>there it is:<br><br><code><pre># dladm show-vnic
LINK         OVER         SPEED  MACADDRESS        MACADDRTYPE         VID
vnic1        bge0         1000   2:8:20:ae:f6:c0   random              0<br><br></pre><pre>Then I create a zone and assign the vnic1 as a physical nic to it:<br><br></pre><pre><code><pre>global # zonecfg -z zone1
sapacc: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:sapacc> create
zonecfg:sapacc> set zonepath=/tank/zones/zone1
zonecfg:sapacc> set autoboot=false
zonecfg:sapacc> set ip-type=exclusive
zonecfg:sapacc> add net
zonecfg:sapacc:net> set physical=vnic1
zonecfg:sapacc:net> end
zonecfg:sapacc> verify
zonecfg:sapacc> commit
zonecfg:sapacc> exit</pre>Then I install the zone and I see the link:<br><br></code></pre><pre>zone 1# dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
vnic1       vnic      1500   up       --         ?<code></code></pre></code>Then I create an inteface and an address:<br>root@zone1:~# ipadm create-if vnic1<br>root@zone1:~# ipadm create-addr -T dhcp vnic1/v4<br>root@zone1:~# ipadm show-addr<br>
ADDROBJ           TYPE     STATE        ADDR<br>lo0/v4            static   ok           <a href="http://127.0.0.1/8">127.0.0.1/8</a><br>vnic1/v4          dhcp     ok           <a href="http://192.168.0.171/24">192.168.0.171/24</a><br>
lo0/v6            static   ok           ::1/128<br><br></pre><pre>And it works. Ok, let's reboot the zone, but now the address is disabled:<br><br># ipadm show-addr<br>ADDROBJ           TYPE     STATE        ADDR<br>lo0/v4            static   ok           <a href="http://127.0.0.1/8">127.0.0.1/8</a><br>
lo0/v6            static   ok           ::1/128<br>vnic1/v4          dhcp     disabled     ?<br><br></pre><pre>I cannot enable it either:<br># ipadm enable-addr vnic1/v4<br>ipadm: persistent operation not supported for enable-addr<br>
<br></pre><pre>Not really sure what the PERSISTENT -46 means:<br>root@zone1:~# ipadm show-if<br>IFNAME     STATE    CURRENT      PERSISTENT<br>lo0        ok       -m-v------46 ---<br>vnic1      ok       bm--------4- -46<br>
<br></pre><pre>Am I doing something wrong or is it just that zones are not supposed to use dhcp addresses?<br></pre></code><div><div><div><div><div><div><div><div>Thanks for your help.<br>--<br>Groeten,<br>natxo
</div></div></div></div></div></div></div></div></div>