CN102799483A - Method and device for converting runtime environments of operating system - Google Patents

Method and device for converting runtime environments of operating system Download PDF

Info

Publication number
CN102799483A
CN102799483A CN2012102203641A CN201210220364A CN102799483A CN 102799483 A CN102799483 A CN 102799483A CN 2012102203641 A CN2012102203641 A CN 2012102203641A CN 201210220364 A CN201210220364 A CN 201210220364A CN 102799483 A CN102799483 A CN 102799483A
Authority
CN
China
Prior art keywords
virtual machine
operating system
environment
machine environment
file
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
CN2012102203641A
Other languages
Chinese (zh)
Other versions
CN102799483B (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.)
Beijing Hongxiang Technical Service Co Ltd
Original Assignee
Beijing Qihoo Technology Co 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210220364.1A priority Critical patent/CN102799483B/en
Publication of CN102799483A publication Critical patent/CN102799483A/en
Application granted granted Critical
Publication of CN102799483B publication Critical patent/CN102799483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a method and device for converting runtime environments of an operating system, which aim to convert the operating system from a source physical/virtual machine environment to a target virtual machine environment. The method comprises the following steps of: rebuilding information indispensable to the operating system for a virtual machine disk of the target virtual machine environment according to the types of the operating system and the target virtual machine environment; in the source physical/virtual machine environment, packing files in the operating system and writing the packed files into a transport tunnel between the source physical/virtual machine environment and the target virtual machine environment; and transporting the packed files to a target location in the virtual machine disk of the target virtual machine environment through the transport tunnel, and then unpacking the packed files. The method and device disclosed by the embodiment of the invention have the advantages of needing quite small overhead in memory space, supporting online transfer operation, facilitating automatic and batched operation and improving the efficiency of transfer operation remarkably.

Description

