Patent ID: 8774054

Claim:
A network policy configuration method, comprising: establishing correlation information between a virtual switch and physical network devices; sending a virtual network policy deletion message carrying the identifier information of the virtual machine to a source virtual switch corresponding to the virtual machine when a virtual machine migration event aimed at a virtual machine occurs, wherein the virtual network policy deletion message is used to instruct the source virtual switch to delete virtual network policy parameters that are previously configured for a first virtual port between the virtual machine and the source virtual switch; sending a virtual network policy creation message carrying virtual network policy information and the identifier information of the virtual machine to a target virtual switch corresponding to the virtual machine when the virtual machine migration event occurs, wherein the virtual network policy creation message is used to instruct the target virtual switch to configure virtual network policy parameters for a second virtual port between the virtual machine and the target virtual switch according to the virtual network policy information; acquiring, according to the correlation information, physical network devices correlated to the source virtual switch, and physical network devices correlated to the target virtual switch; sending physical network policy deletion messages carrying the identifier information of the virtual machine to the physical network devices correlated to the source virtual switch, wherein the physical network policy deletion messages are used to instruct the physical network devices to delete physical network policy parameters that are previously configured for the first virtual port between the virtual machine and the source virtual switch; and sending physical network policy creation messages carrying physical network policy information and the identifier information of the virtual machine to physical network devices correlated to the target virtual switch, wherein the physical network policy creation messages are used to instruct each of the physical network devices to configure physical network policy parameters for the second virtual port between the virtual machine and the target virtual switch on a local physical port corresponding to the virtual machine.