CN102799483B - A kind of method and apparatus for conversion operations system running environment - Google Patents

A kind of method and apparatus for conversion operations system running environment Download PDF

Info

Publication number
CN102799483B
CN102799483B CN201210220364.1A CN201210220364A CN102799483B CN 102799483 B CN102799483 B CN 102799483B CN 201210220364 A CN201210220364 A CN 201210220364A CN 102799483 B CN102799483 B CN 102799483B
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.)
Active
Application number
CN201210220364.1A
Other languages
Chinese (zh)
Other versions
CN102799483A (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

Abstract

The embodiment provides a kind of method and apparatus for conversion operations system running environment, by operating system from source physical/virtual machine context conversion to object virtual machine environment.The method comprises: according to the type of described operating system and described object virtual machine environment, the magnetic disk of virtual machine for described object virtual machine environment rebuilds the essential information of described operating system; In the physical/virtual machine environment of described source, the file in described operating system is packed, and be written in the transmission tunnel between described source physical/virtual machine environment and described object virtual machine environment; And by described transmission tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and to unpack.Methods and apparatus according to embodiments of the present invention, in storage space, expense is very little, and supports online conversion operations, is convenient to robotization and batch operation, drastically increases the efficiency of conversion operations.

Description

A kind of method and apparatus for conversion operations system running environment
Technical field
The present invention relates to virtual machine technique, particularly a kind of method and apparatus for conversion operations system running environment.
Background technology
Along with the development of ic manufacturing technology, the processing power of CPU (central processing unit) (CPU) is in continuous enhancing.Moore's Law shows: when price is constant, open ended transistor size on integrated circuit, about just can double every 18 months, and performance is also by lifting one times.And in most cases, application can not along with hardware synchronization improving performance, for especially true small-scale application, this just makes server resource not to be fully utilized.And use Intel Virtualization Technology to address this problem well.
Intel Virtualization Technology refers to: utilize software and hardware to combine, and physical server is divided into the virtual machine of several isolation, can working procedure and being independent of each other independently on each virtual machine.Intel Virtualization Technology physical resource is accomplished more fine-grained division, thus server resource is more fully utilized, and provides cost savings; Become software operation by the operation of physical hardware, make to dispose, that change, calamity are standby etc. is convenient; Compared to the multiple application program of unit operation, use virtual machine, the environment of application program is consistent with in physical machine, and O&M is simpler.
For cloud computing technology popular at present, Intel Virtualization Technology is exactly one of its core technology." namely infrastructure serve " (Infrastructure as a Service of cloud computing, IAAS) virtual platform is provided, utilize the feature that virtual deployment is succinct fast, user can according to the loading condition of application actual demand, and on platform, application or release virtual machine dynamically increase or reduce computing power easily.
When user is from the environmental transport and transfer of oneself to virtual platform, most hope can be moved smoothly, namely ensure that system is consistent with original with software environment, so just need P2V(Physical toVirtual, physical machine is to virtual machine) and V2V(Virtual to Virtual, virtual machine is to virtual machine) technology.P2V to refer to system from physical machine context conversion to virtual machine environment, makes virtual machine environment consistent with original physical machine environment; V2V refers to virtual machine environment system being transformed into another platform from the virtual machine environment of a platform, makes source and destination virtual machine environment consistent.
For P2V, a kind of typical way makes Ghost mirror image.Ghost is a backup software of Symantec company, supports system partitioning be made into an image file and return to system partitioning from image file.The step that use Ghost software carries out P2V is as follows:
1. the physical machine shutdown carrying out P2V will be needed;
2. prepare one with Ghost software can boot disk, from this disk startup system;
3. enter Ghost software interface, the Ghost mirror image of manufacturing system;
4. certain that the Ghost image copying made can be identified to virtual machine is independently on Physical Extents;
5. select suitable disk size to create virtual machine, the subregion preserving Ghost mirror image is set to an additional disk of virtual machine;
6. from the dish of Ghost software or .iso file start virtual machine;
7., in the Ghost environment in virtual machine, reduce from mirror image;
8. close virtual machine, the subregion coiling and preserve Ghost mirror image is removed from virtual machine; And
9. start virtual machine.
As can be seen here, it is very loaded down with trivial details for using Ghost software to perform P2V, and this is mainly reflected in following several aspect:
1. due to the operation characteristic of Ghost software, the machinery requirement carrying out P2V first shuts down, and starts from the dish with Ghost software;
The final object of 2.P2V is will by system from physical machine environmental transport and transfer to virtual machine environment, Ghost software reaches this purpose by the step of physical machine-> mirror image-> virtual machine, the middle mirror image produced just has not needed after generation virtual machine, but this process adds the time needed for P2V; And
3. image file needs extra storage space to preserve, when the system content that stores in physical machine itself is many, to the storage of image file with copy and waste storage space and IO interface resource.
For V2V, the mode identical with P2V can be adopted, namely also use Ghost software to be moved by the step of virtual machine 1-> mirror image-> virtual machine 2.
Because the disk great majority of virtual machine store with file mode, directly can pass through switching software, a kind of magnetic disk of virtual machine file of platform is directly transformed into the form that another platform can identify.Such as, can by the software virtual machine of VMware(VMware company by qemu-img instrument) the file transform of .vmdk form be the software virtual machine of Xen(Cambridge University exploitation) file of the .raw form that can identify or .qcow2 form.The step that above-mentioned use crossover tool carries out changing is as follows:
1. from the physical machine of source by magnetic disk of virtual machine file copy to object physical machine;
2. the form using disk crossover tool magnetic disk of virtual machine to be converted to object virtual machine platform in object physical machine can to identify;
3. create virtual machine, the disk file obtained after disk being set to format conversion; And
4. start virtual machine.
Use the mode of above-mentioned direct entiredisk form to compared with the mode performing V2V and use Ghost software, simplify a lot.But on the one hand, this mode is not general, that is, suitable conversion software can not be ensured to carry out the conversion of disc format; On the other hand, some magnetic disk of virtual machine is not self-propagation form, for the magnetic disk of virtual machine of this form, the size of data of disk size and storage is irrelevant, if only deposited little data in the disk that capacity is very large, need the magnetic disk of virtual machine of conversion also to remain very large, this brings a large amount of useless IO interface resource consumptions just to conversion and reproduction process.
Summary of the invention
In order at least solve the problems of the technologies described above, the invention provides a kind of method and apparatus for conversion operations system running environment, wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment.
According to a first aspect of the present invention, provide a kind of method for conversion operations system running environment, wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment, the method comprises:
According to the type of described operating system and described object virtual machine environment, the magnetic disk of virtual machine for described object virtual machine environment rebuilds the essential information of described operating system;
In described source physical machine environment or described source virtual machine environment, the file in described operating system is packed, and be written in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment; And
By described transmission tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and to unpack.
Preferably, described method also comprises: before the magnetic disk of virtual machine being described object virtual machine environment according to the type of described operating system and described object virtual machine environment rebuilds the step of the essential information of described operating system, according to the size of the file in described operating system, create described magnetic disk of virtual machine.
Preferably, described method also comprises: by described transmission tunnel by through packing file transfer to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and after carrying out the step unpacked, create configuration file and start described object virtual machine environment.
Preferably, when described object virtual machine environment is fully virtualized environment, the essential information of described operating system comprises guidance information, partition information and filesystem information.
Preferably, when described object virtual machine environment is half virtualized environment, the essential information of described operating system comprises filesystem information.
Preferably, described operating system is BSD operating system, and described method also comprises:
After the step creating described magnetic disk of virtual machine, before the magnetic disk of virtual machine being described object virtual machine environment according to the type of described operating system and described object virtual machine environment rebuilds the step of the essential information of described operating system, start BSD and virtual machine is installed, and described magnetic disk of virtual machine is tied on described BSD installation virtual machine; And
In described source physical machine environment or described source virtual machine environment, the file in described operating system is packed and after being written to the step in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment, by described transmission tunnel by the file transfer through packing to the destination locations in described object virtual machine environment and before the step unpacked, at described BSD, magnetic disk of virtual machine described in carry on virtual machine is installed
Wherein, the described type according to described operating system and described object virtual machine environment is that step that the magnetic disk of virtual machine of described object virtual machine environment rebuilds the essential information of described operating system is installed on virtual machine at described BSD and performed.
Preferably, described operating system is (SuSE) Linux OS, and described method also comprises:
In described source physical machine environment or described source virtual machine environment, the file in described operating system is packed and after being written to the step in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment, by described transmission tunnel by the file transfer through packing to the destination locations in described object virtual machine environment and before the step unpacked, magnetic disk of virtual machine described in carry on the physical host at described object virtual machine environment place
Wherein, the described type according to described operating system and described object virtual machine environment is that the step that the magnetic disk of virtual machine of described object virtual machine environment rebuilds the essential information of described operating system performs on described physical host.
Preferably, when packing to the file in described operating system, Virtual File System file and transmission tunnel file are not packed.
Preferably, described object virtual machine environment is Xen environment or KVM environment.
According to a second aspect of the present invention, provide a kind of device for conversion operations system running environment, wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment, this device comprises:
Rebuild module, for the type according to described operating system and described object virtual machine environment, the magnetic disk of virtual machine for described object virtual machine environment rebuilds the essential information of described operating system;
Packing and writing module, for in described source physical machine environment or described source virtual machine environment, file in described operating system is packed, and is written in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment; And
Transmission and parse module, for by described transmission tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and to unpack.
Preferably, described device also comprises: creation module, for before the essential information of operating system described in described reconstruction module reconstructs, according to the size of the file in described operating system, creates described magnetic disk of virtual machine.
Preferably, described device also comprises: create and start module, for by described transmission tunnel at described transmission and parse module the file transfer through packing after unpacking to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, being created configuration file and starts described object virtual machine environment.
Preferably, when described object virtual machine environment is fully virtualized environment, the essential information of described operating system comprises guidance information, partition information and filesystem information.
Preferably, when described object virtual machine environment is half virtualized environment, the essential information of described operating system comprises filesystem information.
Preferably, described operating system is BSD operating system, and described device also comprises:
For after creating described magnetic disk of virtual machine in described creation module, before the essential information of operating system described in described reconstruction module reconstructs, start BSD and the startup module of virtual machine is installed and described magnetic disk of virtual machine is tied to described BSD binding module on virtual machine is installed; And
First carry module, for to pack to the file in described operating system at described packing and writing module and by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking after being written in described transmission tunnel, at described transmission and parse module, at described BSD, magnetic disk of virtual machine described in carry on virtual machine is installed
Wherein, described reconstruction module is installed on virtual machine at described BSD and is rebuild the essential information of described operating system.
Preferably, described operating system is (SuSE) Linux OS, and described device also comprises:
Second carry module, for to pack to the file in described operating system at described packing and writing module and by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking after being written in described transmission tunnel, at described transmission and parse module, magnetic disk of virtual machine described in carry on the physical host at described object virtual machine environment place
Wherein, described reconstruction module rebuilds the essential information of described operating system on described physical host.
Preferably, described packing and writing module, when packing to the file in described operating system, are not packed to Virtual File System file and transmission tunnel file.
Preferably, described object virtual machine environment is Xen environment or KVM environment.
The invention provides a kind of method and apparatus for conversion operations system running environment, wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment (that is, P2V or V2V).According to an embodiment of the invention for the method and apparatus of P2V and V2V, for P2V, extra storage space is not needed to preserve mirror image; For V2V, do not need additional space to preserve or former format disc, the size of data copied is exactly the size of actual storage data, therefore all very little for P2V and V2V expense in storage space; And support online P2V and V2V; namely P2V or V2V can be performed under source physical machine or the non-stop-machine situation of virtual machine; and owing to not needing the physical operations for shutting down such as power-off restarting; whole P2V or V2V process is convenient to robotization and batch operation, drastically increases the efficiency of P2V or V2V operation.
Accompanying drawing explanation
According to the detailed description below in conjunction with accompanying drawing, above and other object of the present invention and feature will become clearly, wherein:
Fig. 1 is according to an embodiment of the invention for the process flow diagram of the method for conversion operations system running environment;
Fig. 2 is according to an embodiment of the invention for the schematic diagram of the step S120 in the method for conversion operations system running environment and S130; And
Fig. 3 is according to an embodiment of the invention for the block diagram of the device of conversion operations system running environment.
Embodiment
In the following detailed description, in order to the object with example is described, several details are described, to provide the complete understanding for each embodiment.But, for those of ordinary skills, these embodiments can be realized when there is no these details.The component names used in the following description is only used to easy explanation, instead of in order to carry out any restriction.
Fig. 1 is according to an embodiment of the invention for the process flow diagram of the method for conversion operations system running environment.
According to embodiments of the invention, described operating system includes but not limited to the 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 the mobile platform operating system such as Android operation system, iOS operating system; Described physical machine environment comprises the various electronic equipments that can run 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, Set Top Box etc.; Source virtual machine environment and object 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 etc.
Hereinafter, for (SuSE) Linux OS and BSD operating system, Xen virtual machine environment and KVM virtual machine environment, exemplary description is carried out to principle of the present invention, but this description is only exemplary, scope of the present invention is not limited to this, principle of the present invention also go for above-mentioned other operating system and virtual machine environment.
See Fig. 1, according to an embodiment of the invention in the method 100 of conversion operations system running environment, by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment (that is, P2V or V2V).At the beginning, in step s 110, according to the type of described operating system and described object virtual machine environment, the magnetic disk of virtual machine for described object virtual machine environment rebuilds the essential information of described operating system.Before step S 110, also to perform step S 101: according to the size of the file in described operating system, create described magnetic disk of virtual machine.Step S101 such as can be realized by establishment file or block device.For Xen virtual machine environment and KVM virtual machine environment, lvcreate order can be used to create block device, or use dd or qemu-img order to create file.
In addition, for BSD operating system, after step slol, before step S110, also following steps will be performed: start BSD and virtual machine (step S102) is installed, and described magnetic disk of virtual machine binding (attach) is installed on virtual machine (step S 103) to described BSD, this is because for BSD operating system, to install on virtual machine at this BSD and perform above-mentioned steps S110.And for (SuSE) Linux OS, can at the physical host (that is, object physical host) at described object virtual machine environment place upper execution above-mentioned steps S110.
According to embodiments of the invention, when described object virtual machine environment is fully virtualized environment, the essential information of described operating system comprises guidance information, partition information and filesystem information.
When KVM virtual machine environment or Xen virtual machine environment run (SuSE) Linux OS as the fully virtualized environment of object, according to the characteristic of (SuSE) Linux OS, for the purpose of on object physical host, the magnetic disk of virtual machine of virtual machine environment (KVM or Xen) is rebuild the step that (SuSE) Linux OS runs essential information and can be comprised: (1) rebuilds partition information, such as, rebuild the partition table by fdisk or parted order; (2) reset file system information, such as, by mkfs order reset file system on the subregion rebuild; And (3) rebuild guidance information, such as, by grub Installing of Command bootloader(boot loader) perform.
When KVM virtual machine environment or Xen virtual machine environment run BSD operating system as the fully virtualized environment of object, according to the characteristic of BSD operating system, the step of installing the essential information of magnetic disk of virtual machine reconstruction BSD operating system of virtual machine environment (KVM or Xen) for the purpose of on virtual machine at BSD can comprise:
(1) guidance information is rebuild
Due in BSD system by mbr(master boot record, Main Boot Record) under information is kept at local/boot/mbr file, therefore such as can by rebuilding guidance information (mbr) as issued orders in this locality:
fdisk-aBI-b/boot/mbr$DISK。
(2) partition information is rebuild
Disklabel order such as can be used to rebuild partition information.First what a partition table configuration file is prepared, such as
c:*0unused 0 0 0
a:*04.2BSD000
Then partition information is rebuild by disklabel-w, disklabel-B, disklabel – R order by partition table configuration file.
(3) reset file system information
Such as can create virtual machine file system by newfs order.
According to embodiments of the invention, when described object virtual machine environment is half virtualized environment, the essential information of described operating system comprises filesystem information.
Xen virtual machine environment can run (SuSE) Linux OS as object half virtualized environment.Due to half virtualized characteristic, when system starts without the need to reading guidance information, but by the kernel that configures in configuration file or pygrub(boot loader) load kernel(system kernel), therefore when half is virtual guidance information without the need to rebuilding.In addition, due to half virtualized characteristic, partition information can directly be specified in configuration file, therefore when half is virtual guidance information also without the need to rebuild.Like this, only need reset file system information, this such as can be realized magnetic disk of virtual machine file reconstruction file system by mkfs order on object physical host.
According to embodiments of the invention, and see Fig. 1, after step silo, perform step S120 and step S130: in described source physical machine environment or described source virtual machine environment, file in described operating system is packed, and be written in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment (step S120), and by described transmission tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and carry out unpacking (step S130).In addition, after above-mentioned steps S120, before step S130, for BSD operating system, perform step S121: at BSD, carry (mount) described magnetic disk of virtual machine on virtual machine is installed; And for (SuSE) Linux OS, perform step S121 ': magnetic disk of virtual machine described in carry on the physical host at described object virtual machine environment place.
Be described step S 120 and step 130 referring to Fig. 2, Fig. 2 is the schematic diagram of step S120 according to an embodiment of the invention in method 100 and S130.See Fig. 2, in the source physical machine environment or source virtual machine environment in left side, file in operating system is packed, described file comprises file and the user file of operating system self, but does not pack to the Virtual File System files such as such as/cgroup ,/proc ,/sys and transmission tunnel file.Afterwards, the file through packing is written in transmission tunnel (such as ssh tunnel).Then, by transmitting tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of the object virtual machine environment on right side, and at this destination locations, file is unpacked.In above process, file is directly write in transmission tunnel while packing, then by transmission tunnel, file transfer is unpacked file at this destination locations to the destination locations in the magnetic disk of virtual machine of object virtual machine environment, only have Internet Transmission to operate in whole process, and there is not extra intermediate file storage.
According to embodiments of the invention, after step s 130, step S131 is performed: create configuration file and start described object virtual machine environment.Described configuration file can be used for configuring the hardware devices such as CPU (central processing unit) (CPU), internal memory.
The invention provides a kind of method for conversion operations system running environment, wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment.According to an embodiment of the invention for the method for P2V and V2V, for P2V, extra storage space is not needed to preserve mirror image; For V2V, do not need additional space to preserve or former format disc, the size of data copied is exactly the size of actual storage data, therefore all very little for P2V and V2V expense in storage space; Support online P2V and V2V; namely P2V or V2V can be performed under source physical machine or the non-stop-machine situation of virtual machine; and owing to not needing the physical operations for shutting down such as power-off restarting, whole P2V or V2V process is convenient to robotization and batch operation, drastically increase the efficiency of P2V or V2V operation.
Corresponding with above-mentioned method 100, present invention also offers a kind of device 200 for conversion operations system running environment, wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment, see Fig. 3, this device 200 comprises:
Rebuild module 210, for the type according to described operating system and described object virtual machine environment, magnetic disk of virtual machine for described object virtual machine environment rebuilds the essential information of described operating system, and this reconstruction module 210 may be used for performing the step S110 in said method 100;
Packing and writing module 220, for in described source physical machine environment or described source virtual machine environment, file in described operating system is packed, and be written in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment, this packing and writing module 220 may be used for performing the step S120 in said method 100; And
Transmission and parse module 230, for by described transmission tunnel by through packing file transfer to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and unpack, this transmission and parse module 230 may be used for performing the step S130 in said method 100.
In a preferred embodiment of the invention, described device also comprises: creation module 201, before rebuilding the essential information of described operating system in described reconstruction module 210, according to the size of the file in described operating system, create described magnetic disk of virtual machine, described creation module 201 may be used for performing the step S101 in said method 100.
In a preferred embodiment of the invention, described device also comprises: create and start module 231, for at described transmission and parse module 230 by described transmission tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment and after unpacking, create configuration file and start described object virtual machine environment, described establishment and startup module 231 may be used for performing the step S131 in said method 100.
In a preferred embodiment of the invention, when described object virtual machine environment is fully virtualized environment, the essential information of described operating system comprises guidance information, partition information and filesystem information.
In a preferred embodiment of the invention, when described object virtual machine environment is half virtualized environment, the essential information of described operating system comprises filesystem information.
In a preferred embodiment of the invention, described operating system is BSD operating system, and described device also comprises:
For after creating described magnetic disk of virtual machine in described creation module 201, before described reconstruction module 210 rebuilds the essential information of described operating system, start the startup module 202 that BSD installs virtual machine and the binding module 203 described magnetic disk of virtual machine be tied on described BSD installation virtual machine, described startup module 202 and binding module 203 can be respectively used to perform the step S102 in said method 100 and step S103; And
First carry module 221, for to pack to the file in described operating system at described packing and writing module 220 and by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking after being written in described transmission tunnel, at described transmission and parse module 230, magnetic disk of virtual machine described in carry on described installation virtual machine, described first carry module 221 may be used for performing the step S121 in said method 100
Wherein, described reconstruction module 210 rebuilds the essential information of described operating system on described installation virtual machine.
In a preferred embodiment of the invention, described operating system is (SuSE) Linux OS, and described device also comprises:
Second carry module 221', for to pack to the file in described operating system at described packing and writing module 220 and by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking after being written in described transmission tunnel, at described transmission and parse module 230, magnetic disk of virtual machine described in carry on the physical host at described object virtual machine environment place, described second carry module 221 ' may be used for performing the step S121 ' in said method 100
Wherein, described reconstruction module 210 rebuilds the essential information of described operating system on described physical host.
In a preferred embodiment of the invention, described packing and writing module 220, when packing to the file in described operating system, are not packed to Virtual File System file and transmission tunnel file.
In a preferred embodiment of the invention, described object virtual machine environment is Xen environment or KVM environment.
Because above-mentioned each device embodiment is corresponding with aforementioned approaches method embodiment, therefore no longer each device embodiment is described in detail.
The present invention can realize in any suitable form, comprises hardware, software, firmware or their combination in any.Alternatively, the present invention can be embodied as the computer software operated on one or more processor and/or digital signal processor at least in part.The device of embodiments of the invention and module can realize physically, functionally and in logic in any suitable manner.Can the part in individual unit, in multiple unit or as other functional units realize according to each function of the present invention.Similarly, the present invention can realize in individual unit, or can be distributed between different units and processor physically and functionally.
Although describe the present invention in conjunction with some embodiments, the present invention is not intended to be limited to the particular form set forth herein.On the contrary, scope of the present invention is only defined by the appended claims.In addition, be described in conjunction with specific embodiment although feature may look like, those of ordinary skill in the art will be appreciated that, can combine the various features of described embodiment according to the present invention.In detail in the claims, word " comprises " existence not getting rid of other modules or step.
In addition, although be listed separately, multiple module or method step can be realized by such as individual unit or processor.In addition, although independent feature may comprise in different claims, these features can advantageously be combined possibly, and comprise in different claims and do not mean that the combination of feature is infeasible.In addition, feature to be contained in a kind of claim categories (such as claim to a method) and not to mean that and is limited to this classification, but represents that this feature suitably can be applied to other claim categories (such as device claim) equally.In addition, in claim feature order and do not mean that necessary any particular order.Further, in claim to a method each step order and do not mean that these steps must perform according to this order.On the contrary, these steps can perform with any order suitably.In addition, the statement of singulative does not get rid of plural number.Therefore, plural number is not got rid of for quoting of " ", " ", " first ", " second " etc.Reference numeral in claim is only label, and should not be regarded as the restriction of the scope to claim.

Claims (10)

1. the method for conversion operations system running environment (100), wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment, described method (100) comprising:
According to the size of the file in described operating system, create the magnetic disk of virtual machine (S101) of described object virtual machine environment;
According to the type of described operating system and described object virtual machine environment, the magnetic disk of virtual machine for described object virtual machine environment rebuilds the essential information of described operating system (S110);
In described source physical machine environment or described source virtual machine environment, file in described operating system is packed, and is written in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment (S120);
By described transmission tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and carry out unpacking (S130); And
Create configuration file and start described object virtual machine environment (S131);
Wherein, when described object virtual machine environment is fully virtualized environment, the essential information of described operating system comprises guidance information, partition information and filesystem information; Or
When described object virtual machine environment is half virtualized environment, the essential information of described operating system comprises filesystem information.
2. the method for claim 1, wherein said operating system is BSD operating system, and described method also comprises:
After the step creating described magnetic disk of virtual machine (S101), before the magnetic disk of virtual machine being described object virtual machine environment according to the type of described operating system and described object virtual machine environment rebuilds the step of the essential information of described operating system (S110), start BSD and virtual machine (S102) is installed, and described magnetic disk of virtual machine is tied on described BSD installation virtual machine (S103); And
In described source physical machine environment or described source virtual machine environment, the file in described operating system is packed and after being written to the step of (S120) in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment, by described transmission tunnel by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking the step of (S130), at described BSD, magnetic disk of virtual machine (S121) described in carry on virtual machine is installed
Wherein, the described type according to described operating system is that step that the magnetic disk of virtual machine of described object virtual machine environment rebuilds the essential information of described operating system (S110) is installed on virtual machine at described BSD and performed.
3. the method for claim 1, wherein said operating system is (SuSE) Linux OS, and described method also comprises:
In described source physical machine environment or described source virtual machine environment, the file in described operating system is packed and after being written to the step of (S120) in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment, by described transmission tunnel by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking the step of (S130), magnetic disk of virtual machine (S121') described in carry on the physical host at described object virtual machine environment place
Wherein, the described type according to described operating system and described object virtual machine environment is that the step that the magnetic disk of virtual machine of described object virtual machine environment rebuilds the essential information of described operating system (S110) performs on described physical host.
4. the method for claim 1, wherein when packing to the file in described operating system, does not pack to Virtual File System file and transmission tunnel file.
5. the method for claim 1, wherein said object virtual machine environment is Xen environment or KVM environment.
6. the device for conversion operations system running environment (200), wherein by operating system from source physical machine environment or source virtual machine context conversion to object virtual machine environment, described device (200) comprising:
Creation module (201), for the size according to the file in described operating system, creates the magnetic disk of virtual machine of described object virtual machine environment;
Rebuild module (210), for the type according to described operating system and described object virtual machine environment, the magnetic disk of virtual machine for described object virtual machine environment rebuilds the essential information of described operating system;
Packing and writing module (220), for in described source physical machine environment or described source virtual machine environment, file in described operating system is packed, and is written in described source physical machine environment or the transmission tunnel between described source virtual machine environment and described object virtual machine environment;
Transmission and parse module (230), for by described transmission tunnel by the file transfer through packing to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, and to unpack; And
Create and start module (231), for by described transmission tunnel at described transmission and parse module (230) file transfer through packing after unpacking to the destination locations in the magnetic disk of virtual machine of described object virtual machine environment, being created configuration file and starts described object virtual machine environment;
Wherein, when described object virtual machine environment is fully virtualized environment, the essential information of described operating system comprises guidance information, partition information and filesystem information; Or when described object virtual machine environment is half virtualized environment, the essential information of described operating system comprises filesystem information.
7. device as claimed in claim 6, wherein said operating system is BSD operating system, and described device also comprises:
For after creating described magnetic disk of virtual machine in described creation module (201), before described reconstruction module (210) rebuilds the essential information of described operating system, start BSD and the startup module (202) of virtual machine is installed and described magnetic disk of virtual machine is tied to described BSD binding module (203) on virtual machine is installed; And
First carry module (221), for to pack to the file in described operating system at described packing and writing module (220) and by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking after being written in described transmission tunnel, at described transmission and parse module (230), at described BSD, magnetic disk of virtual machine described in carry on virtual machine is installed
Wherein, described reconstruction module (210) is installed on virtual machine at described BSD and is rebuild the essential information of described operating system.
8. device as claimed in claim 6, wherein said operating system is (SuSE) Linux OS, and described device also comprises:
Second carry module (221'), for to pack to the file in described operating system at described packing and writing module (220) and by the file transfer through packing to the destination locations in described object virtual machine environment and before unpacking after being written in described transmission tunnel, at described transmission and parse module (230), magnetic disk of virtual machine described in carry on the physical host at described object virtual machine environment place
Wherein, described reconstruction module (210) rebuilds the essential information of described operating system on described physical host.
9. device as claimed in claim 6, wherein said packing and writing module (220), when packing to the file in described operating system, are not packed to Virtual File System file and transmission tunnel file.
10. device as claimed in claim 6, wherein said object 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 CN102799483A (en) 2012-11-28
CN102799483B true 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)

Families Citing this family (12)

* 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
CN107515774B (en) * 2016-06-15 2021-02-05 阿里巴巴集团控股有限公司 Method and device for replacing virtual operating system bottom block device driver on line
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 广州视睿电子科技有限公司 A kind of recognition methods and system of host operating system type
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
CN106611138B (en) * 2016-12-12 2020-03-31 北京鼎普科技股份有限公司 GHOST file security check method and device
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
CN114610337A (en) * 2021-05-06 2022-06-10 统信软件技术有限公司 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
Seamless Live Migration of Virtual Machines over the MAN/WAN;Franco Travostino etc.;《Elsevier Future Generation Computer Systems》;20061031;第22卷(第8期);第1-9页 *
虚拟机在线迁移技术综述;张岐;《农业网络信息》;20120226(第2期);第20-22页 *

Also Published As

Publication number Publication date
CN102799483A (en) 2012-11-28

Similar Documents

Publication Publication Date Title
CN102799483B (en) A kind of method and apparatus for conversion operations system running environment
US10740132B2 (en) Systems and methods for updating containers
US8578370B2 (en) Managing memory in multiple virtual machines
JP5302397B2 (en) System and method for installing a bootable virtual storage appliance on a virtualized server platform
CN101364189B (en) Method and apparatus to enable runtime processor migration with operating system assistance
KR102269452B1 (en) Supporting multiple operating system environments in computing device without contents conversion
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
CN101650660A (en) Booting a computer system from central storage
US10853264B2 (en) Virtual memory system
US11231953B2 (en) Minimizing downtime when importing virtual machines from other platforms
US9557980B2 (en) Seamless application integration apparatus and method
US10175886B1 (en) Systems and methods for handling missing storage image layers while provisioning containers in computer clusters
CN104063234A (en) Compatible method and device
US20190188020A1 (en) Systems and methods for adaptive access of memory namespaces
US8473731B2 (en) System and method for physical to virtual disk re-layout
US20140304495A1 (en) System and method for expediting virtual i/o server (vios) boot time in a virtual computing environment
US20200371694A1 (en) System and Method for Persistent Memory Rotation Based on Remaining Write Endurance
US20190340133A1 (en) Virtualizing nvdimm wpq flushing with minimal overhead
CN114237814A (en) Virtual machine migration method and device across virtualization platforms and computer equipment
US20240095128A1 (en) Backup and restore
US9202058B1 (en) Root volume encryption mechanism in para-virtualized virtual machine
US11966609B1 (en) Zoned namespace storage device system
US20240134550A1 (en) Zoned namespace storage device system
US20240134543A1 (en) Microservice storage device system
US20240134561A1 (en) Reconfigurable microservice storage device system

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