CN105677444A - Method and device for starting virtual machine - Google Patents

Method and device for starting virtual machine Download PDF

Info

Publication number
CN105677444A
CN105677444A CN201511032542.8A CN201511032542A CN105677444A CN 105677444 A CN105677444 A CN 105677444A CN 201511032542 A CN201511032542 A CN 201511032542A CN 105677444 A CN105677444 A CN 105677444A
Authority
CN
China
Prior art keywords
virtual machine
file
virtual
hard disk
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201511032542.8A
Other languages
Chinese (zh)
Other versions
CN105677444B (en
Inventor
柯克
杨杰
刘军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201511032542.8A priority Critical patent/CN105677444B/en
Publication of CN105677444A publication Critical patent/CN105677444A/en
Application granted granted Critical
Publication of CN105677444B publication Critical patent/CN105677444B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Abstract

The invention discloses a method and device for starting a virtual machine. The method comprises the steps that a predetermined file system in a host is virtualized for establishing a virtual hard disk of a virtual machine, and the predetermined file system comprises a plurality of files needed for forming a predetermined operation system mirror image; the guiding file of the operation system mirror image is virtualized to obtain a virtual machine guiding file, and a virtual machine operation system is started from the virtual hard disk of the virtual machine based on the virtual machine guiding file. It is clear that the virtual machine is started directly based on a host catalog by virtualizing the predetermined file system under the host catalog, an administrator can visually, conveniently and rapidly modify the predetermined file system based on the files of the host catalog, mutual updating can be performed on the basis of the direct mapping relation between the virtual hard disk and the predetermined file system under the host catalog, hot updating can be performed on the files of the virtual machine in the host, the files of the virtual machine can be modified in the file system, and the storage space is effectively saved.

Description

A kind of method and apparatus starting virtual machine
Technical field
The invention belongs to virtual machine technical field of virtualization, particularly relate to a kind of method and apparatus starting virtual machine.
Background technology
At present, cloud computing base platform adopts operating system mirror-image fashion to start virtual machine, specifically described platform is by with general-purpose operating system mirror image for template, for each privately owned mirror image of virtual machine creating virtual machine, and the privately owned mirror image of virtual machine passing through to create is as the visible virtual hard disk mirror image of virtual machine, realizes virtual machine activation.
There are problems in this kind of Starting mode, for instance, owing to catalogue and the file of operating system mirror image are generally invisible, thus general-purpose operating system mirror image template can not be modified by management personnel easily; Due in virtual machine use procedure, the privately owned mirror image of virtual machine and general-purpose operating system mirror image are mutually disengaged, thus the amendment of general-purpose operating system mirror image can not be reflected virtual machine by management personnel, namely heat the file in the privately owned mirror image of virtual machine can not be updated, and the adjustment information produced because the amendment privately owned mirror image of virtual machine after virtual machine operation, can not update in general-purpose operating system mirror image template, need separately to be saved as new general-purpose operating system mirror image, therefore can produce substantial amounts of repetition data to take memory space.
Summary of the invention
In view of this, it is an object of the invention to provide a kind of method and apparatus starting virtual machine, it is intended to what solve that prior art exists because being operated by system image mode and starting virtual machine can not update general-purpose operating system mirror image easily, heat can not update the problems such as the privately owned mirror image of virtual machine.
For this, the following technical scheme of disclosure:
A kind of method starting virtual machine, including:
Create virtual machine virtual hard disk; Described virtual machine virtual hard disk obtains based on the first virtualization process that the predetermined file system in main frame is preset, and in described predetermined file system, storage has each file constituted needed for preset operating system mirror image;
Create described virtual machine virtual hard disk first guides file;Described first guides file to guide the second virtualization process that file is preset to obtain based on to the second of described operating system mirror image; Described second guides file to leave under the predetermined startup catalogue of described predetermined file system;
Guide file based on described first, start VME operating system from described virtual machine virtual hard disk; Described VME operating system is: the virtual file collection obtained after each file described is carried out described first virtualization process.
Said method, it is preferred that described establishment virtual machine virtual hard disk includes:
Based on default virtual machine host data exchange mechanism, described predetermined file system virtualization is turned to described virtual machine virtual hard disk.
Said method, it is preferred that the first of the described virtual machine virtual hard disk of described establishment guides file to include:
Based on described virtual machine host data exchange mechanism, virtual the first of the described virtual machine virtual hard disk that turns to of file is guided to guide file by second of operating system mirror image described in main frame.
Said method, it is preferred that described first guides file to include boot sector and the VME operating system guide of described virtual machine virtual hard disk, then described virtual machine host data exchange mechanism includes:
By the access to described virtual machine virtual hard disk boot sector of the described VME operating system, it is converted into the described in main frame second access guiding file;
By the access to the file directory information of described virtual machine virtual hard disk of the described VME operating system, it is converted into the access of directory information to predetermined file system described in main frame;
By the access to described virtual machine virtual hard disk file of the described VME operating system, it is converted into the access of file to predetermined file system described in main frame.
Said method, it is preferred that described virtual machine host data exchange mechanism realizes the data exchange between virtual machine and main frame by the shared drive region of first to file pre-in host memory.
Said method, it is preferred that also include:
After the described predetermined file system in main frame is carried out content update, to the corresponding more fresh information of virtual machine notice.
A kind of device starting virtual machine, including:
First creation module, is used for creating virtual machine virtual hard disk; Described virtual machine virtual hard disk obtains based on the first virtualization process that the predetermined file system in main frame is preset, and in described predetermined file system, storage has each file constituted needed for preset operating system mirror image;
Second creation module, first for creating described virtual machine virtual hard disk guides file; Described first guides file to guide the second virtualization process that file is preset to obtain based on to the second of described operating system mirror image; Described second guides file to leave under the predetermined startup catalogue of described predetermined file system;
Start module, for guiding file based on described first, start VME operating system from described virtual machine virtual hard disk; Described VME operating system is: the virtual file collection obtained after each file described is carried out described first virtualization process.
Said apparatus, it is preferred that described first creation module includes:
First creating unit, for based on default virtual machine host data exchange mechanism, turning to described virtual machine virtual hard disk by described predetermined file system virtualization.
Said apparatus, it is preferred that described second creation module includes:
Second creating unit, for based on described virtual machine host data exchange mechanism, by operating system mirror image described in main frame second guide virtual the first of the described virtual machine virtual hard disk that turns to of file to guide file.
Said apparatus, it is preferred that also include:
Update notification module, for after carrying out content update to the described predetermined file system in main frame, to the corresponding more fresh information of virtual machine notice.
From above scheme, the method and apparatus of startup virtual machine disclosed in the present application, creating virtual machine virtual hard disk by the predetermined file system in main frame carries out virtualization, in described predetermined file system, storage has each file constituted needed for preset operating system mirror image, obtain the first of virtual machine virtual hard disk by guiding the second of described operating system mirror image file to virtualize and guide file, afterwards, guide file based on described first, start VME operating system from virtual machine virtual hard disk. visible, the application virtualizes based on to the predetermined file system under host catalog, achieve the file system being directly based upon under host catalog and start virtual machine, management personnel the observability of Intrusion Detection based on host catalogue file can revise described predetermined file system easily, can direct mapping relations between predetermined file system and virtual machine virtual hard disk under Intrusion Detection based on host catalogue, realize the mutual renewal of both sides, heat virtual machine file can be updated in the described predetermined file system of main frame, the amendment of virtual machine file also can be reflected directly in the described file system of main frame, thus effectively saving memory space.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to the accompanying drawing provided.
The flow chart of a kind of embodiment of the method one starting virtual machine that Fig. 1 provides for the application;
The flow chart of a kind of embodiment of the method two starting virtual machine that Fig. 2 provides for the application;
The virtual machine that Fig. 3 provides for the embodiment of the present application two-host data exchange schematic diagram;
Fig. 4 is the virtual machine-host data exchange schematic diagram of prior art;
The flow chart of a kind of embodiment of the method three starting virtual machine that Fig. 5 provides for the application;
The structural representation of a kind of device embodiment six starting virtual machine that Fig. 6 provides for the application;
The structural representation of a kind of embodiment of the method five starting virtual machine that Fig. 7 provides for the application;
The structural representation of a kind of device embodiment six starting virtual machine that Fig. 8 provides for the application.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments. Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Embodiment one
With reference to the flow chart of a kind of embodiment of the method one starting virtual machine that Fig. 1, Fig. 1 provide for the application, described method may comprise steps of:
S101: create virtual machine virtual hard disk; Described virtual machine virtual hard disk obtains based on the first virtualization process that the predetermined file system in main frame is preset, and in described predetermined file system, storage has each file constituted needed for preset operating system mirror image.
General-purpose operating system mirror image is adopted to be the privately owned mirror image of template establishment virtual machine with prior art, and by turning to virtual machine virtual hard disk by virtual for privately owned for virtual machine mirror image, this scheme realizing virtual machine activation is different, the application provides a kind of and directly the corresponding document system virtualization under host catalog is turned to virtual machine virtual hard disk, and carry out the scheme of virtual machine activation on this basis.
The all files constituted needed for default general-purpose operating system mirror image deposited by the predetermined file folder that this step specifically can be passed through under host catalog, provides Hosts file basis for the virtualization mappings work (obtaining visible virtual machine virtual hard disk in virtual machine by virtualizing) between main frame → virtual machine.
Wherein, the guiding file of described general-purpose operating system mirror image also deposited by described predetermined file folder, described guiding file specifically leaves in the predetermined startup catalogue of described predetermined file folder, described guiding file includes boot sector and the booting operating system device of described general-purpose operating system mirror image, incidence relation between each file (such as conventional operating system file and guiding file etc.) deposited in described predetermined file folder and each file, collectively form one for carrying out the file system that virtual machine virtualization maps, i.e. described predetermined file system, the bibliographic structure that this document system is identical with described general-purpose operating system mirror image maintenance, to maintain in the described general-purpose operating system mirror image incidence relation between each file.
Obtaining after for virtualized file system, based on corresponding main frame-virtual machine virtualization process strategy, described predetermined file system virtualization can turned to the visible virtual machine virtual hard disk of virtual machine.
S102: create described virtual machine virtual hard disk first guides file; Described first guides file to guide the second virtualization process that file is preset to obtain based on to the second of described operating system mirror image; Described second guides file to leave under the predetermined startup catalogue of described predetermined file system.
Correspondingly, this step is equally based on described main frame-virtual machine virtualization process strategy, realize the guiding file of general-purpose operating system mirror image described in main frame predetermined file system, the virtual guiding file turning to virtual machine virtual hard disk/VME operating system, the described guiding file obtained after virtualization process includes boot sector and the VME operating system guide of virtual machine virtual hard disk.
S103: guide file based on described first, starts VME operating system from described virtual machine virtual hard disk; Described VME operating system is: the virtual file collection obtained after each file described is carried out described first virtualization process.
Carrying out after above virtualization process obtains virtual machine virtual hard disk, each file that this virtual hard disk includes for virtual be all visible, namely this hard disk includes VME operating system and VME operating system guide file all that virtual machine is visible, thus, virtual machine can start VME operating system based on the guiding file in this virtual hard disk.
Wherein, described VME operating system is: the virtual file collection obtained after each file constituting the described general-purpose operating system in main frame is virtualized.
From above scheme, the method of startup virtual machine disclosed in the present application, creating virtual machine virtual hard disk by the predetermined file system in main frame carries out virtualization, in described predetermined file system, storage has each file constituted needed for preset operating system mirror image, obtain the first of virtual machine virtual hard disk by guiding the second of described operating system mirror image file to virtualize and guide file, afterwards, guide file based on described first, start VME operating system from virtual machine virtual hard disk. visible, the application virtualizes based on to the predetermined file system under host catalog, achieve the file system being directly based upon under host catalog and start virtual machine, management personnel the observability of Intrusion Detection based on host catalogue file can revise described predetermined file system easily, can direct mapping relations between predetermined file system and virtual machine virtual hard disk under Intrusion Detection based on host catalogue, realize the mutual renewal of both sides, heat virtual machine file can be updated in the described predetermined file system of main frame, the amendment of virtual machine file also can be reflected directly in the described file system of main frame, thus effectively saving memory space.
Embodiment two
With reference to the flow chart of a kind of embodiment of the method two starting virtual machine that Fig. 2, Fig. 2 provide for the application, in the present embodiment, described step S101 specifically can be realized by below step S201, and described step S102 can be realized by below step S202:
S201: based on default virtual machine host data exchange mechanism, turns to described virtual machine virtual hard disk by described predetermined file system virtualization;
S202: based on described virtual machine host data exchange mechanism, guides virtual the first of the described virtual machine virtual hard disk that turns to of file to guide file by second of operating system mirror image described in main frame.
The present embodiment is specifically based on a virtual machine host data exchange mechanism preset, it is achieved main frame is to the File System Virtual scheme of virtual machine.
Wherein, described virtual machine host data exchange mechanism includes:
By the VME operating system access to virtual machine virtual hard disk boot sector, it is converted into the access guiding file to general-purpose operating system mirror image described in main frame;
By the VME operating system access to the file directory information of virtual machine virtual hard disk, it is converted into the access of directory information to predetermined file system described in main frame;
By the VME operating system access to virtual machine virtual hard disk file, it is converted into the access of file to predetermined file system described in main frame.
Based on above virtual machine host data exchange mechanism, the effective virtualization to virtual machine of predetermined file system described in main frame can be realized, specifically, described predetermined file system virtualization in main frame can be turned to virtual machine virtual hard disk, VME operating system can be turned to by virtual for each file constituting described general-purpose operating system mirror image in described predetermined file system, can by the guiding virtual guiding file turning to VME operating system of file of described general-purpose operating system mirror image.
In virtual machine activation or running, can based on this data exchange mechanism, being accessed by the virtual file of virtual machine is converted into the access of corresponding document system in host catalog, thus the virtual machine host data exchange mechanism that the present embodiment provides, also access for properly functioning, the normal data of virtual machine after the normal startup of virtual machine and startup simultaneously and provide guarantee.
Specifically, the present embodiment realizes a host B FM (BackEndOSFileModule in host side in advance, back-end operations system document management module), it is responsible for the file of predetermined file system described in read-write main frame, general-purpose operating system file in predetermined file system as described in reading and writing or guide file etc.; Realize a virtual machine VFSD (VirtualFileSystemDriver, front end Virtual File System drives) at virtual machine end in advance, be responsible for intercepting the virtual file access request of VME operating system. Simultaneously, in host memory space, apply for that one shares region of memory in advance, it is responsible for the data exchange realizing between virtual machine VFSD and host B FM, with reference to Fig. 3, Fig. 3 illustrates the application virtual machine-host data exchange schematic diagram based on described VFSD and BFM, in virtual machine activation or running, the data exchange between VFSD and host B FM can be passed through, it is achieved the data access to host file system.
Wherein, it should be noted that before the predetermined file system in main frame is carried out virtual machine and starts virtual machine, it is necessary in the described predetermined file system of main frame, pre-install virtual machine VFSD, to guarantee in virtual machine activation and running, the described VFSD observability to virtual machine.
The virtual machine host data exchange mechanism that application the present embodiment provides, can effectively promote the performance of virtual machine virtual access file, for convenience of comparative illustration, refer to Fig. 4, Fig. 4 illustrates the virtual machine host data exchange schematic diagram of prior art, prior art realizes the exchange of virtual machine host data by the switching strategy between file access and disk end access, wherein, as shown in Figure 4, prior art is especially by by the virtual machine access to file system, change into the sector to virtual machine virtual hard disk to access, I/O (the Input/Output to virtual machine virtual hard disk is changed into by the sector of virtual machine virtual hard disk is accessed, input/output) access, the I/O access of virtual machine virtual hard disk is intercepted and captured by the Hypervisor (virtual machine monitor) of main frame, and it is converted into the access to the privately owned mirror image of virtual machine in host file system.Visible, prior art need to realize the virtual file access of virtual machine by a series of port or address computation/conversion, corresponding, the application can adopt the shared drive region of pre-first to file in host memory to be bridge, realize between virtual machine, main frame, be made directly file or data exchange, without carrying out the calculating of loaded down with trivial details port or address, conversion, it is greatly improved the virtual file access performance of virtual machine.
Embodiment three
With reference to the flow chart of a kind of embodiment of the method three starting virtual machine that Fig. 5, Fig. 5 provide for the application, in the present embodiment, the method for described startup virtual machine can also comprise the following steps:
S501: after the described predetermined file system in main frame is carried out content update, to the corresponding more fresh information of described virtual opetrating system notice.
By above elaboration it can be seen that the application is by directly virtualizing the predetermined file system under host catalog, obtain virtual machine virtual hard disk, thus, the amendment of predetermined file system described in main frame can Rapid Thermal be updated in virtual machine by management personnel.
On this basis, the present embodiment provides the informing mechanism that a kind of file updates, realize when the described predetermined file system of main frame produces content update, in time to the corresponding more fresh information of virtual machine notice, specifically can by the described VFSD of the file of described predetermined file system/data update status notice to virtual machine, thus, the described predetermined file system of main frame is being modified, and amendment content heat is updated on the basis of virtual machine virtual hard disk, virtual machine VFSD can be known and this situation of accurate recording in time, thus the normal file/data access for successor virtual machine provides guarantee.
Embodiment four
With reference to the structural representation of a kind of device embodiment four starting virtual machine that Fig. 6, Fig. 6 provide for the application, described device may include that
First creation module 100, is used for creating virtual machine virtual hard disk; Described virtual machine virtual hard disk obtains based on the first virtualization process that the predetermined file system in main frame is preset, and in described predetermined file system, storage has each file constituted needed for preset operating system mirror image.
General-purpose operating system mirror image is adopted to be the privately owned mirror image of template establishment virtual machine with prior art, and by turning to virtual machine virtual hard disk by virtual for privately owned for virtual machine mirror image, this scheme realizing virtual machine activation is different, the application provides a kind of and directly the corresponding document system virtualization under host catalog is turned to virtual machine virtual hard disk, and carry out the scheme of virtual machine activation on this basis.
The all files constituted needed for default general-purpose operating system mirror image deposited by the predetermined file folder that this module specifically can be passed through under host catalog, provides Hosts file basis for the virtualization mappings work (obtaining visible virtual machine virtual hard disk in virtual machine by virtualizing) between main frame → virtual machine.
Wherein, the guiding file of described general-purpose operating system mirror image also deposited by described predetermined file folder, described guiding file specifically leaves in the predetermined startup catalogue of described predetermined file folder, described guiding file includes boot sector and the booting operating system device of described general-purpose operating system mirror image, incidence relation between each file (such as conventional operating system file and guiding file etc.) deposited in described predetermined file folder and each file, collectively form one for carrying out the file system that virtual machine virtualization maps, i.e. described predetermined file system, the bibliographic structure that this document system is identical with described general-purpose operating system mirror image maintenance, to maintain in the described general-purpose operating system mirror image incidence relation between each file.
Obtaining after for virtualized file system, based on corresponding main frame-virtual machine virtualization process strategy, described predetermined file system virtualization can turned to the visible virtual machine virtual hard disk of virtual machine.
Second creation module 200, first for creating described virtual machine virtual hard disk guides file; Described first guides file to guide the second virtualization process that file is preset to obtain based on to the second of described operating system mirror image; Described second guides file to leave under the predetermined startup catalogue of described predetermined file system.
Correspondingly, this module is equally based on described main frame-virtual machine virtualization process strategy, realize the guiding file of general-purpose operating system mirror image described in main frame predetermined file system, the virtual guiding file turning to virtual machine virtual hard disk/VME operating system, the described guiding file obtained after virtualization process includes boot sector and the VME operating system guide of virtual machine virtual hard disk.
Start module 300, for guiding file based on described first, start VME operating system from described virtual machine virtual hard disk; Described VME operating system is: the virtual file collection obtained after each file described is carried out described first virtualization process.
Carrying out after above virtualization process obtains virtual machine virtual hard disk, each file that this virtual hard disk includes for virtual be all visible, namely this hard disk includes VME operating system and VME operating system guide file all that virtual machine is visible, thus, virtual machine can start VME operating system based on the guiding file in this virtual hard disk.
Wherein, described VME operating system is: the virtual file collection obtained after each file constituting the described general-purpose operating system in main frame is virtualized.
From above scheme, the device of startup virtual machine disclosed in the present application, creating virtual machine virtual hard disk by the predetermined file system in main frame carries out virtualization, in described predetermined file system, storage has each file constituted needed for preset operating system mirror image, obtain the first of virtual machine virtual hard disk by guiding the second of described operating system mirror image file to virtualize and guide file, afterwards, guide file based on described first, start VME operating system from virtual machine virtual hard disk. visible, the application virtualizes based on to the predetermined file system under host catalog, achieve the file system being directly based upon under host catalog and start virtual machine, management personnel the observability of Intrusion Detection based on host catalogue file can revise described predetermined file system easily, can direct mapping relations between predetermined file system and virtual machine virtual hard disk under Intrusion Detection based on host catalogue, realize the mutual renewal of both sides, heat virtual machine file can be updated in the described predetermined file system of main frame, the amendment of virtual machine file also can be reflected directly in the described file system of main frame, thus effectively saving memory space.
Embodiment five
With reference to Fig. 7, the structural representation of a kind of embodiment of the method five starting virtual machine that Fig. 7 provides for the application, in the present embodiment, described first creation module 100 specifically can be realized by the first following creating unit 101, and described second creation module 200 specifically can be realized by the second following creating unit 201:
First creating unit 101, for based on default virtual machine host data exchange mechanism, turning to described virtual machine virtual hard disk by described predetermined file system virtualization.
Second creating unit 201, for based on described virtual machine host data exchange mechanism, by operating system mirror image described in main frame second guide virtual the first of the described virtual machine virtual hard disk that turns to of file to guide file.
The present embodiment is specifically based on a virtual machine host data exchange mechanism preset, it is achieved main frame is to the File System Virtual scheme of virtual machine.
Wherein, described virtual machine host data exchange mechanism includes:
By the VME operating system access to virtual machine virtual hard disk boot sector, it is converted into the access guiding file to general-purpose operating system mirror image described in main frame;
By the VME operating system access to the file directory information of virtual machine virtual hard disk, it is converted into the access of directory information to predetermined file system described in main frame;
By the VME operating system access to virtual machine virtual hard disk file, it is converted into the access of file to predetermined file system described in main frame.
Based on above virtual machine host data exchange mechanism, the effective virtualization to virtual machine of predetermined file system described in main frame can be realized, specifically, described predetermined file system virtualization in main frame can be turned to virtual machine virtual hard disk, VME operating system can be turned to by virtual for each file constituting described general-purpose operating system mirror image in described predetermined file system, can by the guiding virtual guiding file turning to VME operating system of file of described general-purpose operating system mirror image.
In virtual machine activation or running, can based on this data exchange mechanism, being accessed by the virtual file of virtual machine is converted into the access of corresponding document system in host catalog, thus the virtual machine host data exchange mechanism that the present embodiment provides, also access for properly functioning, the normal data of virtual machine after the normal startup of virtual machine and startup simultaneously and provide guarantee.
Specifically, the present embodiment realizes a host B FM (BackEndOSFileModule in host side in advance, back-end operations system document management module), it is responsible for the file of predetermined file system described in read-write main frame, general-purpose operating system file in predetermined file system as described in reading and writing or guide file etc.; Realize a virtual machine VFSD (VirtualFileSystemDriver, front end Virtual File System drives) at virtual machine end in advance, be responsible for intercepting the virtual file access request of VME operating system. Simultaneously, in host memory space, apply for that one shares region of memory in advance, it is responsible for the data exchange realizing between virtual machine VFSD and host B FM, with reference to Fig. 3, Fig. 3 illustrates the application virtual machine-host data exchange schematic diagram based on described VFSD and BFM, in virtual machine activation or running, the data exchange between VFSD and host B FM can be passed through, it is achieved the data access to host file system.
Wherein, it should be noted that before the predetermined file system in main frame is carried out virtual machine and starts virtual machine, it is necessary in the described predetermined file system of main frame, pre-install virtual machine VFSD, to guarantee in virtual machine activation and running, the described VFSD observability to virtual machine.
The virtual machine host data exchange mechanism that application the present embodiment provides, can effectively promote the performance of virtual machine virtual access file, for convenience of comparative illustration, refer to Fig. 4, Fig. 4 illustrates the virtual machine host data exchange schematic diagram of prior art, prior art realizes the exchange of virtual machine host data by the switching strategy between file access and disk end access, wherein, as shown in Figure 4, prior art is especially by by the virtual machine access to file system, change into the sector to virtual machine virtual hard disk to access, I/O (the Input/Output to virtual machine virtual hard disk is changed into by the sector of virtual machine virtual hard disk is accessed, input/output) access, the I/O access of virtual machine virtual hard disk is intercepted and captured by the Hypervisor (virtual machine monitor) of main frame, and it is converted into the access to the privately owned mirror image of virtual machine in host file system.Visible, prior art need to realize the virtual file access of virtual machine by a series of port or address computation/conversion, corresponding, the application can adopt the shared drive region of pre-first to file in host memory to be bridge, realize between virtual machine, main frame, be made directly file or data exchange, without carrying out the calculating of loaded down with trivial details port or address, conversion, it is greatly improved the virtual file access performance of virtual machine.
Embodiment six
With reference to the structural representation of a kind of device embodiment six starting virtual machine that Fig. 8, Fig. 8 provide for the application, in the present embodiment, described device can also include:
Update notification module 400, for after carrying out content update to the described predetermined file system in main frame, to the corresponding more fresh information of virtual machine notice.
By above elaboration it can be seen that the application is by directly virtualizing the predetermined file system under host catalog, obtain virtual machine virtual hard disk, thus, the amendment of predetermined file system described in main frame can Rapid Thermal be updated in virtual machine by management personnel.
On this basis, the present embodiment provides the informing mechanism that a kind of file updates, realize when the described predetermined file system of main frame produces content update, in time to the corresponding more fresh information of virtual machine notice, specifically can by the described VFSD of the file of described predetermined file system/data update status notice to virtual machine, thus, the described predetermined file system of main frame is being modified, and amendment content heat is updated on the basis of virtual machine virtual hard disk, virtual machine VFSD can be known and this situation of accurate recording in time, thus the normal file/data access for successor virtual machine provides guarantee.
It should be noted that each embodiment in this specification all adopts the mode gone forward one by one to describe, what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually referring to.
For convenience of description, it is divided into various module or unit to be respectively described with function when describing system above or device. Certainly, the function of each unit can be realized in same or multiple softwares and/or hardware when implementing the application.
As seen through the above description of the embodiments, those skilled in the art is it can be understood that can add the mode of required general hardware platform by software to the application and realize. Based on such understanding, the part that prior art is contributed by the technical scheme of the application substantially in other words can embody with the form of software product, this computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the application or embodiment.
Finally, it can further be stated that, in this article, the relational terms of such as first, second, third and fourth or the like is used merely to separate an entity or operation with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially. And, term " includes ", " comprising " or its any other variant are intended to comprising of nonexcludability, so that include the process of a series of key element, method, article or equipment not only include those key elements, but also include other key elements being not expressly set out, or also include the key element intrinsic for this process, method, article or equipment. When there is no more restriction, statement " including ... " key element limited, it is not excluded that there is also other identical element in including the process of described key element, method, article or equipment.
The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (10)

1. the method starting virtual machine, it is characterised in that including:
Create virtual machine virtual hard disk; Described virtual machine virtual hard disk obtains based on the first virtualization process that the predetermined file system in main frame is preset, and in described predetermined file system, storage has each file constituted needed for preset operating system mirror image;
Create described virtual machine virtual hard disk first guides file; Described first guides file to guide the second virtualization process that file is preset to obtain based on to the second of described operating system mirror image; Described second guides file to leave under the predetermined startup catalogue of described predetermined file system;
Guide file based on described first, start VME operating system from described virtual machine virtual hard disk; Described VME operating system is: the virtual file collection obtained after each file described is carried out described first virtualization process.
2. method according to claim 1, it is characterised in that described establishment virtual machine virtual hard disk includes:
Based on default virtual machine host data exchange mechanism, described predetermined file system virtualization is turned to described virtual machine virtual hard disk.
3. method according to claim 2, it is characterised in that the first of the described virtual machine virtual hard disk of described establishment guides file to include:
Based on described virtual machine host data exchange mechanism, virtual the first of the described virtual machine virtual hard disk that turns to of file is guided to guide file by second of operating system mirror image described in main frame.
4. method according to claim 3, it is characterised in that described first guides file to include boot sector and the VME operating system guide of described virtual machine virtual hard disk, then described virtual machine host data exchange mechanism includes:
By the access to described virtual machine virtual hard disk boot sector of the described VME operating system, it is converted into the described in main frame second access guiding file;
By the access to the file directory information of described virtual machine virtual hard disk of the described VME operating system, it is converted into the access of directory information to predetermined file system described in main frame;
By the access to described virtual machine virtual hard disk file of the described VME operating system, it is converted into the access of file to predetermined file system described in main frame.
5. the method according to claim 3 or 4, it is characterised in that described virtual machine host data exchange mechanism realizes the data exchange between virtual machine and main frame by the shared drive region of first to file pre-in host memory.
6. method according to claim 1, it is characterised in that also include:
After the described predetermined file system in main frame is carried out content update, to the corresponding more fresh information of virtual machine notice.
7. the device starting virtual machine, it is characterised in that including:
First creation module, is used for creating virtual machine virtual hard disk; Described virtual machine virtual hard disk obtains based on the first virtualization process that the predetermined file system in main frame is preset, and in described predetermined file system, storage has each file constituted needed for preset operating system mirror image;
Second creation module, first for creating described virtual machine virtual hard disk guides file; Described first guides file to guide the second virtualization process that file is preset to obtain based on to the second of described operating system mirror image; Described second guides file to leave under the predetermined startup catalogue of described predetermined file system;
Start module, for guiding file based on described first, start VME operating system from described virtual machine virtual hard disk;Described VME operating system is: the virtual file collection obtained after each file described is carried out described first virtualization process.
8. device according to claim 7, it is characterised in that described first creation module includes:
First creating unit, for based on default virtual machine host data exchange mechanism, turning to described virtual machine virtual hard disk by described predetermined file system virtualization.
9. device according to claim 8, it is characterised in that described second creation module includes:
Second creating unit, for based on described virtual machine host data exchange mechanism, by operating system mirror image described in main frame second guide virtual the first of the described virtual machine virtual hard disk that turns to of file to guide file.
10. device according to claim 7, it is characterised in that also include:
Update notification module, for after carrying out content update to the described predetermined file system in main frame, to the corresponding more fresh information of virtual machine notice.
CN201511032542.8A 2015-12-31 2015-12-31 A kind of method and apparatus starting virtual machine Active CN105677444B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511032542.8A CN105677444B (en) 2015-12-31 2015-12-31 A kind of method and apparatus starting virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511032542.8A CN105677444B (en) 2015-12-31 2015-12-31 A kind of method and apparatus starting virtual machine

Publications (2)

Publication Number Publication Date
CN105677444A true CN105677444A (en) 2016-06-15
CN105677444B CN105677444B (en) 2019-02-05

Family

ID=56298588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511032542.8A Active CN105677444B (en) 2015-12-31 2015-12-31 A kind of method and apparatus starting virtual machine

Country Status (1)

Country Link
CN (1) CN105677444B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291507A (en) * 2017-06-28 2017-10-24 联想(北京)有限公司 The upgrade method and electronic equipment of a kind of virtual machine virtual hard disk
CN107341073A (en) * 2017-06-08 2017-11-10 北京优帆科技有限公司 A kind of method and device for realizing container compatible mainframe fictitious host computer image file
CN107766122A (en) * 2017-09-28 2018-03-06 郑州云海信息技术有限公司 The available memory space method to set up and device of a kind of host
CN108446166A (en) * 2018-03-26 2018-08-24 中科边缘智慧信息科技(苏州)有限公司 Quick virtual machine starts method
CN110554906A (en) * 2019-09-10 2019-12-10 中国工商银行股份有限公司 virtual machine configuration management method and device
CN111796972A (en) * 2020-06-30 2020-10-20 苏州三六零智能安全科技有限公司 File hot-repair method, device, equipment and storage medium
CN113377445A (en) * 2021-08-16 2021-09-10 北京升鑫网络科技有限公司 Method and device for starting multiple operating systems from online disk

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470621A (en) * 2007-12-28 2009-07-01 埃森哲环球服务有限公司 Virtual machine configuration system
US8458694B2 (en) * 2007-04-30 2013-06-04 International Business Machines Corporation Hypervisor with cloning-awareness notifications
CN103218248A (en) * 2013-03-25 2013-07-24 华为技术有限公司 Virtual machine mirror image updating method, server and desktop cloud system
CN103514023A (en) * 2013-10-22 2014-01-15 中国科学院信息工程研究所 Method and system for off-line and automatically installing software of virtual machine
CN104580519A (en) * 2015-01-29 2015-04-29 福建师范大学福清分校 Method for rapid deployment of openstack cloud computing platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8458694B2 (en) * 2007-04-30 2013-06-04 International Business Machines Corporation Hypervisor with cloning-awareness notifications
CN101470621A (en) * 2007-12-28 2009-07-01 埃森哲环球服务有限公司 Virtual machine configuration system
CN103218248A (en) * 2013-03-25 2013-07-24 华为技术有限公司 Virtual machine mirror image updating method, server and desktop cloud system
CN103514023A (en) * 2013-10-22 2014-01-15 中国科学院信息工程研究所 Method and system for off-line and automatically installing software of virtual machine
CN104580519A (en) * 2015-01-29 2015-04-29 福建师范大学福清分校 Method for rapid deployment of openstack cloud computing platform

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341073A (en) * 2017-06-08 2017-11-10 北京优帆科技有限公司 A kind of method and device for realizing container compatible mainframe fictitious host computer image file
CN107341073B (en) * 2017-06-08 2020-07-03 北京青云科技股份有限公司 Method and device for realizing compatibility of container host and virtual host image file
CN107291507A (en) * 2017-06-28 2017-10-24 联想(北京)有限公司 The upgrade method and electronic equipment of a kind of virtual machine virtual hard disk
CN107291507B (en) * 2017-06-28 2020-10-27 联想(北京)有限公司 Upgrading method for virtual hard disk of virtual machine and electronic equipment
CN107766122A (en) * 2017-09-28 2018-03-06 郑州云海信息技术有限公司 The available memory space method to set up and device of a kind of host
CN107766122B (en) * 2017-09-28 2021-01-15 苏州浪潮智能科技有限公司 Method and device for setting available memory space of host machine
CN108446166A (en) * 2018-03-26 2018-08-24 中科边缘智慧信息科技(苏州)有限公司 Quick virtual machine starts method
CN110554906A (en) * 2019-09-10 2019-12-10 中国工商银行股份有限公司 virtual machine configuration management method and device
CN111796972A (en) * 2020-06-30 2020-10-20 苏州三六零智能安全科技有限公司 File hot-repair method, device, equipment and storage medium
CN111796972B (en) * 2020-06-30 2022-11-04 苏州三六零智能安全科技有限公司 File hot-repair method, device, equipment and storage medium
CN113377445A (en) * 2021-08-16 2021-09-10 北京升鑫网络科技有限公司 Method and device for starting multiple operating systems from online disk
CN113377445B (en) * 2021-08-16 2021-11-23 北京升鑫网络科技有限公司 Method and device for starting multiple operating systems from online disk

Also Published As

Publication number Publication date
CN105677444B (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN105677444A (en) Method and device for starting virtual machine
US11347408B2 (en) Shared network-available storage that permits concurrent data access
US10860560B2 (en) Tracking data of virtual disk snapshots using tree data structures
US9336340B1 (en) Evaluating management operations
US10222983B2 (en) Storage management computer and management method of storage apparatus
EP3117311B1 (en) Method and system for implementing virtual machine images
US8312471B2 (en) File system independent content aware cache
US10019159B2 (en) Systems, methods and devices for management of virtual memory systems
US9262097B2 (en) System and method for non-volatile random access memory emulation
US9075539B2 (en) Virtualizing storage for WPAR clients that share a common operating system of logical partition
US10140144B2 (en) Multi-site disaster recovery consistency group for heterogeneous systems
JP2010527056A (en) Virtual machine migration
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
US20110145496A1 (en) Trace-assisted startup optimization from a virtual disk
EP3048529B1 (en) Cloud system data management method
US9854037B2 (en) Identifying workload and sizing of buffers for the purpose of volume replication
US20180253257A1 (en) Trim support for a solid-state drive in a virtualized environment
GB2510185A (en) Data de-duplication between emulated disk sub-systems
Poniatowski Foundation of green IT: Consolidation, virtualization, efficiency, and ROI in the data center
CN103049546B (en) The method and apparatus of a kind of management, access system daily record
US20180276018A1 (en) Hardware Independent Interface for Cognitive Data Migration
Shah Windows Server 2012 Hyper-V: Deploying the Hyper-V Enterprise Server Virtualization Platform
Dell
Saravanan The Storage Process in Virtualization for Cloud Computing
Server Microsoft

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant