When using XenServer as hypervisor, install_os_domU.sh will create
integration bridge for compute node when neutron network is used.
But it should provide a way to allow moving of the VM to another
host (with a different XEN_INTEGRATION_BRIDGE) for easier install.
This patch is to provide the way to let user have the chance to
configure integration bridge themselves
Change-Id: If923a5e978e77fc091d24b6e1fe7a83a3375da09
| ... | ... |
@@ -29,7 +29,8 @@ GUEST_INTERFACE_DEFAULT=eth1 |
| 29 | 29 |
# Allow ``build_domU.sh`` to specify the flat network bridge via kernel args |
| 30 | 30 |
FLAT_NETWORK_BRIDGE_DEFAULT=$(sed -e 's/.* flat_network_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) |
| 31 | 31 |
if is_service_enabled neutron; then |
| 32 |
- XEN_INTEGRATION_BRIDGE=$(sed -e 's/.* xen_integration_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) |
|
| 32 |
+ XEN_INTEGRATION_BRIDGE_DEFAULT=$(sed -e 's/.* xen_integration_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline) |
|
| 33 |
+ XEN_INTEGRATION_BRIDGE=${XEN_INTEGRATION_BRIDGE:-$XEN_INTEGRATION_BRIDGE_DEFAULT}
|
|
| 33 | 34 |
fi |
| 34 | 35 |
|
| 35 | 36 |
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
|
| ... | ... |
@@ -170,3 +170,9 @@ VM as `TEMPLATE_FILENAME`: |
| 170 | 170 |
xe vm-import filename="$mountdir/$TEMPLATE_FILENAME" |
| 171 | 171 |
umount "$mountdir" |
| 172 | 172 |
rm -rf "$mountdir" |
| 173 |
+ |
|
| 174 |
+### Migrate OpenStack DomU to another host |
|
| 175 |
+ |
|
| 176 |
+Given you need to migrate your DomU with OpenStack installed to another host, |
|
| 177 |
+you need to set `XEN_INTEGRATION_BRIDGE` in localrc if neutron network is used. |
|
| 178 |
+It is the bridge for `XEN_INT_BRIDGE_OR_NET_NAME` network created in Dom0 |
| ... | ... |
@@ -299,10 +299,10 @@ $THIS_DIR/build_xva.sh "$GUEST_NAME" |
| 299 | 299 |
# kernel parameter for DomU |
| 300 | 300 |
attach_network "$XEN_INT_BRIDGE_OR_NET_NAME" |
| 301 | 301 |
|
| 302 |
-XEN_INTEGRATION_BRIDGE=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME") |
|
| 302 |
+XEN_INTEGRATION_BRIDGE_DEFAULT=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME") |
|
| 303 | 303 |
append_kernel_cmdline \ |
| 304 | 304 |
"$GUEST_NAME" \ |
| 305 |
- "xen_integration_bridge=${XEN_INTEGRATION_BRIDGE}"
|
|
| 305 |
+ "xen_integration_bridge=${XEN_INTEGRATION_BRIDGE_DEFAULT}"
|
|
| 306 | 306 |
|
| 307 | 307 |
FLAT_NETWORK_BRIDGE="${FLAT_NETWORK_BRIDGE:-$(bridge_for "$VM_BRIDGE_OR_NET_NAME")}"
|
| 308 | 308 |
append_kernel_cmdline "$GUEST_NAME" "flat_network_bridge=${FLAT_NETWORK_BRIDGE}"
|