IP Library › Granted Patent US 12,248,801
Granted Patent B2
US 12,248,801 · App. 17/666,580 · Granted Mar 11, 2025

Update of virtual machines using clones

Inventor: Kashish Bhatia (Bangalore, IN)
Assignee: VMware LLC
G06F9/45558G06F8/65G06F2009/45562G06F2009/45579G06F2009/45583
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,248,801
App. No.
17/666,580
Granted
Mar 11, 2025
Kind
B2
Abstract

The disclosure provides an approach for upgrading a virtual machine (VM) using an instant clone. A method includes initiating updating of the VM on a host in a datacenter; creating a clone of the VM on the host, in response to initiating the update; receiving a first write input/output (I/O) request for a first data block; checking a first disk bitmap associated with a first delta disk for whether a first bit associated with the first data block is set; based on the first bit being set, checking a scanner bitmap for whether a second bit associated with the first data block is set; and based on the second bit being set: waiting until the first data block is merged into a second disk; and performing the first write I/O to the first data block in the second disk after the first data block is merged into the second disk.

Claims (127)

1. A method of updating a virtual machine (VM), the method comprising:

initiating updating of the VM on a host in a datacenter;

creating a clone of the VM on the host, in response to initiating the update;

receiving a first write input/output (I/O) request for a first data block;

checking a first disk bitmap associated with a first delta disk for whether a first bit associated with the first data block is set, wherein the first disk bitmap includes a bit for each data block of the first delta disk indicating whether the data block has been modified, and wherein the first delta disk is associated with the clone of the VM;

based on the first bit being set, checking a scanner bitmap for whether a second bit associated with the first data block is set, wherein the scanner bitmap includes a bit for each data block of the first delta disk indicating whether the data block is currently being merged into a second disk, and wherein the second disk is associated with the VM; and

based on the second bit being set:

waiting until the first data block is merged into a second disk; and

performing the first write I/O to the first data block in the second disk after the first data block is merged into the second disk.

2. The method of claim 1 , further comprising:

receiving a second write I/O request for a second data block;

checking the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit not being set:

performing the second write I/O for the second data block in a base disk; or

checking a second disk bitmap associated a second delta disk for whether a fourth bit associated with the second data block is set.

3. The method of claim 1 , further comprising:

receiving a read I/O request for a second data block;

checking the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit being set, serving the read I/O from the first delta disk.

4. The method of claim 1 , further comprising:

receiving a read I/O request for a second data block;

checking the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit not being set:

serving the read I/O from a base disk; or

checking a second disk bitmap associated a second delta disk to for whether a fourth bit associated with the second data block is set.

5. The method of claim 1 , further comprising merging the first delta disk and the second disk, wherein the merging comprises:

scanning the first disk bitmap for one or more set bits;

for each set bit in the first disk bitmap:

setting a corresponding bit in the scanner bitmap;

copying a data block corresponding to the set bit from the first delta disk to the second disk;

setting a bit corresponding to the data block in a second disk bitmap associated with a second delta disk or a base disk bitmap;

unsetting the bit in the first disk bitmap; and

unsetting the bit in the scanner bitmap.

6. The method of claim 1 , further comprising:

during the updating of the VM:

receiving a second write I/O request, from the VM, for a second data block;

performing the second write I/O to the second data block in the second disk, wherein the second disk comprises a second delta disk; and

setting a bit corresponding to the second data block in a second disk bitmap associated with the second delta disk.

7. The method of claim 1 , further comprising:

during the updating of the VM:

receiving a third write I/O request, from the clone of the VM, for a third data block;

performing the third write I/O to the third data block in the first delta disk; and

setting a bit corresponding to the third data block in the first disk bitmap associated with the first delta disk.

8. The method of claim 1 , further comprising:

determining the updating of the VM is completed;

stunning the VM and the clone of the VM;

completing one or more in-flight I/Os of the VM and the clone of the VM;

suspending operation of the clone of the VM; and

initiating merger of the first delta disk and the second disk.

9. A system comprising:

one or more processors; and

at least one memory, the one or more processors and the at least one memory configured to:

initiate updating of a virtual machine (VM) on a host in a datacenter;

create a clone of the VM on the host, in response to initiating the update;

receive a first write input/output (I/O) request for a first data block;

check a first disk bitmap associated with a first delta disk for whether a first bit associated with the first data block is set, wherein the first disk bitmap includes a bit for each data block of the first delta disk indicating whether the data block has been modified, and wherein the first delta disk is associated with the clone of the VM;

based on the first bit being set, check a scanner bitmap for whether a second bit associated with the first data block is set, wherein the scanner bitmap includes a bit for each data block of the first delta disk indicating whether the data block is currently being merged into a second disk, and wherein the second disk is associated with the VM; and

based on the second bit being set:

