z/VM multiple Flat networks(the first time configuration)

It's for the first time to confitgure multiple flats networks for z/VM.

How to configure

To support multiple vSwitches on z/VM compute node, you need to manually configure hybrid management nodes and all of the compute nodes. The configuration guide works for both stand-alone and multi-node cluster.

Hybrid management node guide

1, Update /etc/neutron/plugins/ml2/ml2_conf.ini file

Ensure flat_networks = *

[ml2_type_flat]
flat_networks = *

In standalone, run the following command on the management node.

openstack-config --set --inplace  /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_flat flat_networks '*'

In HA, run it on one of the management nodes.

icic-opsmgr config openstackconfig -c <cluster-name> -op set -file /etc/neutron/plugins/ml2/ml2_conf.ini -section ml2_type_flat -property flat_networks -value '*'

For example:

icic-opsmgr config openstackconfig -c c12 -op set -file /etc/neutron/plugins/ml2/ml2_conf.ini -section ml2_type_flat -property flat_networks -value '*'

2, Restart neutron services

In stand-alone, run it on one of the management nodes. In HA, run it on one of the management nodes.

icic-services neutron restart

z/VM compute node guide

For example, there is a vswitch named VSICIC on each compute node. The physical network provider icicvlan1 matches to this vswitch. Add a new vswitch named VSICICA to each compute node, and the physical network provider icic2 matches to VSICICA.

1, Update physical_vswitch_mappings On each compute node, edit the physical_vswitch_mappings property in /etc/neutron/plugins/zvm/neutron_zvm_plugin.ini file, and append the new mappings of the physical network provider to the vswitch for physical_vswitch_mappings property. One or multiple mappings are supported, separated by ‘,‘. Note: icic2 is the physical network provider, VSICICA is the new vswitch.

[AGENT]
cloud_connector_url = http://127.0.0.1:8080
zvm_cloud_connector_token_file = /etc/zvmsdk/token.dat
polling_interval = 5
physical_vswitch_mappings = icicvlan1:VSICIC,icic2:VSICICA

2, On each compute node, restart the neutron-zvm-agent service

systemctl restart neutron-zvm-agent

3, Create network

It is only supported to create new networks through CLI or API, not the UI. VLAN unaware vSwitch can be used for the flat networks.

Take this as an example: creating flat network using icic2

openstack network create --provider-network-type flat --provider-physical-network icic2 --tag zvs  z-flat2
openstack subnet create --allocation-pool start=172.26.57.221,end=172.26.57.240 --network z-flat2 --subnet-range 172.26.0.0/17 --gateway 172.26.0.1 --no-dhcp z-flat2-sub

Note:

  • If you use the VLAN Aware vswitch to create a flat network, the deployed virtual machines may not be connected.

For a VLAN Aware vswitch:

  • When no Default VLAN ID is configured, a NIC defined with the Flat network cannot be coupled to the VLAN Aware vSwitch.

  • When a default VLAN ID is configured, a NIC defined with the Flat network can connect to the VLAN Aware vSwitch, IP assigned, NIC is UP. Whether the network connectivity is ok depends on how the z/VM vSwitch is configured to its uplink OSA and phyical switch.

4, Deploy the VMs using the new networks on the UI

Samples

In this example: Add one new vswitch for each z/VM compute node to be the second flat network. The provider-physical-network is icic2. VSICICA is the new vswitch accordingly. There is already an icicvlan1:VSICIC by default.

On one of the management node, run:

1, Flat network setting

icic-opsmgr config openstackconfig -c c12 -op set -file /etc/neutron/plugins/ml2/ml2_conf.ini -section ml2_type_flat -property flat_networks -value '*'

Note: c12 is the cluster name

2, Restart

icic-services neutron restart

On each z/VM compute node, run:

1, Update physical_vswitch_mappings Edit physical_vswitch_mappings property in /etc/neutron/plugins/zvm/neutron_zvm_plugin.ini file, and append new mappings manually.

[AGENT]
cloud_connector_url = http://127.0.0.1:8080
zvm_cloud_connector_token_file = /etc/zvmsdk/token.dat
polling_interval = 5
physical_vswitch_mappings = icicvlan1:VSICIC,icic2:VSICICA

2, Restart neutron-zvm-agent service

systemctl restart neutron-zvm-agent

3, Create a flat network

openstack network create --provider-network-type flat --provider-physical-network icic2  --tag zvs  z-flat2
openstack subnet create --allocation-pool start=172.26.57.221,end=172.26.57.240 --network z-flat2 --subnet-range 172.26.0.0/17 --gateway 172.26.0.1 --no-dhcp z-flat2-sub

4, Deploy virtual machines on the UI using new networks