Neutron/MigrationFromNovaNetwork/HowTo
Contents
Overview
This wiki describes step-by-step procedure for migrating servers from Nova network to Neutron.
Before proceeding with the actual migration process, it is highly recommended to test the migration process by executing steps described in How to test migration process first.
TODO - fill in the migration process script here -
How to test migration process
Following section is written with the intent for the readers to try the migration process before actually moving existing servers (VMs).
In this section, we create VMs using Nova network, and then perform migration steps to move them over to Netutron network. This test process is performed by using devstack.
NOTE: Before proceeding with the migration process, please ensure that your system meets the Prerequisites
- Apply devstack patch in devstack directory. This patch allows both Nova and Neutron networks to be available at the same time
- Restack
-
execute unstack.sh followed by stack.sh
-
- Apply novaclient patch in /opt/stack/python-novaclient directory
- Pull Neutron migration patch from github
- Now create few servers (VMs) by using nova boot command
-
nova boot --flavor=<flavor-id> --image=<Image-id> vm1
-
- Verify that the VMs are created and are in Active State
-
nova list
-
- Now modify nova.conf to use neutron - as shown below
- network_manager = nova.network.neutronv2.api.API
- firewall_driver = nova.virt.firewall.NoopFirewallDriver
- service_neutron_metadata_proxy = True
- security_group_api = neutron
- neutron_migrating = True
- Restart Nova
-
restart n-cpu and n-api services
-
- Create a Neutron network and subnet. This is needed only if you are not using devstack created network.
- Migrate a VM to form Nova network to Neutron by issuing following command
-
nova migration-to-neutron <vm-id> <neutron-net-id>
-
Prerequisites
Prior to starting the migrating process ensure that following requirements are met:
- libvirt library should be at version 1.2.5. To upgrade this library, please follow steps described here
- python-libvirt should also be at version 1.2.5
Upgrading libvirt library
Use following steps to upgrade libvirt library:
Check present version by using "virsh --version". If the present version is at 1.2.5, skip rest of this section, otherwise continue
- Download and unpack libvirt version 1.2.5 from from here
- Install pkg-config, if not already installed
- Install libnl-dev, if not already installed
- Configure libvirt by following these steps:
- ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
- make
- sudo make install
- restart the libvirt service
- Verify the version to ensure that library was correctly installed by executing "virsh --version"
- Update /etc/libvirt/libvirtd.conf with:
unix_sock_group = "libvirtd" unix_sock_rw_perms = "0770" auth_unix_ro = "none" auth_unix_rw = "none"
Upgrading python-libvirt library
Note that python-libvirt version must match with the libvirt version. Use following steps to upgrade python-libvirt library:
- Download and unpack python-libvirt version 1.2.5 from from here
- Install python-libvirt by following these steps:
- python setup.py build
- sudo python setup.py install