Provided in embodiments of the present invention are a method for generating configuration information and a network control unit. The method comprises: the network control unit receiving a virtual machine association message comprising an identifier of a first virtual machine of which the state is changed and an identifier of a first virtual built-in network element which detects the state change of the first virtual machine; the network control unit determining first information according to the identifier of the first virtual machine, and the first information comprising at least one of the following information: a first forwarding entry, a first virtual machine position information mapping entry and a first network policy. In the embodiments of the present invention, the network control unit determines the first information according to the identifier, included in the virtual machine association message, of the first virtual machine of which the state is changed, so that manual determination is not needed, and thus the network configuration efficiency is improved and the performance of a network is enhanced.