Adding multiple virtual interfaces on a non global zone.

Hello All,
I have a requirement to add multiple virtual interfaces on a non-global zone (Solaris 10). The global zone is a 2 node Veritas Cluster Server. So, my question is do we have to make any modifications to the cluster config (which I think should not be the case)? Can anyone help with me the steps for adding the interfaces?

=====================================================
# zoneadm list -iv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
2 mach41 running /zones/mach41 solaris9 shared

  • mach35 installed /zones/mach35 solaris9 shared

# hastatus -sum
-- SYSTEM STATE
-- System State Frozen
A mach72 RUNNING 0
A mach73 RUNNING 0
-- GROUP STATE
-- Group System Probed AutoDisabled State
B ClusterService mach72 Y N OFFLINE
B ClusterService mach73 Y N OFFLINE
B NetworkSG mach72 Y N ONLINE
B NetworkSG mach73 Y N ONLINE
B mach35 mach72 Y N OFFLINE
B mach35 mach73 Y N ONLINE
B mach41 mach72 Y N ONLINE
B mach41 mach73 Y N OFFLINE

As can be seen from the above command output, I need to add virtual interfaces to the systems mach35 and mach41.

Thanks in advance.

Regards,
Mahive.

Do you use VCS for controlling the zone? Unless VCS has to control/monitr the interface I see no reason why you have to add configuration on VCS. Treat your virtual machine as a physical machine and configure virtual interface. When you boot a zone, interfaces will be started.
Create hosyname.{interface}:1 file with IP address required and restart zone.
to setup virtual IP on runnign zone

ifconfig {interface}:1 plumb
ifconfig {interface:1  {IP} netmask {mask} up

If you want to add a virtual interface to a zone, you do it with the zonecfg command. If you also want the interface to be set without waiting for a zone reboot, use the ifconfig command that way:

ifconfig ce0 addif 192.168.1.2 zone zonename netmask 255.255.255.0 up

Hello,
Thanks a lot to all of you for helping me with this.

The reason for having VCS is that the local zones host internet sites. Hence having VCS would have high availability.

My concern is when I add the virtual interfaces as suggested by Jlliagre, will the zones file be updated?

"ifconfig ce0 addif 192.168.1.2 zone zonename netmask 255.255.255.0 up"

Regards,
Mahive.

As I wrote but perhaps it wasn't clear enough, they aren't updated. You need to use the zonecfg command to have the zone files updated (or directly edit them).

Hello,
Ok, so I intend to do the following:

# zonecfg -z <zonenname>
then add net; insert the ip addresses;verify and commit.

I would then manuall copy the /etc/zones/zones.xml file to the other node to have the same copy of the zone.

Now my question is, once I make these changes, will the newly added ip addresses be plumbed on my local zones? Does giving an "ifconfig -a" on the global zone will show the newly added ip addresses as wel? Also in an event, that the cluster failovers (global zone), will the newly added ip addresses be shown as up in the other node?

Thanks for showing patience with me :slight_smile:

Thanks&Regards,
Mahive.

I was answering about how to add multiple interfaces on a non global zone.
I have no idea about if it is supported or not with any clustering software. You might better ask to your software vendor about it to make sure it doesn't have side effects.

provided that they are of the same h/w architecture with same network drivers etc, technically it should work.

Hi,

Firstly, your question isnt too clear here, so not 100% sure what your asking, so will take a guess.

Zones - You have two types of Network configurations, shared / exclusive. During the configuration of shared NIC, you will defined card / ip / netmask via zonecfg, so once the zone is up, the card / network nic will be up and running. Exclusive is different and all you do is define the NIC that will be `exclusively` used within the zone. Once up, you will then need to configure the card like any other normal environment, i.e. /etc/hosts, /etc/hostname.nxge1, /etc/defaultrouter etc etc etc. Then this will be automatic on every reboot on the zone.

Exclusive IP
dladm to see what devices are there
zonecfg:myzone> set ip-type=exclusive
zonecfg:myzone> add net
zonecfg:myzone:net> set physical=e1000g1
zonecfg:myzone:net> end

Shared IP

add net
set address=XX.30.188.XX/24
set physical=nxge4
end

Next point, copying of the /etz/zones/index file. Ok, yes Ive done this, but you are not really meant to do this due to the uid given to the zone. ALso, its the zonename.xml which is also important. Ive copied zones, mainly for DR purposes. I tend to build / define a zone, get it up and running and in a state that its working / configured. I then shut it down, detach it, dump the configuration to a file, and copy over the file / dump of the environment to the target DR server. I then copy the dump into the desired location, create the new zone usin g the zonecfg dump configuration file, but renaming it accordingly, then attach the zone.

The attach part gets over the zoneadm -z xxxxx install part, where the new zone is built. By attaching it, it tells the zoneadm that there's already an environment there, to attach to.

Here, command wise, is what I would do.

1) Backup zone you want to copy, detach zone first
global# zoneadm -z zfszone1 detach / remember to attach afterwards
]2) create copy
global# tar / cpio the directory of the source zone to target location
The source zone is just a directory with all the files in, so just get it copied over to the new location, whether on the same host under a new name, or a dfifferent hot
3) attach zone / create new zone
zonecfg -z zfszone2
zonecfg:zfszone2> create -a /zone_roots/zfszone2
zonecfg:zfszone2> exit
4) attach and boot zone
global# zoneadm -z zfszone2 attach
If on a different host, then the attach part will check versions / patches etc. You will need to alter the ip / hostname as it�s a copy

Hope the above helps.

you just need to modify your /etc/zones/zonename.xml file.

zonecfg -z zonename
add net
set physical=ce0
set address=x.x.x.x

or you can just vi the file in /etc/zones and you should be fine as well.

Hello Friends,
Today I got the downtime to check whether on a switchover the newly added interfaces would be available on the other VCS node as well. My tests failed. I will try to sum up what exactly had I done:

==================================================================
1) On local zone (primary cluster node), I added the interfaces using "zonecfg -z zonename"
2) I then plumbed each interfaces using the commands:
ifconfig <interface:name> plumb
ifconfig <interface:name> zone <zone name> inet <ip addr> netmask <netmask> up

3) Copied the zone xml file to the secondary cluster node. Also ensured that the permissions, ownership and size of the xml file are same on both the nodes.

4) Did the switchover
hagrp -switch <zone name/package> -to <other node>

5) "Ifconfig -a" did not show the newly added interfaces.

Any help to let me know where I went wrong would be highly appreciated.

Thanks&Regards,
Mahive.

Hi

With cluster, all network interfaces will have to be exculsive, i.e. the global zones should present the underlying NICs to the zone, which will not be shared with any other zones, and be exclusive to that one.

So, for each cluster zone, you should be setting set ip-type=exclusive Then, with in the zone, you do the usual /etc/hosts / etc/hostname.nxge1 etc etc.

In the global zone, go into /etx/zones, and ensure both of the zonename.xml files for the cluster zones, have the network address lines, mine look like :-

<zone name="svx-nemesis-dr" zonepath="/zones/roots/svx-xcxxxx-dr" autoboot="true" brand="solaris8"bootargs="-m verbose" scheduling-class="FSS" ip-type="exclusive">
<network address="" physical="nxge1"/>
<network address="" physical="nxge2"/>

I think you need to step out of the thinking of zones, and see each zone as a separate server. Once you have presented each environment with its own NIC, then put they are zones to one side, and configure the environments like you would do for a clustered pair.

I would imagine a private network address, or etc etc.

Do a google aswell.

SBK