A method for configuring a network policy of a virtual network, comprising: receiving, by a server, a network policy message sent by a virtual machine management center and used for creating a virtual network, wherein the network policy message for creating a virtual network comprises a virtual network identification, VNID of a virtual network to be created and network policy configuration information corresponding to the virtual network to be created; and sending, by the server, a network policy synchronization message to a network device, wherein the network policy synchronization message comprises the VNID of the virtual network to be created and the network policy configuration information corresponding to the virtual network to be created; when it is necessary to create a virtual machine on the server, receiving, by the server, a virtual machine creation message sent by the virtual machine management center, wherein the virtual machine creation message comprises a VNID of a virtual machine to be created, where the VNID of the virtual machine is used to indicate a virtual network identification of a user to which the virtual machine belongs; and sending, by the server, an association or pre-association message to the network device, wherein the association or pre-association message comprises the VNID of the virtual machine to be created, so that the network device performs, according to the VNID of the virtual machine to be created, association or pre-association processing for the virtual machine to be created and network policy configuration information corresponding to the VNID of the virtual machine to be created. receiving, by a server, a network policy message sent by a virtual machine management center and used for creating a virtual network, wherein the network policy message for creating a virtual network comprises a virtual network identification, VNID of a virtual network to be created and network policy configuration information corresponding to the virtual network to be created; and sending, by the server, a network policy synchronization message to a network device, wherein the network policy synchronization message comprises the VNID of the virtual network to be created and the network policy configuration information corresponding to the virtual network to be created; when it is necessary to create a virtual machine on the server, receiving, by the server, a virtual machine creation message sent by the virtual machine management center, wherein the virtual machine creation message comprises a VNID of a virtual machine to be created, where the VNID of the virtual machine is used to indicate a virtual network identification of a user to which the virtual machine belongs; and sending, by the server, an association or pre-association message to the network device, wherein the association or pre-association message comprises the VNID of the virtual machine to be created, so that the network device performs, according to the VNID of the virtual machine to be created, association or pre-association processing for the virtual machine to be created and network policy configuration information corresponding to the VNID of the virtual machine to be created.