Thanks for the quick response! :)
I actually found the solution to my problem quickly after sending this mail.
First time ever using a Solaris based OS and I was so focused on it that I totally overlooked the KVM side. By default 'no-mac-spoofing' was enabled for my SmartOS VM blocking the vnic traffic from the zone.
Disabled the filter and everything works as expected. :)

On 04/02/2018 11:01 PM, Gjermund Gusland Thorsen wrote:
Here is a zone file I use as template for my zones: cat /opt/samba01.json
{
  "brand": "joyent",
  "image_uuid": "390639d4-f146-11e7-9280-37ae5c6d53d4",
  "alias": “sn05samba07",
  "hostname": "sn05samba07",
  "max_physical_memory": 512,
  "quota": 20,
  "resolvers": [
    "10.2.198.109",
    "208.67.222.222",
    "208.67.220.220"
  ],
  "nics": [
    {
      "nic_tag": "admin",
      "ip": "10.2.198.11",
      "netmask": "255.255.255.0",
      "gateway": "10.2.198.1"
    }
  ],
  "internal_metadata": {
    "root_pw": “banana",
    "admin_pw": “pancake"
  },
  "customer_metadata": {
    "root_authorized_keys": "ssh-rsa AAAAsomeHashGarbleFromYourPublicKey username@node",     "user-script": "/usr/sbin/mdata-get root_authorized_keys > ~root/.ssh/authorized_keys ; /usr/sbin/mdata-get root_authorized_keys > ~admin/.ssh/authorized_keys"
  },
  "delegate_dataset": true
}

To find the opendns IPs: curl -kL http://opendns.org | grep 208

I believe you can remove internal_metadata as I never used that anyways, much better to have PSK working.

G

On 2 Apr 2018, at 22:49, Benjamin Beier <[email protected] <mailto:[email protected]>> wrote:

Hello,

tried to use SmartOS as KVM guest today to see if it fits my needs.
Looks really great so far, but I am struggling with the networking part.

I have configured an IP on SmartOS installation and set a gateway IP outside of KVM with internet access. That worked perfectly fine and I started a base-64 zone with an IP address within the same subnet. My assumption was it would use something like a bridge to connect the virtual interface with the SmartOS interface.

Now the situation is the following:
Ping SmartOS -> Gateway: *OK*
Ping SmartOS -> Base-64-Zone: *OK*
Ping Base-64-Zone -> Gateway: *FAIL*
Ping Gateway -> Base-64-Zone: *FAIL*

Gateway is 10.159.9.1/24
SmartOS is 10.159.9.110/24
Base-64 is 10.159.9.200/24

Used the dladm tool to see if I can get it to work somehow without success.

[root@smartos1 ~]# dladm show-phys
LINK         MEDIA                STATE      SPEED DUPLEX    DEVICE
vioif0       Ethernet             up         1000 full      vioif0

[root@smartos1 ~]# dladm show-vnic
LINK         OVER       SPEED MACADDRESS MACADDRTYPE VID  ZONE
net0         vioif0     0     12:51:b6:c7:7c:41 fixed       0    64a26b0b-a7d1-60b7-81a7-bceebf5b1dba

[root@smartos1 ~]# dladm show-link
LINK        CLASS     MTU    STATE    BRIDGE     OVER
vioif0      phys      1500   up       --         --
net0        vnic      1500   ?        --         vioif0

root@engine:~# cat test1-zone.json
{
 "brand": "joyent",
 "image_uuid": "390639d4-f146-11e7-9280-37ae5c6d53d4",
 "alias": "test1",
 "hostname": "test1",
 "max_physical_memory": 512,
 "quota": 4,
 "resolvers": ["8.8.8.8", "8.8.4.4"],
 "nics": [
  {
    "nic_tag": "admin",
    "ip": "10.159.9.200",
    "netmask": "255.255.255.0",
    "gateway": "10.159.9.1"
  }
 ],
 "internal_metadata":
  {
    "root_pw": "...",
    "admin_pw": "..."
  }
}

Also found some info about protections and tried to deactivate those:
dladm reset-linkprop -z 64a26b0b-a7d1-60b7-81a7-bceebf5b1dba -p protection net0

Still not working... :/
Maybe someone else already used a similar setup and knows how to fix it?

Many thanks!
Benni


*smartos-discuss* | Archives <https://www.listbox.com/member/archive/184463/=now> | Modify <https://www.listbox.com/member/?&;> Your Subscription [Powered by Listbox] <http://www.listbox.com>





-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to