1 Reply Latest reply: Mar 30, 2013 1:29 PM by wgkorb RSS

    How do I create a VNIC in a 1.2 LDOM?

    wgkorb
      I have a T2000 on which I am running multiple LDOMs using version 1.2 (the newest version that supports my hardware).
      # ldm -V
      Logical Domain Manager (v 1.2)
              Hypervisor control protocol v 1.3
              Using Hypervisor MD v 1.1
      
      System PROM:
              Hypervisor      v. 1.7.3.       @(#)Hypervisor 1.7.3.c 2010/07/09 15:14\015
              OpenBoot        v. 4.30.4.      @(#)OBP 4.30.4.b 2010/07/09 13:48
      I am running Solaris 11.1 on both the service domain & the guest domain. The guest domain will be running multiple web servers, and as such, needs multiple virtual network interfaces so I can have multiple IPs assigned to that domain.

      When I try to create a VNIC in the guest domain, it fails thusly:
      # dladm show-phys
      LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
      net0              Ethernet             up         0      unknown   vnet0
      net3              Ethernet             unknown    0      unknown   e1000g0
      net1              Ethernet             unknown    0      unknown   e1000g1
      # dladm create-vnic -l net0 vnic254
      dladm: vnic creation over net0 failed: operation failed
      After some searching, I discovered that this is not supported (creating VNICs in guest domains).

      I am, however, able to create a VNIC in the service domain:
      # dladm show-phys
      LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
      e1000g0           Ethernet             up         1000   full      e1000g0
      e1000g1           Ethernet             unknown    0      unknown   e1000g1
      vsw0              Ethernet             up         1000   full      vsw0
      # dladm create-vnic -l e1000g0 vnic254
      # ipadm create-ip vnic254
      # ipadm create-addr -T static -a 192.168.1.254/24 vnic254/v4address
      # dladm show-vnic
      LINK                OVER         SPEED  MACADDRESS        MACADDRTYPE       VID
      vnic254             e1000g0      1000   2:8:20:7d:18:d0   random            0
      # ipadm show-addr vnic254/v4address
      ADDROBJ           TYPE     STATE        ADDR
      vnic254/v4address static   ok           192.168.1.254/24
      Now that I have a VNIC with a v4 IP it seems to me I ought to somehow be able to assign it to the guest domain.

      Is this possible, or am I out of luck?

      Would this scenario be supported if I downgraded to Solaris 10? I obviously would rather not do that, but I absolutely require the ability to have multiple IPs in my guest domain.

      Thanks,
      Bill
        • 1. Re: How do I create a VNIC in a 1.2 LDOM?
          wgkorb
          OK, I found one possible solution, though I don't know if it's the best (or only) one.

          Instead of creating a VNIC in the service domain and assigning it to the guest, I created a new vnet for the guest.
          # ldm add-vnet vnic254 primary-vsw0 guest1
          # ldm ls-bindings guest1
          # ldm ls-bindings guest1             
          (snip)
          NETWORK
              NAME             SERVICE                     DEVICE     MAC               MODE   PVID VID                  MTU  
              vnet1            primary-vsw0@primary        network@0  00:14:4f:f9:42:52        1                         1500 
                  PEER                        MAC               MODE   PVID VID                  MTU  
                  primary-vsw0@primary        00:14:4f:f9:49:3c        1                         1500 
                  vnet1@guest2                00:14:4f:f8:46:29        1                         1500 
                  vnic254@guest1              00:14:4f:f9:a3:80        1                         1500 
              NAME             SERVICE                     DEVICE     MAC               MODE   PVID VID                  MTU  
              vnic254          primary-vsw0@primary        network@1  00:14:4f:f9:a3:80        1                         1500 
                  PEER                        MAC               MODE   PVID VID                  MTU  
                  primary-vsw0@primary        00:14:4f:f9:49:3c        1                         1500 
                  vnet1@guest2                00:14:4f:f8:46:29        1                         1500 
                  vnet1@guest1                00:14:4f:f9:42:52        1                         1500
          I was then able to configure the added IP in the guest.
          # dladm show-phys
          LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
          net0              Ethernet             up         0      unknown   vnet0
          net3              Ethernet             unknown    0      unknown   e1000g0
          net1              Ethernet             unknown    0      unknown   e1000g1
          net7              Ethernet             unknown    0      unknown   vnet1
          # ipadm create-ip net7
          # ipadm create-addr -T static -a 192.168.1.254/24 net7/v4address   
          # ipadm show-addr net7/v4address   
          ADDROBJ           TYPE     STATE        ADDR
          net7/v4address    static   ok           192.168.1.254/24
          # ifconfig net7
          net7: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
                  inet 192.168.1.254 netmask ffffff00 broadcast 192.168.1.255
                  ether 0:14:4f:f9:a3:80 
          So it works, and I can ping it from other domains & external machines.

          So is this the best solution? Is there any limit to this? Can I add 20 more IPs this way if I need to?

          Thanks,
          Bill