A method for virtualizing a passive optical network, wherein the method comprises: receiving a virtualized passive optical network, VPON, creation message, wherein the VPON creation message comprises an identifier VPON ID of a to-be-created virtualized passive optical network and at least one wavelength flow identifier λ-flow ID, the VPON ID is used to identify the virtualized passive optical network formed by a virtualized optical line terminal and at least one optical network unit, and the λ-flow ID is used to identify one wavelength flow; and establishing, according to the VPON ID and the at least one λ-flow ID, a communication connection relationship with the at least one optical network unit in the virtualized passive optical network identified by the VPON ID, wherein the establishing, according to the VPON ID and the at least one λ-flow ID, the communication connection relationship with the at least one optical network unit in the virtualized passive optical network identified by the VPON ID comprises: sending the virtualized passive optical network creation message to the at least one optical network unit; receiving registration information that is registered in an optical line terminal and returned by the at least one optical network unit, wherein the registration information comprises a wavelength flow λ-flow entry, and the λ-flow entry comprises an optical network unit identifier and the λ-flow ID; and establishing a first registration mapping table according to the VPON ID and the λ-flow entry, wherein the first registration mapping table comprises the VPON ID and at least one λ-flow entry. receiving a virtualized passive optical network, VPON, creation message, wherein the VPON creation message comprises an identifier VPON ID of a to-be-created virtualized passive optical network and at least one wavelength flow identifier λ-flow ID, the VPON ID is used to identify the virtualized passive optical network formed by a virtualized optical line terminal and at least one optical network unit, and the λ-flow ID is used to identify one wavelength flow; and establishing, according to the VPON ID and the at least one λ-flow ID, a communication connection relationship with the at least one optical network unit in the virtualized passive optical network identified by the VPON ID, wherein the establishing, according to the VPON ID and the at least one λ-flow ID, the communication connection relationship with the at least one optical network unit in the virtualized passive optical network identified by the VPON ID comprises: sending the virtualized passive optical network creation message to the at least one optical network unit; receiving registration information that is registered in an optical line terminal and returned by the at least one optical network unit, wherein the registration information comprises a wavelength flow λ-flow entry, and the λ-flow entry comprises an optical network unit identifier and the λ-flow ID; and establishing a first registration mapping table according to the VPON ID and the λ-flow entry, wherein the first registration mapping table comprises the VPON ID and at least one λ-flow entry. sending the virtualized passive optical network creation message to the at least one optical network unit; receiving registration information that is registered in an optical line terminal and returned by the at least one optical network unit, wherein the registration information comprises a wavelength flow λ-flow entry, and the λ-flow entry comprises an optical network unit identifier and the λ-flow ID; and establishing a first registration mapping table according to the VPON ID and the λ-flow entry, wherein the first registration mapping table comprises the VPON ID and at least one λ-flow entry.