Migrating VNF in CSP Cluster
Scenario 1
Migrate the VM from CSP-1 to CSP-2, when CSP-1 is reachable.
To migrate the VM from CSP-1 to CSP-2, NB sends an update to ESC by changing the locator (vim_id, vim_project) when CSP-1 is reachable.
The following sample shows the VM group from the deployment payload/XML:
<vm_group>
<name>Group1</name>
<locator>
<vim_id>CSP-1</vim_id>
<vim_project>CSP-1</vim_project>
</locator>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2020-09-03T05:41:16.299+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>SUCCESS</status>
<status_code>200</status_code>
<status_message>VIM Locator Updated Successfully</status_message>
<vm_update_type>LOCATOR_UPDATED</vm_update_type>
<depname>dep</depname>
<tenant>demo</tenant>
<depid>06c94f58-b753-425b-b97c-f7adb9140ead</depid>
<vm_group>group</vm_group>
<vm_source>
<vmid>6b0e7179-fd5e-487e-9570-e7ba98cce0ec</vmid>
<vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</vmname>
<generated_vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</generated_vmname>
<vim_id>CSP-2</vim_id>
<vim_project>CSP-2</vim_project>
<interfaces>
<interface>
<nicid>0</nicid>
<type>access</type>
<port_id>539c6df4-4680-4bba-8a0d-d621947f2228</port_id>
<admin_state_up>true</admin_state_up>
<network>Eth0-2</network>
<subnet/>
<ip_address>192.168.23.62</ip_address>
<netmask>255.255.255.0</netmask>
</interface>
<interface>
<nicid>1</nicid>
<type>trunk</type>
<port_id>0adc3096-509c-49b7-9bd7-a25bbf2a9345</port_id>
<admin_state_up>true</admin_state_up>
<network>Eth0-2</network>
<subnet/>
</interface>
</interfaces>
</vm_source>
<event>
<type>VM_UPDATED</type>
</event>
</escEvent>
</notification>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2020-09-03T05:41:16.322+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>SUCCESS</status>
<status_code>200</status_code>
<status_message>Service group update completed successfully</status_message>
<depname>dep</depname>
<tenant>demo</tenant>
<tenant_id>demo</tenant_id>
<depid>06c94f58-b753-425b-b97c-f7adb9140ead</depid>
<event>
<type>SERVICE_UPDATED</type>
</event>
</escEvent>
Scenario 2
Migrate the VM from CSP-1 to CSP-2, when CSP-1 is not reachable.
Assuming the recovery mode is auto and recovery policy as REBOOT_ONLY during initial deployment. Consider CSP-1 host fails and ESC detects the VM failed due to CSP-1 failure. ESC tries to recover the VM but fails because CSP-1 is down. Now the NB sends an update to move the VM from CSP-1 to CSP-2.
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2020-09-03T04:30:18.642+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>SUCCESS</status>
<status_code>200</status_code>
<status_message>Recovery event for VM Generated ID [dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555] triggered.</status_message>
<depname>dep</depname>
<tenant>demo</tenant>
<tenant_id>demo</tenant_id>
<depid>06c94f58-b753-425b-b97c-f7adb9140ead</depid>
<vm_group>group</vm_group>
<vm_source>
<vmid>6b0e7179-fd5e-487e-9570-e7ba98cce0ec</vmid>
<vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</vmname>
<generated_vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</generated_vmname>
<vim_id>CSP-1</vim_id>
<vim_project>CSP-1</vim_project>
</vm_source>
<event>
<type>VM_RECOVERY_INIT</type>
</event>
</escEvent>
</notification>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2020-09-03T04:31:20.449+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>FAILURE</status>
<status_code>500</status_code>
<status_message> VM [dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555] failed to be rebooted.</status_message>
<depname>dep</depname>
<tenant>demo</tenant>
<tenant_id>demo</tenant_id>
<depid>06c94f58-b753-425b-b97c-f7adb9140ead</depid>
<vm_group>group</vm_group>
<vm_source>
<vmid>6b0e7179-fd5e-487e-9570-e7ba98cce0ec</vmid>
<vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</vmname>
<generated_vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</generated_vmname>
<vim_id>CSP-2</vim_id>
<vim_project>CSP-2</vim_project>
</vm_source>
<event>
<type>VM_RECOVERY_REBOOT</type>
</event>
</escEvent>
</notification>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2020-09-03T04:41:20.844+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>FAILURE</status>
<status_code>500</status_code>
<status_message>Recovery: Recovery completed with errors for VM: [dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555]</status_message>
<depname>dep</depname>
<tenant>demo</tenant>
<tenant_id>demo</tenant_id>
<depid>06c94f58-b753-425b-b97c-f7adb9140ead</depid>
<vm_group>group</vm_group>
<vm_source>
<vmid>6b0e7179-fd5e-487e-9570-e7ba98cce0ec</vmid>
<vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</vmname>
<generated_vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</generated_vmname>
<vim_id>CSP-1</vim_id>
<vim_project>CSP-1</vim_project>
</vm_source>
<vm_target>
<vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</vmname>
<generated_vmname>dep_group_0_46e607a8-b797-4056-96f3-42a90a63b555</generated_vmname>
</vm_target>
<event>
<type>VM_RECOVERY_COMPLETE</type>
</event>
</escEvent>
</notification>
Consider, you have a cluster of three CSPs (CSP-1,CSP-2, and CSP-3). VM is deployed on CSP-1
Before you begin
-
A VIM Connector must be created. For more information, See Adding VIM Connector to CSP Cluster Chapter.
-
VM is deployed with the same underlying storage. For more information, See Deploying VNFs Using ESC on CSP Cluster Chapter.
The following scenarios show the migration of the VMs:
Procedure
Step 1 |
Update locator details in the followingdeployment payload
|
Step 2 |
|
Step 3 |
Scenario 3 Migrate the VM from Local to Gluster storage on the same CSP. To migrate the VM from local to gluster, the NB sends an update with the following properties: |