wait until the first data block is merged into the second disk; and

perform the first write I/O to the first data block in the second disk after the first data block is merged into the second disk.

10. The system of claim 9 , wherein the one or more processors and the at least one memory are further configured to:

receive a second write I/O request for a second data block;

check the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit not being set:

perform the second write I/O to the second data block in a base disk; or

check a second disk bitmap associated a second delta disk for whether a fourth bit associated with the second data block is set.

11. The system of claim 9 , wherein the one or more processors and the at least one memory are further configured to:

receive a read I/O request for a second data block;

check the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit being set, serve the read I/O from the first delta disk.

12. The system of claim 9 , wherein the one or more processors and the at least one memory are further configured to:

receive a read I/O request for a second data block;

check the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit not being set:

serve the read I/O from a base disk; or

check a second disk bitmap associated a second delta disk to for whether a fourth bit associated with the second data block is set.

13. The system of claim 9 , wherein the one or more processors and the at least one memory are further configured to:

scan the first disk bitmap for one or more set bits;

for each set bit in the first disk bitmap:

set a corresponding bit in the scanner bitmap;

copy a data block corresponding to the set bit from the first delta disk to the second disk;

set a bit corresponding to the data block in a second disk bitmap associated with a second delta disk or a base disk bitmap;

unset the bit in the first disk bitmap; and

unset the bit in the scanner bitmap.

14. The system of claim 9 , wherein the one or more processors and the at least one memory are further configured to:

during the updating of the VM:

receive a second write I/O request, from the VM, for a second data block;

perform the second write I/O to the second data block in the second disk, wherein the second disk comprises a second delta disk; and

set a bit corresponding to the second data block in a second disk bitmap associated with the second delta disk.

15. The system of claim 9 , wherein the one or more processors and the at least one memory are further configured to:

during the updating of the VM:

receive a third write I/O request, from the clone of the VM, for a third data block;

perform the third write I/O to the third data block in the first delta disk; and

set a bit corresponding to the third data block in the first disk bitmap associated with the first delta disk.

16. A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors of a computing system, cause the computing system to perform operations updating a virtual machine (VM), the operations comprising:

initiating updating of the VM on a host in a datacenter;

creating a clone of the VM on the host, in response to initiating the update;

receiving a first write I/O request for a first data block;

checking a first disk bitmap associated with a first delta disk for whether a first bit associated with the first data block is set, wherein the first disk bitmap includes a bit for each data block of the first delta disk indicating whether the data block has been modified, and wherein the first delta disk is associated with the clone of the VM;

based on the first bit being set, checking a scanner bitmap for whether a second bit associated with the first data block is set, wherein the scanner bitmap includes a bit for each data block of the first delta disk indicating whether the data block is currently being merged into a second disk, and wherein the second disk is associated with the VM; and

based on the second bit being set:

waiting until the first data block is merged into the second disk; and

performing the first write I/O to the first data block in the second disk after the first data block is merged into the second disk.

17. The non-transitory computer-readable medium of claim 16 , the operations further comprising:

receiving a second write I/O request to a second data block;

checking the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit not being set:

performing the second write I/O to the second data block in a base disk; or

checking a second disk bitmap associated a second delta disk for whether a fourth bit associated with the second data block is set.

18. The non-transitory computer-readable medium of claim 16 , the operations further comprising:

receiving a read I/O request for a second data block;

checking the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit being set, serving the read I/O from the first delta disk.

19. The non-transitory computer-readable medium of claim 16 , the operations further comprising:

receiving a read I/O request for a second data block;

checking the first disk bitmap for whether a third bit associated with the second data block is set; and

based on the third bit not being set:

serving the read I/O from a base disk; or

checking a second disk bitmap associated a second delta disk to for whether a fourth bit associated with the second data block is set.

20. The non-transitory computer-readable medium of claim 16 , wherein the disk merging comprises:

scanning the first disk bitmap for one or more set bits;

for each set bit in the first disk bitmap:

setting a corresponding bit in the scanner bitmap;

copying a data block corresponding to the set bit from the first delta disk to the second disk;

setting a bit corresponding to the data block in a second disk bitmap associated with a second delta disk or a base disk bitmap;

unsetting the bit in the first disk bitmap; and

unsetting the bit in the scanner bitmap.

Assignments (2)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0242 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 8, 2022
From: BHATIA, KASHISH
To: VMWARE, INC.
Reel/Frame 058916/0432 →
Priority Claims (1)
IN 202141057069 · Dec 8, 2021 · national
Continuity (1)
Related Publication 20230176889A1 · Jun 8, 2023
References Cited (3)
US 9411620B2 · Wang · 2016 [cited by examiner]
US 20180349233A1 · Zaydman · 2018 [cited by examiner]
CN 113868026A · 2021 [cited by examiner]