Difference between revisions of "Neutron/MigrationFromNovaNetwork/HowTo"
(35 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
This wiki describes step-by-step procedure for migrating servers from Nova network to Neutron. | This wiki describes step-by-step procedure for migrating servers from Nova network to Neutron. | ||
+ | <br/> | ||
+ | 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|How to test migration process]] first. | ||
+ | |||
+ | |||
+ | |||
+ | TODO - fill in the migration process script here - | ||
Line 8: | Line 14: | ||
== How to test migration process == | == How to test migration process == | ||
− | Following section is written with the intent for the readers to try the 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 | + | 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|Prerequisites]] | ||
<br /> | <br /> | ||
− | + | #<big> Apply [http://paste.openstack.org/show/84178/ devstack patch] in devstack directory. This patch allows both Nova and Neutron networks to be available at the same time </big> | |
+ | #: | ||
+ | #<big> Restack </big> | ||
+ | #: <pre><nowiki> execute unstack.sh followed by stack.sh </nowiki></pre> | ||
+ | #: | ||
+ | #<big> Apply [http://paste.openstack.org/show/84177/ novaclient patch] in /opt/stack/python-novaclient directory </big> | ||
+ | #: | ||
+ | #<big> Pull [https://review.openstack.org/#/c/100265/ Neutron migration patch] from github </big> | ||
+ | #: | ||
+ | #<big> Now create few servers (VMs) by using nova boot command </big> | ||
+ | #: <pre><nowiki> nova boot --flavor=<flavor-id> --image=<Image-id> vm1 </nowiki></pre> | ||
+ | #<big> Verify that the VMs are created and are in Active State </big> | ||
+ | #: <pre><nowiki> nova list </nowiki></pre> | ||
+ | #<big> Now modify nova.conf to use neutron - as shown below</big> | ||
+ | #: network_api_class = nova.network.neutronv2.api.API | ||
+ | #: firewall_driver = nova.virt.firewall.NoopFirewallDriver | ||
+ | #: service_neutron_metadata_proxy = True | ||
+ | #: security_group_api = neutron | ||
+ | #: neutron_migrating = True | ||
+ | #: | ||
+ | #: [neutron] | ||
+ | #: url = http://<host-ip>:9696 | ||
+ | #: region_name = RegionOne | ||
+ | #: admin_tenant_name = service | ||
+ | #: auth_strategy = keystone | ||
+ | #: admin_auth_url = http://<host-ip>:35357/v2.0 | ||
+ | #: admin_password = <password> | ||
+ | #: admin_username = neutron | ||
+ | #: | ||
+ | #<big> Restart Nova </big> | ||
+ | #: <pre><nowiki> restart n-cpu and n-api services </nowiki></pre> | ||
+ | #<big> Create a Neutron network and subnet. This is needed only if you are not using devstack created network. </big> | ||
+ | #: | ||
+ | #<big> Migrate a VM to form Nova network to Neutron by issuing following command</big> | ||
+ | #: <pre><nowiki> nova migration-to-neutron <vm-id> <neutron-net-id> </nowiki></pre> | ||
+ | #: Note that during migration process, additional VMs can not be launched. | ||
+ | #<big> Once all servers (VMs) have been migrated, disable the migration. This is done by updating the /etc/nova/nova.conf as follows:</big> | ||
+ | #: <pre><nowiki> neutron_migrating = True </nowiki></pre> | ||
+ | #<big> Restart Nova </big> | ||
+ | #: <pre><nowiki> restart n-cpu and n-api services </nowiki></pre> | ||
+ | #<big> Now you can launch additional servers (VMs). These will be launched in Neutron network </big> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <br/> | ||
+ | === 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 [[#Upgrading libvirt library|here]] | ||
+ | * python-libvirt should also be at version 1.2.5. Upgrade of libvirt should do this automatically. If for some reason it is not upgrades, please follow steps described [[#Upgrading python-libvirt library|here]] to upgrade this library | ||
+ | |||
+ | <br/> | ||
+ | ==== 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 [http://libvirt.org/sources/ 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" | ||
+ | |||
+ | |||
+ | <br/> | ||
+ | ==== 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 [https://pypi.python.org/pypi/libvirt-python/ here] | ||
+ | * Install python-libvirt by following these steps: | ||
+ | ** python setup.py build | ||
+ | ** sudo python setup.py install |
Latest revision as of 21:18, 11 July 2014
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_api_class = nova.network.neutronv2.api.API
- firewall_driver = nova.virt.firewall.NoopFirewallDriver
- service_neutron_metadata_proxy = True
- security_group_api = neutron
- neutron_migrating = True
- [neutron]
- url = http://<host-ip>:9696
- region_name = RegionOne
- admin_tenant_name = service
- auth_strategy = keystone
- admin_auth_url = http://<host-ip>:35357/v2.0
- admin_password = <password>
- admin_username = neutron
- 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>
- Note that during migration process, additional VMs can not be launched.
-
- Once all servers (VMs) have been migrated, disable the migration. This is done by updating the /etc/nova/nova.conf as follows:
-
neutron_migrating = True
-
- Restart Nova
-
restart n-cpu and n-api services
-
- Now you can launch additional servers (VMs). These will be launched in Neutron network
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. Upgrade of libvirt should do this automatically. If for some reason it is not upgrades, please follow steps described here to upgrade this library
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 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 here
- Install python-libvirt by following these steps:
- python setup.py build
- sudo python setup.py install