Method and apparatus for swapping virtual machine memory
AssigneeRed Hat Israel, Ltd.
InventorShahar Frank
Life of this patent
Estimating the term…
Abstract
A method and system for swapping memory of a virtual machine are described. In one embodiment, virtual machines are hosted by a server and accessed by remote clients over a network. The server assigns first storage and second storage to each virtual machine, where the first storage is designated for swap memory of a respective virtual machine and the second storage is designated for persistent data of a respective virtual machine. The server monitors events pertaining to the virtual machines. Upon detecting a predefined event pertaining to one of the virtual machines, the server causes the contents of the first storage to be wiped out.
Claims12
A computer-implemented method for a server hosting a plurality of virtual machines, the method comprising:
- assigning, by a swap memory manager of the server, a first persistent storage device and a second persistent storage device to each of the plurality of virtual machines, the first persistent storage device designated to swap data and including a first virtual machine disk image for a respective virtual machine, and the second persistent storage device designated to persistent data and including one or more second virtual machine disk images for the respective virtual machine;
- monitoring, by the swap memory manager, events pertaining to the plurality of virtual machines, each virtual machine configured to use a corresponding first virtual machine disk image for operations pertaining to the swap memory and to use corresponding second virtual machine disk images for operations pertaining to the persistent data;
- and
- upon detecting, by the swap memory manager, an event pertaining to restarting or shutting down of the respective virtual machine, causing, by a processing device, contents of the first virtual machine disk image of the respective virtual machine to be wiped out, wherein contents of the second virtual machine disk images of the respective virtual machine are to be maintained for at least one of a backup, archive, cloning or mirroring operation associated with the respective virtual machine.
A system comprising:
- data storage to have a plurality of first virtual machine disk images designated for swap memory and a plurality of second virtual machine disk images designated for persistent data;
- and
- a host coupled to the data storage to run a plurality of virtual machines, wherein the host further comprises a swap memory manager operable to
- assign at least one first virtual machine disk image and at least one second virtual machine disk image to each virtual machine, each virtual machine configured to use a corresponding first virtual machine disk image for operations pertaining to the swap memory and to use corresponding second virtual machine disk images for operations pertaining to the persistent data,
- monitor events pertaining to the plurality of virtual machines,
- detect an event pertaining to restarting or shutting down of the respective virtual machine, and
- in response to the detected event, cause contents of the first virtual machine disk image of the respective virtual machine to be wiped out, wherein contents of the second virtual machine disk image of the respective virtual machine are to be maintained for at least one of a backup, archive, cloning or mirroring operation associated with the respective virtual machine.
A non-transitory computer readable storage medium including instructions that, when executed by a server processing system, cause the server processing system to perform a method, comprising:
- assigning, by a swap memory manager of the server, a first persistent storage device and a second persistent storage device to each of the plurality of virtual machines, the first persistent storage device designated to swap data and including a first virtual machine disk image for a respective virtual machine, and the second persistent storage device designated to persistent data and including one or more second virtual machine disk images for the respective virtual machine;
- monitoring, by the swap memory manager, events pertaining to the plurality of virtual machines, each virtual machine configured to use a corresponding first virtual machine disk image for operations pertaining to the swap memory and to use corresponding second virtual machine disk images for operations pertaining to the persistent data;
- and
- upon detecting, by the swap memory manager, an event pertaining to restarting or shutting down of the respective virtual machine, causing, by a processing device of the server processing system, contents of the first virtual machine disk image of the respective virtual machine to be wiped out, wherein contents of the second virtual machine disk images of the respective virtual machine are to be maintained for at least one of a backup, archive, cloning or mirroring operation associated with the respective virtual machine.
Dependencies are inferred from the claim text.