Hi Cody, Thanks for jumping in to help.
1- I tried "resolvers" (second gist), it failed validation. 2- Thanks for the inittab option. I started down some path that eventually might have gotten me there, but you just saved me a good chunk of time. Is there expectation that dhcp support for DNS will work eventually? 3- The gateway didn't get set. What am I missing there? On Fri, Dec 11, 2015 at 2:31 AM, Cody Mello <[email protected]> wrote: > Hi Avi, > > The first gist is what you want to do, but you'll want to set "resolvers". > The "dhcp" option in "ips" will set the IP address and the gateway, but > will not update /etc/resolv.conf for you. (This is true for both SmartOS > and LX zones.) If you'd prefer to get the DNS server via DHCP, you could > probably do the following: > > - Copy /etc/dhcp/inittab from a SmartOS zone into your LX zone so you can > use dhcpinfo(1M) > - Create an /etc/dhcp/eventhook script that runs '/native/sbin/dhcpinfo > DNSserv' to get the DNS server's address > - Create a nameserver entry in /etc/resolv.conf > > I haven't tried it out, but I believe that that would work for you. You > can take a look at dhcpagent(1M) for information on writing eventhook > scripts. > > - Cody > > On Wed, Dec 9, 2015 at 1:25 AM, Avi Deitcher <[email protected]> wrote: > >> I am not booted into the global zone right now (had to give the perf test >> server back for a while), but the ISO is smartos-20151126T062747Z.iso >> >> So the build looks like 20151126. I cannot boot into it for a while now, >> but I can mount the iso and look at files (of course the kernel is just a >> file named "unix"). >> >> Here is the one that successfully loads a zone, but no gateway or >> resolvers: >> >> https://gist.github.com/deitch/a760b969bfc535eae4d6 >> >> >> I also tried things like: >> >> https://gist.github.com/deitch/57fb2b68b7cff6dd8314 >> >> As well as "gateways":["dhcp"] and "resolvers":["dhcp"] and everything I >> could think of. Everything except the first fails "vmadm validate create -f >> " >> >> >> On Wed, Dec 9, 2015 at 10:20 AM, Cody Mello <[email protected]> wrote: >> >>> More specifically, support for DHCP was added in the 20151013 release in >>> OS-4741: >>> >>> https://smartos.org/bugview/OS-4741 >>> >>> On Wed, Dec 9, 2015 at 12:19 AM, Cody Mello <[email protected]> wrote: >>> >>>> Hi Avi, >>>> >>>> What release are you using? (You can check with 'uname -v'.) Support >>>> for DHCP in LX was added recently and should work by setting "ip" to "dhcp" >>>> or "ips" to [ "dhcp" ]. "gateway" and "gateways" should be set to an IPv4 >>>> address (with support for IPv6 addresses at some point in the future). >>>> >>>> Can you upload the JSON you're using somewhere, so that I can take a >>>> look at what values your using? >>>> >>>> - Cody >>>> >>>> >>>> On Wed, Dec 9, 2015 at 12:13 AM, Avi Deitcher <[email protected]> wrote: >>>> >>>>> Does DHCP work in LX-branded zones (using centos 6 images)? >>>>> >>>>> I managed to get the nic to accept an IP address, but: >>>>> >>>>> - the DNS resolvers from IP are not accepted >>>>> - the default gateway is not entered >>>>> >>>>> If I try to manually add the gateway and resolvers (bad idea, but just >>>>> to get it to work), I get json validation errors. >>>>> >>>>> # vmadm validate create -f centos66.json >>>>> Invalid JSON payload: Unexpected token >>>>> >>>>> Same is true if I put "resolvers" in the root or individual NIC, >>>>> "gateway" or "gateways" in root or individual NIC. Same is true if I put >>>>> actual gateway IP or "gateway":"dhcp" >>>>> >>>>> Within the zone I cannot use the usual Linux tools to manage it either >>>>> (ip link, ip route, etc.). >>>>> >>>>> What level of DHCP support exists? >>>>> >>>>> (please reply-all) >>>>> >>>>> -- >>>>> Avi Deitcher >>>>> [email protected] >>>>> Follow me http://twitter.com/avideitcher >>>>> Read me http://blog.atomicinc.com >>>>> *smartos-discuss* | Archives >>>>> <https://www.listbox.com/member/archive/184463/=now> >>>>> <https://www.listbox.com/member/archive/rss/184463/27398174-11508a73> >>>>> | Modify >>>>> <https://www.listbox.com/member/?&> >>>>> Your Subscription <http://www.listbox.com> >>>>> >>>> >>>> >>> >> >> >> -- >> Avi Deitcher >> [email protected] >> Follow me http://twitter.com/avideitcher >> Read me http://blog.atomicinc.com >> > > -- Avi Deitcher [email protected] Follow me http://twitter.com/avideitcher Read me http://blog.atomicinc.com ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
