CPC G06F 9/45558 (2013.01) [G06F 9/4856 (2013.01); G06F 11/1004 (2013.01); G06F 2009/4557 (2013.01); G06F 2009/45562 (2013.01); G06F 2009/45575 (2013.01); G06F 2009/45591 (2013.01)] | 15 Claims |
1. A Physical to Virtual (P2V) migration method, comprising:
transmitting disk data of a Physical Machine (PM) to a server, wherein the disk data is used by the server to create and start a Virtual Machine (VM) based on the disk data of the PM;
acquiring a first dirty data generated by running of a program on the PM in a transmission process of the disk data of the PM;
updating, based on the acquired first dirty data, the disk data for creating the VM; and
controlling, based on the updated disk data for the VM, the VM to resume running the program based on a progress of the program;
wherein acquiring a first dirty data generated by running of a program on the PM in a transmission process of the disk data of the PM comprises:
monitoring, in the transmission process of the disk data of the PM, a file corresponding to the program running on the PM to form a record file;
transmitting the record file to the VM to obtain a check code generated and returned by the VM based on the record file;
calculating a check code of a local file corresponding to the program;
sequentially reading the calculated check code according to a file offset;
respectively matching the check code read each time with the check code returned by the VM; and
determining data failed in matching as the first dirty data generated by running of the program on the PM.
|