Networking-zvm

= Overview = This plugin is to support Quantum on z/VM and designed to be compatible with the OpenVSwitch plugin. For the initial release, only Quantum z/VM agent is provided to work with Quantum Openvswitch Plugin.

Code Links
( You can find latest code review link there) https://blueprints.launchpad.net/nova/+spec/zvm-plugin https://blueprints.launchpad.net/quantum/+spec/quantum-zvm-plugin
 * Nova z/VM plugin
 * Quantum z/VM plugin

z/VM and z/VM networking
z/VM is a VM hypervisor based on 64-bit z/Architecture, and now with multi-system virtualization and virtual server mobilit. z/VM provides a wide range of networking and connectivity options and adheres to many of the industry. For z/VM network concepts and references, please refer to http://www.vm.ibm.com/networking/

The initial release of the Quantum z/VM plugin offers the networking options listed below. z/VM virtual switch(vswitch) are used to provide network support in OpenStack environment. In this case, the network consists of a single non-partitioned space. Based on z/VM VSwitch support, support user based VLAN. Each user(guest OS) can be assigned one or more VLAN ID.
 * Flat networking
 * VLAN

= Components = Quantum z/VM agent takes care of configuring z/VM networking and connect the VM virtual network adapters (NICs) in the required vswitches. Each VM can have more than one NICs connected to different networks managed by Quantum.
 * Quantum z/VM Agent

Quantum z/VM agent is designed to be compatible with the OpenVSwitch plugin for VLAN / Flat networking.
 * Quantum Plugin

The Quantum Vif plugin is part of the Nova project itself and can be selected in the configuration files.
 * Nova Compute Quantum Vif plugin

= Architecture = Quantum z/VM plugin/agent will communicate with xCAT REST api to control/configure z/VM. This picture show the architure of xCAT and zVM

xCAT can be used to manage virtual servers spanning across multiple z/VM partitions. The xCAT management node (MN) runs on any Linux virtual server. It manages each z/VM partition using a System z hardware control point (zHCP) running on a privileged Linux virtual server. The zHCP interfaces with z/VM systems management API (SMAPI), directory manager (DirMaint), and control program layer (CP) to manage the z/VM partition. It utilizes a C socket interface to communicate with the SMAPI layer and VMCP Linux module to communicate with the CP layer.

To support z/VM virtual network, Quantum z/VM plugin/agent should be able to support following features:
 * 1) User xCAT rest api to get z/VM configure information or update z/VM configure
 * 2) Get z/VM VSWITCH information which are defined on z/VM.
 * 3) MAC address allocation and bundle it with userid in user directory.
 * 4) Configure z/VM VSWITCH. Configure the VSWITCH to grant user authority, or configure user based VLAN tag, or configure port based VLAN tag.
 * 5) Support VLAN, able to set user based VLAN tag or port based VLAN
 * 6) Support DHCP.
 * 7) Able to update user directory entry to add more NICs for a user id.
 * 8) Quantum z/VM agent should be able to working with Quantum OpenVswitch plugin.

= Prerequisites =
 * 1) One OpenStack nova-compute service node will manage one and only one xCAT MN node.
 * 2) Each of the zVM systems (reside in different LPARs or CECs ) has one nova-compute service node
 * 3) Each of the zVM systems (reside in different LPARs or CECs ) has one quantum-zvm-agent service node
 * 4) If user needs DHCP support, the zVM system must has one quantum-dhcp-agent service node coupled to a Layer 2 vswitch
 * 5) If user needs VLAN support, xCAT MN must be able to reach each of the zLinux systems. zHCP and DHCP agent can reach each of the zLinux systems in the same zVM.
 * 6) Instance can bind MAC address, z/VM user prefix must be defined.
 * 7) zHCP must be managed by xCAT MN.

= Code Structure =

1. Quantum Plugin package structure: bin/quantum-zvm-agent - excutable zvm agent. quantum/quantum/plugins/zvm - plugin code /agent - Agent code /common - common code, includeing xCAT REST api interface. rpc_callbacks.py - RPC handler for received messages agent_notify_api.py - Agent RPC notify methods

2. Nova package structure is: nova/nova/virt/zvm/networkop.py - nova side network support code

= Configure Examples = By default /etc/nova/nova.conf, should contain following items quantum_url = your_quantum_address_and_port quantum_admin_tenant_name = your_tenant_name quantum_auth_strategy = keystone or your_auth_strategy quantum_admin_auth_url = your_auth_url quantum_admin_password = your_password quantum_admin_username = your_username network_api_class = nova.network.quantumv2.api.API zvm_default_nic_vdev = default_nic_address This is an example with data: quantum_url = http://192.168.0.13:9696 quantum_admin_tenant_name = service quantum_auth_strategy = keystone quantum_admin_auth_url = http://192.168.0.13:35357/v2.0 quantum_admin_password = mypass quantum_admin_username = quantum network_api_class = nova.network.quantumv2.api.API zvm_default_nic_vdev = 2000

Quantum z/VM configure file By default, /etc/quantum/plugins/zvm/zvm_quantum_plugin.ini, should contain following items: [DATABASE] sql_connection = mysql://root:yourpass@localhost/ovs_quantum?charset=utf8 reconnect_interval = 2 [AGENT] polling_interval = interval_seconds zvm_xcat_username=your_username zvm_xcat_password=your_passworkd zvm_xcat_server=your_server_address root_helper = sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf vswitch_mappings=vswitch_vlan_mapping xcat_zhcp_nodename=xcat_zhcp_nodename This is an example with data: [DATABASE] sql_connection = mysql://root:yourpass@localhost/ovs_quantum?charset=utf8 reconnect_interval = 2 [AGENT] polling_interval = 2 zvm_xcat_username=root zvm_xcat_password=yourpass zvm_xcat_server=192.168.0.13 root_helper = sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf vswitch_mappings=vsw1:1000:2000 xcat_zhcp_nodename=zhcp1

= References =
 * 1) z/VM
 * 2) xCAT on z/VM