Method and system for creating a virtual router in a blade chassis to maintain connectivity
View Patent ↗A method for migrating a first virtual machine (VM), that includes transmitting, prior to migration, a first packet between the first VM on a first blade chassis and a second VM on a second blade chassis using a first virtual network interface card (VNIC) and a second VNIC. The method includes migrating the first VM and the first VNIC to the second blade, identifying a subnet of the first VM, identifying a subnet of the second VM, and creating a virtual router to execute on the second blade. The virtual router is associated with a third VNIC and a fourth VNIC. A first network address in the first VNIC's subnet is assigned to the third VNIC. A second network address in the second VNIC's subnet is assigned to the fourth VNIC. The method includes routing a second packet between the first VM and the second VM using the virtual router.
1. A method for migrating a first virtual machine (VM), comprising:
transmitting, prior to migration, a first packet between the first VM and a second VM using a first virtual network interface card (VNIC) and a second VNIC, wherein the first VM executes on a first blade in a first blade chassis prior to migration, wherein the second VM executes on a second blade in a second blade chassis, and wherein the first VNIC is associated with the first VM and the second VNIC is associated with the second VM;
migrating the first VM and the first VNIC to the second blade;
identifying a subnet of the first VM;
identifying a subnet of the second VM, wherein the subnet of the second VM is different from the subnet of the first VM;
creating a virtual router to execute on the second blade, wherein the virtual router is associated with a third VNIC and a fourth VNIC, wherein a first network address in the subnet of the first VM is assigned to the third VNIC, wherein a second network address in the subnet of the second VM is assigned to the fourth VNIC;
creating a first virtual switch to connect the first VNIC to the third VNIC;
creating a second virtual switch to connect the second VNIC to the fourth VNIC; and
routing a second packet between the first VM and the second VM using the virtual router after migration.
2. The method of claim 1 , further comprising:
transmitting a third packet between a third VM and the second VM using a fifth VNIC and the second VNIC, wherein the third VM executes on the first blade prior to migration, and wherein the fifth VNIC is associated with the third VM;
migrating the third VM and the fifth VNIC to the second blade;
identifying a subnet of the third VM;
determining that the subnet of the third VM is the same as the subnet of the first VM;
connecting the fifth VNIC to the first virtual switch based on the determination; and
routing a fourth packet between the fifth VM and the second VM using the virtual router after migration.
3. The method of claim 1 , further comprising:
transmitting a third packet between the third VM and the second VM using a fifth VNIC and the second VNIC prior to migration, wherein the third VM executes on a third blade prior to migration, and wherein the fifth VNIC is associated with the third VM;
migrating the third VM and the fifth VNIC to the second blade;
identifying a subnet of the third VM;
determining that the subnet of the third VM is different from the subnet of the first VM;
creating a sixth VNIC for the virtual router, wherein a third network address in the subnet of the third VM is assigned to the sixth VNIC;
creating a third virtual switch to connect the fifth VNIC to the sixth VNIC; and
routing a fourth packet between the fifth VM and the second VM using the virtual router after migration.
4. The method of claim 1 , wherein migrating the VM is based on a migration trigger, and wherein the migration trigger is based on power management.
5. The method of claim 1 , wherein migrating the VM is based on a migration trigger, and wherein the migration trigger is failure of the first blade.
6. The method of claim 1 , wherein the first virtual switch and the second virtual switch execute on the second blade.
7. The method of claim 1 , wherein the second packet is routed only within the blade chassis.
8. A computer system for migrating a first virtual machine (VM), comprising:
a processor;
a memory; and
software instructions stored in the memory for enabling the computer system to:
transmit, prior to migration, a first packet between the first VM and a second VM using a first virtual network interface card (VNIC) and a second VNIC, wherein the first VM executes on a first blade in a first blade chassis prior to migration, wherein the second VM executes on a second blade in a second blade chassis, and wherein the first VNIC is associated with the first VM and the second VNIC is associated with the second VM;
migrate the first VM and the first VNIC to the second blade;
identify a subnet of the first VM;
identify a subnet of the second VM, wherein the subnet of the second VM is different from the subnet of the first VM;
create a virtual router to execute on the second blade, wherein the virtual router is associated with a third VNIC and a fourth VNIC, wherein a first network address in the subnet of the first VM is assigned to the third VNIC, wherein a second network address in the subnet of the second VM is assigned to the fourth VNIC;
create a first virtual switch to connect the first VNIC to the third VNIC;
create a second virtual switch to connect the second VNIC to the fourth VNIC; and
route a second packet between the first VM and the second VM using the virtual router after migration.
9. The computer system of claim 8 , wherein the software instructions further cause the computer system to:
transmit a third packet between a third VM and the second VM using a fifth VNIC and the second VNIC, wherein the third VM executes on the first blade prior to migration, and wherein the fifth VNIC is associated with the third VM;
migrate the third VM and the fifth VNIC to the second blade;
identify a subnet of the third VM;
determine that the subnet of the third VM is the same as the subnet of the first VM;
connect the fifth VNIC to the first virtual switch based on the determination; and
route a fourth packet between the fifth VM and the second VM using the virtual router after migration.
10. The computer system of claim 8 , wherein the software instructions further cause the computer system to:
transmit a third packet between the third VM and the second VM using a fifth VNIC and the second VNIC prior to migration, wherein the third VM executes on a third blade prior to migration, and wherein the fifth VNIC is associated with the third VM;
migrate the third VM and the fifth VNIC to the second blade;
identify a subnet of the third VM;
determine that the subnet of the third VM is different from the subnet of the first VM;
create a sixth VNIC for the virtual router, wherein a third network address in the subnet of the third VM is assigned to the sixth VNIC;
create a third virtual switch to connect the fifth VNIC to the sixth VNIC; and
route a fourth packet between the fifth VM and the second VM using the virtual router after migration.
11. The computer system of claim 8 , wherein migrating the VM is based on a migration trigger, and wherein the migration trigger is based on power management.
12. The computer system of claim 8 , wherein migrating the VM is based on a migration trigger, and wherein the migration trigger is failure of the first blade.
13. The computer system of claim 8 , wherein the first virtual switch and the second virtual switch execute on the second blade.
14. The computer system of claim 8 , wherein the second packet is routed only within the blade chassis.
15. A non-transitory computer readable medium comprising computer readable program code embodied therein for causing a computer system to:
transmit, prior to migration, a first packet between a first virtual machine (VM) and a second VM using a first virtual network interface card (VNIC) and a second VNIC, wherein the first VM executes on a first blade in a first blade chassis prior to migration, wherein the second VM executes on a second blade in a second blade chassis, and wherein the first VNIC is associated with the first VM and the second VNIC is associated with the second VM;
migrate the first VM and the first VNIC to the second blade;
identify a subnet of the first VM;
identify a subnet of the second VM, wherein the subnet of the second VM is different from the subnet of the first VM;
create a virtual router to execute on the second blade, wherein the virtual router is associated with a third VNIC and a fourth VNIC, wherein a first network address in the subnet of the first VM is assigned to the third VNIC, wherein a second network address in the subnet of the second VM is assigned to the fourth VNIC;
create a first virtual switch to connect the first VNIC to the third VNIC;
create a second virtual switch to connect the second VNIC to the fourth VNIC; and
route a second packet between the first VM and the second VM using the virtual router after migration.
16. The computer readable medium of claim 15 , wherein the computer readable program code further causes the computer system to:
transmit a third packet between a third VM and the second VM using a fifth VNIC and the second VNIC, wherein the third VM executes on the first blade prior to migration, and wherein the fifth VNIC is associated with the third VM;
migrate the third VM and the fifth VNIC to the second blade;
identify a subnet of the third VM;
determine that the subnet of the third VM is the same as the subnet of the first VM;
connect the fifth VNIC to the first virtual switch based on the determination; and
route a fourth packet between the fifth VM and the second VM using the virtual router after migration.
17. The computer readable medium of claim 15 , wherein the computer readable program code further causes the computer system to:
transmit a third packet between the third VM and the second VM using a fifth VNIC and the second VNIC prior to migration, wherein the third VM executes on a third blade prior to migration, and wherein the fifth VNIC is associated with the third VM;
migrate the third VM and the fifth VNIC to the second blade;
identify a subnet of the third VM;
determine that the subnet of the third VM is different from the subnet of the first VM;
create a sixth VNIC for the virtual router, wherein a third network address in the subnet of the third VM is assigned to the sixth VNIC;
create a third virtual switch to connect the fifth VNIC to the sixth VNIC; and
route a fourth packet between the fifth VM and the second VM using the virtual router after migration.
18. The computer readable medium of claim 15 , wherein migrating the VM is based on a migration trigger, and wherein the migration trigger is based on power management.
19. The computer readable medium of claim 15 , wherein migrating the VM is based on a migration trigger, and wherein the migration trigger is failure of the first blade.
20. The computer readable medium of claim 15 , wherein the first virtual switch and the second virtual switch execute on the second blade, and wherein the second packet is routed only within the blade chassis.