A kind of method and apparatus that is used for the conversion operations system running environment
Technical field
The present invention relates to virtual machine technique, particularly a kind of method and apparatus that is used for the conversion operations system running environment.
Background technology
Along with the development of ic manufacturing technology, the processing power of CPU (CPU) is in continuous enhancing.Moore's Law shows: when price was constant, open ended transistor size on the integrated circuit whenever just can double at a distance from 18 months approximately, and performance also will promote one times.And in most cases, application can not promote performance along with hardware synchronization, and is especially true for small-scale application, and this just makes server resource not to be fully utilized.And use Intel Virtualization Technology to address this problem well.
Intel Virtualization Technology is meant: utilize software and hardware to combine, physical server is divided into the virtual machine of several isolation, working procedure and being independent of each other independently on each virtual machine.Intel Virtualization Technology makes physical resource accomplish more fine-grained division, thereby server resource is utilized more fully, provides cost savings; To become software operation to the operation of physical hardware, it is convenient to make that deployment, change, calamity are equipped with etc.; Than a plurality of application programs of unit operation, use virtual machine, the environment of application program is with consistent on physical machine, and O&M is simpler.
For at present popular cloud computing technology, Intel Virtualization Technology is exactly one of its core technology." infrastructure is promptly served " of cloud computing (Infrastructure as a Service; IAAS) virtual platform is provided; Utilize virtual deployment succinct characteristics fast; The user can be according to the loading condition of using actual demand, and application perhaps discharges the dynamic increase of virtual machine or reduces computing power on platform easily.
The user is from oneself environmental transport and transfer during to virtual platform; Hope can be moved smoothly mostly; Guarantee that promptly system and software environment are with original consistent; So just need P2V (Physical to Virtual, physical machine is to virtual machine) and V2V (Virtual to Virtual, virtual machine is to virtual machine) technology.P2V is meant system from the physical machine context conversion and makes virtual machine environment consistent with original physical machine environment to virtual machine environment; V2V is meant system is transformed into the virtual machine environment of another platform from the virtual machine environment of a platform, makes the source and destination virtual machine environment consistent.
For P2V, a kind of typical way is to make the Ghost mirror image.Ghost is a backup software of Symantec company, supports system partitioning is made into an image file and returns to system partitioning from image file.The step that use Ghost software carries out P2V is following:
1. needs are carried out the physical machine shutdown of P2V;
2. but prepare a boot disk that has Ghost software, from this disk startup system;
3. get into Ghost software interface, the Ghost mirror image of manufacturing system;
4. certain that the Ghost image copying of making can be discerned to virtual machine is independently on the Physical Extents;
5. select suitable disk size to create virtual machine, the subregion of preserving the Ghost mirror image is set to an additional disk of virtual machine;
6. dish or the .iso file start virtual machine from having Ghost software;
7. in the Ghost environment in virtual machine, reduce from mirror image;
8. close virtual machine, the subregion that coils and preserve the Ghost mirror image is removed from virtual machine; And
9. startup virtual machine.
This shows that it is very loaded down with trivial details using Ghost software executing P2V, this is mainly reflected in following several aspect:
1. owing to the operation characteristic of Ghost software, carry out the machinery requirement shutdown earlier of P2V, and start from the dish that has Ghost software;
2.P2V final purpose be will be with system from the physical machine environmental transport and transfer to virtual machine environment; Ghost software reaches this purpose through the step of physical machine-mirror image-virtual machine; The middle mirror image that produces has not just needed after producing virtual machine, but this process has increased the required time of P2V; And
3. image file needs extra storage space to preserve, when system when the content of storage itself is many on physical machine, to the storage of image file with duplicate and wasted storage space and IO interface resource.
For V2V, can adopt the mode identical, promptly also use Ghost software through virtual machine 1-with P2V>step of mirror image-virtual machine 2 moves.
Because the disk great majority of virtual machine are stored with file mode, can directly pass through switching software, a kind of virtual machine disk file of platform directly is transformed into the form that another platform can be discerned.For example, can be Xen (software virtual machine of Cambridge University's exploitation) the .raw form that can discern or the file of .qcow2 form with the file conversion of the .vmdk form of VMware (software virtual machine of VMware company) through the qemu-img instrument.The step that above-mentioned use crossover tool is changed is following:
1. on the physical machine of source, the virtual machine disk file is copied to the target physical machine;
2. on the target physical machine, use the disk crossover tool to convert the virtual machine disk into form that the purpose virtual machine platform can be discerned;
3. establishment virtual machine, disk are set to the disk file that obtains after the format conversion; And
4. startup virtual machine.
Use the mode of above-mentioned direct entiredisk form to carry out V2V and compare, simplified a lot with the mode of using Ghost software.Yet on the one hand, this mode is not general,, can not guarantee that suitable conversion software carries out the conversion of disc format that is; On the other hand; Some virtual machine disk is not the self-propagation form; For the virtual machine disk of this form, the size of data of disk size and storage has nothing to do, if only deposited data seldom in the very big disk of capacity; Need the virtual machine disk of conversion also to remain very big, this has brought a large amount of useless IO interface resource consumptions just for conversion and reproduction process.
Summary of the invention
In order to solve the problems of the technologies described above at least, the invention provides a kind of method and apparatus that is used for the conversion operations system running environment, wherein with operating system from the source physical machine environment or source virtual machine context conversion to the purpose virtual machine environment.
According to first aspect present invention, a kind of method that is used for the conversion operations system running environment is provided, wherein physical machine environment or source virtual machine context conversion are to the purpose virtual machine environment from the source with operating system, and this method comprises:
According to the type of said operating system and said purpose virtual machine environment, for the virtual machine disk of said purpose virtual machine environment is rebuild the essential information of said operating system;
In said source physical machine environment or said source virtual machine environment, the file in the said operating system is packed, and be written in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment; And
, and unpack the file transfer of the packaged destination locations in the virtual machine disk of said purpose virtual machine environment through said transmission tunnel.
Preferably; Said method also comprises: in the type according to said operating system and said purpose virtual machine environment is before the virtual machine disk of said purpose virtual machine environment is rebuild the step of the essential information of said operating system; According to the size of the file in the said operating system, create said virtual machine disk.
Preferably; Said method also comprises: through said transmission tunnel with the file transfer of the packaged destination locations in the virtual machine disk of said purpose virtual machine environment; And after the step that unpacks, create configuration file and start said purpose virtual machine environment.
Preferably, when said purpose virtual machine environment was fully virtualized environment, the essential information of said operating system comprised guidance information, partition information and filesystem information.
Preferably, when said purpose virtual machine environment was half virtualized environment, the essential information of said operating system comprised filesystem information.
Preferably, said operating system is BSD operating system, and said method also comprises:
After creating the step of said virtual machine disk, in the type according to said operating system and said purpose virtual machine environment is before the virtual machine disk of said purpose virtual machine environment is rebuild the step of the essential information of said operating system; Start BSD virtual machine is installed, and said virtual machine disk is tied on the said BSD installation virtual machine; And
In said source physical machine environment or said source virtual machine environment, the file in the said operating system packed and be written to after the step in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment, through said transmission tunnel with the file transfer of the packaged destination locations and the step that unpacks in the said purpose virtual machine environment before; At said BSD the said virtual machine disk of carry on the virtual machine is installed
Wherein, said type according to said operating system and the said purpose virtual machine environment virtual machine disk that is said purpose virtual machine environment the step of rebuilding the essential information of said operating system is installed on the virtual machine at said BSD and is carried out.
Preferably, said operating system is (SuSE) Linux OS, and said method also comprises:
In said source physical machine environment or said source virtual machine environment, the file in the said operating system packed and be written to after the step in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment, by said transmission tunnel with the file transfer of the packaged destination locations and the step that unpacks in the said purpose virtual machine environment before; The said virtual machine disk of carry on the physical host at said purpose virtual machine environment place
Wherein, said type according to said operating system and the said purpose virtual machine environment virtual machine disk that is said purpose virtual machine environment the step of rebuilding the essential information of said operating system is carried out on said physical host.
Preferably, when the file in the said operating system is packed, Virtual File System file and transmission tunnel file are not packed.
Preferably, said purpose virtual machine environment is Xen environment or KVM environment.
According to second aspect present invention, a kind of device that is used for the conversion operations system running environment is provided, wherein physical machine environment or source virtual machine context conversion are to the purpose virtual machine environment from the source with operating system, and this device comprises:
Rebuilding module is used for the type according to said operating system and said purpose virtual machine environment, for the virtual machine disk of said purpose virtual machine environment is rebuild the essential information of said operating system;
Packing and writing module; Be used at said source physical machine environment or said source virtual machine environment; File in the said operating system is packed, and is written in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment; And
Transmission and parse module are used for through said transmission tunnel the file transfer of the packaged destination locations to the virtual machine disk of said purpose virtual machine environment, and unpack.
Preferably, said device also comprises: create module, be used for before the essential information of the said operating system of said reconstruction module reconstructs, according to the size of the file in the said operating system, creating said virtual machine disk.
Preferably; Said device also comprises: create and the startup module; Be used at said transmission and parse module through said transmission tunnel the file transfer of packaged creating configuration file and starting said purpose virtual machine environment to the destination locations of the virtual machine disk of said purpose virtual machine environment and after unpacking.
Preferably, when said purpose virtual machine environment was fully virtualized environment, the essential information of said operating system comprised guidance information, partition information and filesystem information.
Preferably, when said purpose virtual machine environment was half virtualized environment, the essential information of said operating system comprised filesystem information.
Preferably, said operating system is BSD operating system, and said device also comprises:
Be used for after the said virtual machine disk of said establishment module creation, before the essential information of the said operating system of said reconstruction module reconstructs, start BSD and the startup module of virtual machine be installed and said virtual machine disk is tied to said BSD the binding module on the virtual machine is installed; And
The first carry module; Be used for after said packing and writing module are packed to the file of said operating system and be written in the said transmission tunnel, said transmission and parse module with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack before; At said BSD the said virtual machine disk of carry on the virtual machine is installed
Wherein, said rebuilding module is installed at said BSD and is rebuild the essential information of said operating system on the virtual machine.
Preferably, said operating system is (SuSE) Linux OS, and said device also comprises:
The second carry module; Be used for after said packing and writing module are packed to the file of said operating system and be written in the said transmission tunnel, said transmission and parse module with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack before; The said virtual machine disk of carry on the physical host at said purpose virtual machine environment place
Wherein, said rebuilding module is rebuild the essential information of said operating system on said physical host.
Preferably, said packing and writing module are not packed to Virtual File System file and transmission tunnel file when the file in the said operating system is packed.
Preferably, said purpose virtual machine environment is Xen environment or KVM environment.
The invention provides a kind of method and apparatus that is used for the conversion operations system running environment, wherein with operating system from the source physical machine environment or source virtual machine context conversion to purpose virtual machine environment (that is, P2V or V2V).The method and apparatus that is used for P2V and V2V according to an embodiment of the invention for P2V, does not need extra storage space to preserve mirror image; For V2V, do not need additional space to preserve or former form disk, the size of data of duplicating is exactly the size of actual storage data, and is therefore all very little in expense aspect the storage space for P2V and V2V; And support online P2V and V2V; Promptly can under source physical machine or the non-stop-machine situation of virtual machine, carry out P2V or V2V; And because the physical operations that does not need power-off restarting etc. to be used to shut down; Whole P2V or V2V process are convenient to robotization and batch operation, have greatly improved the efficient of P2V or V2V operation.
Description of drawings
According to detailed description below in conjunction with accompanying drawing, of the present inventionly above will become clearer with other purpose and characteristic, wherein:
Fig. 1 is the process flow diagram that is used for the method for conversion operations system running environment according to an embodiment of the invention;
Fig. 2 is step S120 and the synoptic diagram of S130 that is used for the method for conversion operations system running environment according to an embodiment of the invention; And
Fig. 3 is the block diagram that is used for the device of conversion operations system running environment according to an embodiment of the invention.
Embodiment
In following detailed description, in order to explain and the purpose of example, several details are described, so that the complete understanding for each embodiment is provided.Yet, for those of ordinary skills, can not have to realize these embodiment under the situation of these details.The component names that uses in the following description only is for easy explanation, rather than in order to carry out any restriction.
Fig. 1 is the process flow diagram that is used for the method for conversion operations system running environment according to an embodiment of the invention.
According to embodiments of the invention; Said operating system includes but not limited to desktop level operating systems such as (SuSE) Linux OS, BSD operating system, Unix operating system, Windows operating system, Mac OS operating system, Chrome OS operating system, and mobile platform operating system such as Android operating system, iOS operating system; Said physical machine environment comprises the various electronic equipments that can move the aforesaid operations system, includes but not limited to: desk-top computer, notebook, Tablet PC, mainframe computer, mobile phone, panel computer, navigating instrument, audio frequency and/or video player, radio, mobile TV, STB or the like; Source virtual machine environment and purpose virtual machine environment include but not limited to Xen virtual machine environment, KVM virtual machine environment, VMware virtual machine environment, VirtualBox virtual machine environment, Virtual PC virtual machine environment or the like.
Hereinafter; With (SuSE) Linux OS and BSD operating system, Xen virtual machine environment and KVM virtual machine environment is example; Principle of the present invention is carried out exemplary description; Yet this description only is exemplary, and scope of the present invention is not limited to this, and principle of the present invention also goes for above-mentioned other operating system and virtual machine environment.
Referring to Fig. 1, in the method that is used for the conversion operations system running environment according to an embodiment of the invention 100, with operating system from the source physical machine environment or source virtual machine context conversion to purpose virtual machine environment (that is, P2V or V2V).At the beginning, in step S110, according to the type of said operating system and said purpose virtual machine environment, for the virtual machine disk of said purpose virtual machine environment is rebuild the essential information of said operating system.Before step S 110, also want execution in step S 101:, create said virtual machine disk according to the size of the file in the said operating system.Step S101 for example can realize through creating file or block device.For Xen virtual machine environment and KVM virtual machine environment, can use the lvcreate order to create block device, perhaps use dd or qemu-img order to create file.
In addition; For BSD operating system; After step S101, before the step S110, also to carry out following steps: start BSD virtual machine (step S102) is installed, and said virtual machine disk is bound (attach) install on the virtual machine (step S 103) to said BSD; This is because for BSD operating system, install at this BSD and carry out above-mentioned steps S110 on the virtual machine.And for (SuSE) Linux OS, can go up at the physical host (that is target physical main frame) at said purpose virtual machine environment place and carry out above-mentioned steps S110.
According to embodiments of the invention, when said purpose virtual machine environment was fully virtualized environment, the essential information of said operating system comprised guidance information, partition information and filesystem information.
Fully virtualized environment moves under the situation of (SuSE) Linux OS as purpose at KVM virtual machine environment or Xen virtual machine environment; Characteristic according to (SuSE) Linux OS; On the target physical main frame, rebuilding the step that (SuSE) Linux OS moves essential information for the virtual machine disk of purpose virtual machine environment (KVM or Xen) can comprise: (1) rebuilds partition information, for example rebuilds the partition table through fdisk or parted order; (2) reset file system information is for example through mkfs order reset file system on the subregion of rebuilding; And (3) reconstruction guidance information, for example bootloader (boot loader) is installed and carries out through the grub order.
Fully virtualized environment moves under the situation of BSD operating system as purpose at KVM virtual machine environment or Xen virtual machine environment; According to the characteristic of BSD operating system, be that the step of the essential information of virtual machine disk reconstruction BSD operating system of purpose virtual machine environment (KVM or Xen) can comprise on BSD installation virtual machine:
(1) rebuilds guidance information
Owing to mbr (master boot record, MBR) information is kept under local/boot/mbr file in the BSD system, therefore for example can through as issue orders and rebuild guidance information (mbr) in this locality:
fdisk-aBI-b/boot/mbr$DISK。
(2) rebuild partition information
For example can use the disklabel order to rebuild partition information.At first prepare what a partition table configuration file, for example
c:*0unused?0?0?0
a:*04.2BSD000
Pass through disklabel-w then, disklabel-B, disklabel – R order is rebuild partition information through the partition table configuration file.
(3) reset file system information
For example can order the virtual machine file system of creating through newfs.
According to embodiments of the invention, when said purpose virtual machine environment was half virtualized environment, the essential information of said operating system comprised filesystem information.
The Xen virtual machine environment can be used as purpose half virtualized environment and moves (SuSE) Linux OS.Because half virtualized characteristic need not to read guidance information, but loads kernel (system kernel) through kernel or the pygrub (boot loader) that in configuration file, disposes when system start-up, therefore need not to rebuild at half guidance information when virtual.In addition, because half virtualized characteristic, partition information can directly be specified in configuration file, therefore also need not to rebuild at half guidance information when virtual.Like this, only need the reset file system information, this for example can realize virtual machine disk file reset file system through the mkfs order on the target physical main frame.
According to embodiments of the invention; And referring to Fig. 1; After step S110; Execution in step S120 and step S130: in said source physical machine environment or said source virtual machine environment, the file in the said operating system is packed, and be written in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment (step S120); And with the file transfer of the packaged destination locations in the virtual machine disk of said purpose virtual machine environment, and unpack (step S130) through said transmission tunnel.In addition, after above-mentioned steps S120, before the step S130, for BSD operating system, execution in step S121: the said virtual machine disk of carry (mount) on the virtual machine is installed at BSD; And for (SuSE) Linux OS, execution in step S121 ': the said virtual machine disk of carry on the physical host at said purpose virtual machine environment place.
Come step S 120 is described with step 130 referring to Fig. 2, Fig. 2 is the step S120 in the method 100 and the synoptic diagram of S130 according to an embodiment of the invention.Referring to Fig. 2; In the source in left side physical machine environment or source virtual machine environment; File in the operating system is packed; Said file comprises the file and the user file of operating system self, but not to for example/cgroup ,/proc ,/Virtual File System file such as sys packs with transmission tunnel file.Afterwards, the file with packaged is written in the transmission tunnel (for example ssh tunnel).Then,, and file is unpacked the file transfer of the packaged destination locations in the virtual machine disk of the purpose virtual machine environment on right side through the transmission tunnel at this destination locations.In said process; In packing, file is directly write in the transmission tunnel; Then through the transmission tunnel with file transfer in the virtual machine disk of purpose virtual machine environment destination locations and at this destination locations file is unpacked; Have only the Network Transmission operation in the whole process, and do not have extra intermediate file storage.
According to embodiments of the invention, after step S130, execution in step S131: create configuration file and start said purpose virtual machine environment.Said configuration file can be used for disposing hardware devices such as CPU (CPU), internal memory.
The invention provides a kind of method that is used for the conversion operations system running environment, wherein with operating system from the source physical machine environment or source virtual machine context conversion to the purpose virtual machine environment.The method that is used for P2V and V2V according to an embodiment of the invention for P2V, does not need extra storage space to preserve mirror image; For V2V, do not need additional space to preserve or former form disk, the size of data of duplicating is exactly the size of actual storage data, and is therefore all very little in expense aspect the storage space for P2V and V2V; Support online P2V and V2V; Promptly can under source physical machine or the non-stop-machine situation of virtual machine, carry out P2V or V2V; And because the physical operations that does not need power-off restarting etc. to be used to shut down, whole P2V or V2V process are convenient to robotization and batch operation, have greatly improved the efficient of P2V or V2V operation.
Corresponding with above-mentioned method 100; The present invention also provides a kind of device 200 that is used for the conversion operations system running environment; Wherein physical machine environment or source virtual machine context conversion are to the purpose virtual machine environment from the source with operating system, and referring to Fig. 3, this device 200 comprises:
Rebuilding module 210; Be used for type according to said operating system and said purpose virtual machine environment; Rebuild the essential information of said operating system for the virtual machine disk of said purpose virtual machine environment, this rebuilding module 210 can be used for carrying out the step S110 of said method 100;
Packing and writing module 220; Be used at said source physical machine environment or said source virtual machine environment; File in the said operating system is packed; And be written in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment, this packing and writing module 220 can be used for carrying out the step S120 of said method 100; And
Transmission and parse module 230; Be used for through said transmission tunnel the file transfer of packaged destination locations to the virtual machine disk of said purpose virtual machine environment; And unpack, this transmission and parse module 230 can be used for carrying out the step S130 of said method 100.
In a preferred embodiment of the invention; Said device also comprises: create module 201; Be used for before said rebuilding module 210 is rebuild the essential information of said operating system; According to the size of the file in the said operating system, create said virtual machine disk, said establishment module 201 can be used for carrying out the step S101 of said method 100.
In a preferred embodiment of the invention; Said device also comprises: create and startup module 231; Be used at said transmission and parse module 230 through said transmission tunnel the file transfer of packaged to the destination locations of the virtual machine disk of said purpose virtual machine environment and after unpacking; Create configuration file and start said purpose virtual machine environment, said establishment and startup module 231 can be used for carrying out the step S131 of said method 100.
In a preferred embodiment of the invention, when said purpose virtual machine environment was fully virtualized environment, the essential information of said operating system comprised guidance information, partition information and filesystem information.
In a preferred embodiment of the invention, when said purpose virtual machine environment was half virtualized environment, the essential information of said operating system comprised filesystem information.
In a preferred embodiment of the invention, said operating system is BSD operating system, and said device also comprises:
Be used for after the said virtual machine disk of said establishment module 201 establishments, before said rebuilding module 210 is rebuild the essential information of said operating systems; Start BSD and the startup module 202 of virtual machine is installed and said virtual machine disk is tied to the binding module 203 on the said BSD installation virtual machine, said startup module 202 can be respectively applied for step S102 and the step S103 that carries out in the said method 100 with binding module 203; And
The first carry module 221; Be used for after the file of said packing and 220 pairs of said operating systems of writing module is packed and is written in the said transmission tunnel, said transmission and parse module 230 with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack before; The said virtual machine disk of carry on said installation virtual machine; The said first carry module 221 can be used for carrying out the step S121 of said method 100
Wherein, said rebuilding module 210 is rebuild the essential information of said operating system on said installation virtual machine.
In a preferred embodiment of the invention, said operating system is (SuSE) Linux OS, and said device also comprises:
The second carry module 221'; Be used for after the file of said packing and 220 pairs of said operating systems of writing module is packed and is written in the said transmission tunnel, said transmission and parse module 230 with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack before; The said virtual machine disk of carry on the physical host at said purpose virtual machine environment place; The said second carry module 221 ' can be used for carrying out the step S121 ' of said method 100
Wherein, said rebuilding module 210 is rebuild the essential information of said operating system on said physical host.
In a preferred embodiment of the invention, said packing and writing module 220 are not packed to Virtual File System file and transmission tunnel file when the file in the said operating system is packed.
In a preferred embodiment of the invention, said purpose virtual machine environment is Xen environment or KVM environment.
Because above-mentioned respectively to install embodiment corresponding with aforementioned approaches method embodiment, therefore no longer each installed embodiment and be described in detail.
The present invention can realize with any suitable form, comprises hardware, software, firmware or their combination in any.Alternatively, the present invention can be embodied as the computer software that operates on one or more processors and/or the digital signal processor at least in part.The device of embodiments of the invention and module can be physically, on the function and realize in any suitable manner in logic.Can be in individual unit, in a plurality of unit or realize according to each function of the present invention as the part of other functional units.Likewise, the present invention can realize in individual unit, perhaps can be physically and be distributed on the function between different units and the processor.
Although combined some embodiment to describe the present invention, the present invention also is not intended to the particular form that is limited to this paper elaboration.On the contrary, scope of the present invention is only limited appended claims.In addition, combine specific embodiment to be described although characteristic possibly look like, those of ordinary skills will be appreciated that, can make up the various characteristics of described embodiment according to the present invention.In claims, word " comprises " existence of not getting rid of other modules or step.
In addition, although be listed separately, a plurality of modules or method step can be realized by for example individual unit or processor.In addition, although single feature possibly be included in the different claims, these characteristics can advantageously make up possibly, and are included in the different claims and do not mean that combination of features is infeasible.In addition, characteristic is contained in a kind of claim classification (for example claim to a method) and does not mean that and is limited to this classification, but representes that this characteristic can suitably be applied to other claim classifications (for example installing claim) equally.In addition, the order of characteristic and do not mean that necessary any particular order in the claim.And, the order of each step and do not mean that these steps must carry out according to this in proper order in the claim to a method.On the contrary, these steps can be carried out with any suitable order.In addition, plural number is not got rid of in the statement of singulative.Therefore, do not get rid of plural number for quoting of " ", " ", " first ", " second " or the like.Reference numeral in the claim only is a label, and should it be regarded as the restriction to the scope of claim.

Claims (18)

1. method (100) that is used for the conversion operations system running environment, wherein physical machine environment or source virtual machine context conversion are to the purpose virtual machine environment from the source with operating system, and said method (100) comprising:
According to the type of said operating system and said purpose virtual machine environment, for the virtual machine disk of said purpose virtual machine environment is rebuild the essential information of said operating system (S110);
In said source physical machine environment or said source virtual machine environment; File in the said operating system is packed, and is written in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment (S120); And
With the file transfer of the packaged destination locations in the virtual machine disk of said purpose virtual machine environment, and unpack (S130) through said transmission tunnel.
2. the method for claim 1; Also comprise: in the type according to said operating system and said purpose virtual machine environment is before the virtual machine disk of said purpose virtual machine environment is rebuild the step of the essential information of said operating system (S110); According to the size of the file in the said operating system, create said virtual machine disk (S101).
3. method as claimed in claim 2; Also comprise: through said transmission tunnel with the file transfer of the packaged destination locations in the virtual machine disk of said purpose virtual machine environment; And unpack after the step of (S130), create configuration file and start said purpose virtual machine environment (S131).
4. method as claimed in claim 3, when said purpose virtual machine environment was fully virtualized environment, the essential information of said operating system comprised guidance information, partition information and filesystem information.
5. method as claimed in claim 3, when said purpose virtual machine environment was half virtualized environment, the essential information of said operating system comprised filesystem information.
6. like each described method in the claim 1 to 4, wherein said operating system is BSD operating system, and said method also comprises:
After the step of creating said virtual machine disk (S101), in the type according to said operating system and said purpose virtual machine environment is before the virtual machine disk of said purpose virtual machine environment is rebuild the step of the essential information of said operating system (S110); Start BSD virtual machine (S102) is installed, and said virtual machine disk is tied on the said BSD installation virtual machine (S103); And
In said source physical machine environment or said source virtual machine environment, the file in the said operating system packed and be written to after the step of (S120) in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment, by said transmission tunnel with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack the step of (S130) before; At said BSD the said virtual machine disk of carry (S121) on the virtual machine is installed
Wherein, said type according to the said operating system virtual machine disk that is said purpose virtual machine environment the step of rebuilding the essential information of said operating system (S110) is installed on the virtual machine at said BSD and is carried out.
7. like each described method in the claim 1 to 5, wherein said operating system is (SuSE) Linux OS, and said method also comprises:
In said source physical machine environment or said source virtual machine environment, the file in the said operating system packed and be written to after the step of (S120) in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment, by said transmission tunnel with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack the step of (S130) before; The said virtual machine disk of carry (S121') on the physical host at said purpose virtual machine environment place
Wherein, said type according to said operating system and the said purpose virtual machine environment virtual machine disk that is said purpose virtual machine environment the step of rebuilding the essential information of said operating system (S110) is carried out on said physical host.
8. like each the described method in the claim 1 to 5, wherein when the file in the said operating system is packed, Virtual File System file and transmission tunnel file are not packed.
9. like each the described method in the claim 1 to 5, wherein said purpose virtual machine environment is Xen environment or KVM environment.
10. device (200) that is used for the conversion operations system running environment, wherein physical machine environment or source virtual machine context conversion are to the purpose virtual machine environment from the source with operating system, and said device (200) comprising:
Rebuilding module (210) is used for the type according to said operating system and said purpose virtual machine environment, for the virtual machine disk of said purpose virtual machine environment is rebuild the essential information of said operating system;
Packing and writing module (220); Be used at said source physical machine environment or said source virtual machine environment; File in the said operating system is packed, and is written in the transmission tunnel between said source physical machine environment or said source virtual machine environment and the said purpose virtual machine environment; And
Transmission and parse module (230) are used for through said transmission tunnel the file transfer of the packaged destination locations to the virtual machine disk of said purpose virtual machine environment, and unpack.
11. device as claimed in claim 10; Also comprise: create module (201); Be used for before said rebuilding module (210) is rebuild the essential information of said operating system,, creating said virtual machine disk according to the size of the file in the said operating system.
12. device as claimed in claim 11; Also comprise: create and startup module (231); Be used at said transmission and parse module (230) through said transmission tunnel the file transfer of packaged creating configuration file and starting said purpose virtual machine environment to the destination locations of the virtual machine disk of said purpose virtual machine environment and after unpacking.
13. device as claimed in claim 12, when said purpose virtual machine environment was fully virtualized environment, the essential information of said operating system comprised guidance information, partition information and filesystem information.
14. device as claimed in claim 13, when said purpose virtual machine environment was half virtualized environment, the essential information of said operating system comprised filesystem information.
15. like each described device in the claim 10 to 13, wherein said operating system is BSD operating system, said device also comprises:
Be used for after the said virtual machine disk of said establishment module (201) establishment, before said rebuilding module (210) is rebuild the essential information of said operating system, start BSD and the startup module (202) of virtual machine is installed and said virtual machine disk is tied to the binding module (203) on the said BSD installation virtual machine; And
The first carry module (221); Be used for after said packing and writing module (220) are packed to the file of said operating system and be written in the said transmission tunnel, said transmission and parse module (230) with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack before; At said BSD the said virtual machine disk of carry on the virtual machine is installed
Wherein, said rebuilding module (210) is installed at said BSD and is rebuild the essential information of said operating system on the virtual machine.
16. like each described device in the claim 10 to 14, wherein said operating system is (SuSE) Linux OS, said device also comprises:
The second carry module (221'); Be used for after said packing and writing module (220) are packed to the file of said operating system and be written in the said transmission tunnel, said transmission and parse module (230) with the file transfer of packaged in the said purpose virtual machine environment destination locations and unpack before; The said virtual machine disk of carry on the physical host at said purpose virtual machine environment place
Wherein, said rebuilding module (210) is rebuild the essential information of said operating system on said physical host.
17. like each described device in the claim 10 to 14, wherein said packing and writing module (220) are not packed to Virtual File System file and transmission tunnel file when the file in the said operating system is packed.
18. like each the described device in the claim 10 to 14, wherein said purpose virtual machine environment is Xen environment or KVM environment.
CN201210220364.1A 2012-06-28 2012-06-28 A kind of method and apparatus for conversion operations system running environment Active CN102799483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210220364.1A CN102799483B (en) 2012-06-28 2012-06-28 A kind of method and apparatus for conversion operations system running environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210220364.1A CN102799483B (en) 2012-06-28 2012-06-28 A kind of method and apparatus for conversion operations system running environment

Publications (2)

Publication Number Publication Date
CN102799483A true CN102799483A (en) 2012-11-28
CN102799483B CN102799483B (en) 2015-08-05

Family

ID=47198598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210220364.1A Active CN102799483B (en) 2012-06-28 2012-06-28 A kind of method and apparatus for conversion operations system running environment

Country Status (1)

Country Link
CN (1) CN102799483B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605561A (en) * 2013-11-28 2014-02-26 中标软件有限公司 Cloud computing cluster system and method for on-line migration of physical server thereof
CN104007998A (en) * 2013-02-25 2014-08-27 纬创资通股份有限公司 File conversion method for computer system
CN106155905A (en) * 2016-06-28 2016-11-23 广州华多网络科技有限公司 Applied environment changing method and device
CN106201702A (en) * 2016-07-19 2016-12-07 浪潮(北京)电子信息产业有限公司 The method of virtual machine (vm) migration, system and cloud computing management platform
CN106383796A (en) * 2016-10-18 2017-02-08 广州视睿电子科技有限公司 Method and system for identifying type of host operating system
CN106611138A (en) * 2016-12-12 2017-05-03 北京鼎普科技股份有限公司 GHOST file security check method and apparatus
CN107133067A (en) * 2017-04-07 2017-09-05 深信服科技股份有限公司 Cloud platform dispositions method and device
CN107515774A (en) * 2016-06-15 2017-12-26 阿里巴巴集团控股有限公司 A kind of online method and apparatus for replacing virtual opetrating system bottom Block Device Driver
CN107967165A (en) * 2016-10-20 2018-04-27 上海盛霄云计算技术有限公司 The offline moving method of virtual machine based on LVM
CN108170505A (en) * 2016-12-07 2018-06-15 华为技术有限公司 A kind of driven management method and host
CN108255573A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Virtual machine starts restorative procedure and server
CN113157290A (en) * 2021-05-06 2021-07-23 统信软件技术有限公司 Multi-system installation method, computing equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876909A (en) * 2009-04-30 2010-11-03 北京世纪红山科技有限公司 Method for local physical to virtual conversion in computer virtualization

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876909A (en) * 2009-04-30 2010-11-03 北京世纪红山科技有限公司 Method for local physical to virtual conversion in computer virtualization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FRANCO TRAVOSTINO ETC.: "Seamless Live Migration of Virtual Machines over the MAN/WAN", 《ELSEVIER FUTURE GENERATION COMPUTER SYSTEMS》, vol. 22, no. 8, 31 October 2006 (2006-10-31) *
张岐: "虚拟机在线迁移技术综述", 《农业网络信息》, no. 2, 26 February 2012 (2012-02-26) *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007998A (en) * 2013-02-25 2014-08-27 纬创资通股份有限公司 File conversion method for computer system
CN103605561A (en) * 2013-11-28 2014-02-26 中标软件有限公司 Cloud computing cluster system and method for on-line migration of physical server thereof
CN107515774A (en) * 2016-06-15 2017-12-26 阿里巴巴集团控股有限公司 A kind of online method and apparatus for replacing virtual opetrating system bottom Block Device Driver
CN107515774B (en) * 2016-06-15 2021-02-05 阿里巴巴集团控股有限公司 Method and device for replacing virtual operating system bottom block device driver on line
CN106155905A (en) * 2016-06-28 2016-11-23 广州华多网络科技有限公司 Applied environment changing method and device
CN106155905B (en) * 2016-06-28 2019-06-07 广州华多网络科技有限公司 Application environment switching method and device
CN106201702A (en) * 2016-07-19 2016-12-07 浪潮(北京)电子信息产业有限公司 The method of virtual machine (vm) migration, system and cloud computing management platform
CN106383796B (en) * 2016-10-18 2019-06-14 广州视睿电子科技有限公司 Method and system for identifying type of host operating system
CN106383796A (en) * 2016-10-18 2017-02-08 广州视睿电子科技有限公司 Method and system for identifying type of host operating system
CN107967165A (en) * 2016-10-20 2018-04-27 上海盛霄云计算技术有限公司 The offline moving method of virtual machine based on LVM
CN107967165B (en) * 2016-10-20 2021-09-24 上海盛霄云计算技术有限公司 Virtual machine offline migration method based on LVM
CN108170505A (en) * 2016-12-07 2018-06-15 华为技术有限公司 A kind of driven management method and host
CN106611138A (en) * 2016-12-12 2017-05-03 北京鼎普科技股份有限公司 GHOST file security check method and apparatus
CN108255573A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Virtual machine starts restorative procedure and server
CN107133067A (en) * 2017-04-07 2017-09-05 深信服科技股份有限公司 Cloud platform dispositions method and device
CN113157290A (en) * 2021-05-06 2021-07-23 统信软件技术有限公司 Multi-system installation method, computing equipment and storage medium
CN113157290B (en) * 2021-05-06 2022-05-03 统信软件技术有限公司 Multi-system installation method, computing equipment and storage medium

Also Published As

Publication number Publication date
CN102799483B (en) 2015-08-05

Similar Documents

Publication Publication Date Title
CN102799483B (en) A kind of method and apparatus for conversion operations system running environment
CN111492347B (en) System and method for updating a container
JP5302397B2 (en) System and method for installing a bootable virtual storage appliance on a virtualized server platform
US8578370B2 (en) Managing memory in multiple virtual machines
CN101364189B (en) Method and apparatus to enable runtime processor migration with operating system assistance
EP3518099B1 (en) Installation of operating system
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
JP2012190267A (en) Migration program, information processor, and migration method
US8935568B2 (en) System and method of replicating virtual machines for live migration between data centers
KR20170057237A (en) Supporting multiple operating system environments in computing device without contents conversion
WO2017185204A1 (en) Method and device for creating virtual machine
US10175886B1 (en) Systems and methods for handling missing storage image layers while provisioning containers in computer clusters
WO2013088818A1 (en) Virtual computer system, virtualization mechanism, and data management method
US9557980B2 (en) Seamless application integration apparatus and method
US20170277632A1 (en) Virtual computer system control method and virtual computer system
Ashino et al. Virtual machine migration method between different hypervisor implementations and its evaluation
CN104063234A (en) Compatible method and device
US9158554B2 (en) System and method for expediting virtual I/O server (VIOS) boot time in a virtual computing environment
US8473731B2 (en) System and method for physical to virtual disk re-layout
US10592425B2 (en) Virtualizing NVDIMM WPQ flushing with minimal overhead
US20230185580A1 (en) Single node deployment of container platform
CN114237814A (en) Virtual machine migration method and device across virtualization platforms and computer equipment
CN101982814B (en) Paging instruction for a virtualization engine to local storage
CN103106084A (en) Method for executing multiple operating systems and electronic device
EP4068091A1 (en) Hybrid approach to performing a lazy pull of container images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230703

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Hongxiang Technical Service Co.,Ltd.

Address before: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee before: 3600 Technology Group Co.,Ltd.

TR01 Transfer of patent right