×

METHOD AND APPARATUS FOR VIRTUAL MACHINE LIVE STORAGE MIGRATION IN HETEROGENEOUS STORAGE ENVIRONMENT

  • US 20150234617A1
  • Filed: 02/18/2014
  • Published: 08/20/2015
  • Est. Priority Date: 02/18/2014
  • Status: Active Grant
First Claim
Patent Images

1. A method of transferring a virtual machine storage, comprising:

  • copying a virtual machine disk image of a virtual machine from a source storage to a destination storage, wherein the virtual machine disk image has a plurality of data blocks; and

    handling virtual machine IO requests from the virtual machine during copying the virtual machine disk image from the source storage to the destination storage,wherein copying the virtual machine disk image from the source storage to the destination storage and handling the virtual machine IO requests from the virtual machine during copying the virtual machine disk image from the source storage to the destination storage is accomplished via (a), (b), or (c), as follows;

    (a) copying the plurality of data blocks of the virtual machine disk image from the source storage to the destination storage;

    partitioning the virtual machine disk image into a copied region and a to-be-copied region, where the copied region has been copied from the source storage to the destination storage, wherein the to-be-copied region is going to be copied from the source storage to the destination storage;

    intercepting the virtual machine IO requests from the virtual machine, where the virtual machine IO requests from the virtual machine comprise write requests to the virtual machine disk image and read requests to the virtual machine disk image, wherein the write requests to the virtual machine disk image comprise write requests to the copied region and write requests to the to-be-copied region, wherein the read requests to the virtual machine disk image comprise read requests to the copied region and read requests to the to-be-copied region;

    recording the write requests to the to-be-copied region in a bitmap;

    reading data for read requests to the copied region from the destination storage;

    wherein for each read request to the to-be-copied region,(i) checking the bitmap to determine whether a data block corresponding to the each read request to the to-be-copied region is recorded in the bitmap;

    (ii) if the data block corresponding to the each read request to the to-be-copied region is recorded in the bitmap, issuing the each read request to the to-be-copied region to the destination storage; and

    (iii) if the data block corresponding to the each read request to the to-be-copied region is not recorded in the bitmap, issuing the each read request to the to-be-copied region to the source storage;

    wherein for write requests to the virtual machine disk image and read requests to the virtual machine disk image intercepted while data blocks corresponding to such intercepted write requests to the virtual machine disk image and such intercepted read requests to the virtual machine disk image are being copied from the source storage to the destination storage, accomplishing such intercepted write requests to the virtual machine disk image and such intercepted read requests to the virtual machine disk image after the data blocks corresponding to such intercepted write requests to the virtual machine disk image and such intercepted read requests to the virtual machine disk image have been copied from the source storage to the destination storage,wherein copying the plurality of data blocks of the virtual machine disk image from the source storage to the destination storage comprises;

    for each data block of the plurality of data blocks of the virtual machine disk image to be copied from the source storage to the destination storage,(i) checking the bitmap to determine whether the each data block of the plurality of data blocks of the virtual machine disk image to be copied from the source storage to the destination storage is recorded in the bitmap;

    (ii) if the each data block of the plurality of data blocks of the virtual machine disk image to be copied from the source storage to the destination storage is not recorded in the bitmap, copying the each data block of the plurality of data blocks of the virtual machine disk image to be copied from the source storage to the destination storage; and

    (iii) if the each data block of the plurality of data blocks of the virtual machine disk image to be copied from the source storage to the destination storage is recorded in the bitmap, skipping copying the each data block of the plurality of data blocks of the virtual machine disk image to be copied from the source storage to the destination storage,(b) copying the plurality of data blocks of the virtual machine disk image from the source storage to the destination storage,partitioning the virtual machine disk image into a copied region and a to-be-copied region, where the copied region has been copied from the source storage to the destination storage, wherein the to-be-copied region is going to be copied from the source storage to the destination storage;

    intercepting the virtual machine IO requests from the virtual machine, where the virtual machine IO requests from the virtual machine comprise write requests to the virtual machine disk image and read requests to the virtual machine disk image, wherein the write requests to the virtual machine disk image comprise write requests to the copied region and write requests to the to-be-copied region, wherein the read requests to the virtual machine disk image comprise read requests to the copied region and read requests to the to-be-copied region;

    issuing write requests to the to-be-copied region and read requests to the to-be-copied region to the source storage;

    recording the write requests to the copied region in a bitmap;

    issuing the write requests to the copied region to the destination storage;

    wherein for each read request to the copied region,(i) checking the bitmap to determine whether a data block corresponding to the each read request to the copied region has been updated by one or more write requests to the virtual machine disk image;

    (ii) if the data block corresponding to the each read request to the copied region has been updated by one or more write requests to the virtual machine disk image, reading the data block corresponding to the each read request to the copied region from the destination storage; and

    (iii) if the data block corresponding to the each read request to the copied region has not been updated by one or more write requests to the virtual machine disk image, reading the data block corresponding to the each read request to the copied region from the source storage,(c) copying the plurality of data blocks of the virtual machine disk image from the source storage to the destination storage;

    partitioning the virtual machine disk image into a copied region and a to-be-copied region, where the copied region has been copied from the source storage to the destination storage, wherein the to-be-copied region is going to be copied from the source storage to the destination storage;

    intercepting the virtual machine IO requests from the virtual machine, wherein the virtual machine IO requests from the virtual machine comprise write requests to the virtual machine disk image and read requests to the virtual machine disk image, wherein the write requests to the virtual machine disk image comprise write requests to the copied region and write requests to the to-be-copied region, wherein the read requests to the virtual machine disk image comprise read requests to the copied region and read requests to the to-be-copied region;

    issuing write requests to the to-be-copied region and read requests to the to-be-copied region to the source storage;

    issuing read requests to the copied region to the source storage;

    wherein for each write request to the copied region,(i) checking to determine a number of pending write requests to the copied region, wherein the number of pending write requests to the copied region is a number of write requests to the copied region that have been issued to the source storage and issued to the destination storage minus a number of the write requests to the copied region issued to source storage and issued to destination storage where both the write request to the copied region issued to the source storage and the write request to the copied region issued to the destination storage have been accomplished,(ii) if the number of pending write requests to the copied region is less than or equal to a threshold number, issuing the each write request to the copied region to the source storage and issuing the each write request to the copied region to the destination storage;

    (iii) if the number of pending write requests to the copied region is greater than the threshold number,(a) delaying; and

    (b) repeating (i), (ii), and (iii) until the each write request to the copied region is issued to the source storage and issued to the destination storage,wherein when the each write request to the copied region issued to the source storage is accomplished or the each write request to the copied region issued to the destination storage is accomplished, marking the each write request to the copied region as completed and returning the each write request to the copied region marked as completed to the virtual machine.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×