1. Technical Field
Embodiments of the present disclosure relate to virtual machine technology, and particularly to a computing device and a virtual machine operation control method.
2. Description of Related Art
A computing device (e.g., a mobile phone or a personal computer) may have one or more virtual machines (VMs) installed for providing multiple services to a user. To ensure data security of the virtual machines, there is a need for a computing device and a virtual machine operation control method.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word “module”, as used herein, refers to logic embodied in computing or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or computing modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
In this embodiment, the computing device 10 further includes a storage device 13 and at least one processor 14. The storage device 13 may be a dedicated memory, such as an EPROM, a hard disk drive (HDD), or a flash memory. In some embodiments, the storage device 13 may be an external storage device, such as an external hard disk, a storage card, or a data storage medium.
In step S301, a plurality of configuration files and disk image files are created and stored in the storage system 12. The configuration files indicate computing resources required by virtual machines. The computing resources may include CPU resource, memory resource, hard disk resource, and network adapter resource. The disk image files indicate various files created and used by each of the virtual machines.
In step S302, the connection module 200 establishes a communication connection between the computing device 10 and the storage system 12. In one embodiment, the computing device 10 is connected to the storage system 12 through a network. The network may be the a public or private network.
In step S303, the receipt module 210 receives a user request for performing an operation of a virtual machine in the computing device 10. The virtual machine operation may be a creation operation, an update operation, a backup operation, or a deletion operation. The receipt module 210 may provide a user interface for the input of the user request.
If the user request is for performing a creation operation or an update operation of a virtual machine, in step S304, the downloading module 220 downloads a configuration file and a disk image file of the virtual machine from the storage system 12. The downloading module 220 further stores the downloaded configuration file and the downloaded disk image file into the storage device 13 of the computing device 10.
In step S305, the creation module 230 creates the virtual machine in the computing device 10 according to the downloaded configuration file and the downloaded disk image file. The creation module 230 may allocate required computing resources (e.g., CPU, memory, hard disk, and network adapter) of the virtual machine according to the downloaded configuration file, and create a virtual disk of the virtual machine according to the downloaded disk image file.
If the user request is for performing a backup operation of a virtual machine, in step S306, the uploading module 240 uploads a configuration file and a disk image file of the virtual machine to the storage system 12. The virtual machine can be restored and reinstated according to the uploaded configuration file and the uploaded disk image file of the virtual machine.
If the user request is for performing a deletion operation of a virtual machine, in step S307, the deletion module 250 deletes the configuration file and the disk image file of the virtual machine from the storage device 13.
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
100149026 | Dec 2011 | TW | national |