CN103856343A - Method and system for configurating virtual machine network information - Google Patents

Method and system for configurating virtual machine network information Download PDF

Info

Publication number
CN103856343A
CN103856343A CN201210517953.6A CN201210517953A CN103856343A CN 103856343 A CN103856343 A CN 103856343A CN 201210517953 A CN201210517953 A CN 201210517953A CN 103856343 A CN103856343 A CN 103856343A
Authority
CN
China
Prior art keywords
virtual machine
nbd
subset
operating system
network
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
CN201210517953.6A
Other languages
Chinese (zh)
Other versions
CN103856343B (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 Teamsun Technology Co Ltd
Original Assignee
Beijing Teamsun 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 Teamsun Technology Co Ltd filed Critical Beijing Teamsun Technology Co Ltd
Priority to CN201210517953.6A priority Critical patent/CN103856343B/en
Publication of CN103856343A publication Critical patent/CN103856343A/en
Application granted granted Critical
Publication of CN103856343B publication Critical patent/CN103856343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and system for configurating virtual machine network information. The method comprises the steps that attribute information of a virtual machine in need of network information configuration is obtained, a virtual machine mirror image file corresponding to the virtual machine is determined according to the attribute information of the virtual machine, and a target physical host is determined according to specific service requirements; the virtual machine mirror image file is mounted in a temporary catalog of an operation system of the target physical host as block equipment, a network configuration file is searched for in the temporary catalog and the network configuration file is corrected and stored. The method and system for configurating the virtual machine network information, the network information can be configurated to the virtual machine more efficiently and more stably, meanwhile, the network configuration file can be corrected remotely, and complex manual configuration is avoided.

Description

The method and system of the configuring virtual machine network information
Technical field
The present invention relates to computer information technology field, particularly relate to a kind of method and system of the configuring virtual machine network information.
Background technology
In the time creating virtual machine, there are several modes in Intel Virtualization Technology, modal method is to install by ISO file, clones by existing virtual machine conventionally, and virtual machine creating masterplate, then creates virtual machine etc. by masterplate.
At present, the initial configuration of virtual machine physically is generally divided into two parts, and a part is completed by operating system, and a part is manually completed by user.But in cloud computing environment, there is a large amount of virtual machine operations.Virtual machine may often need to be revised network profile, carry out the operation of configuration network information, and due to the particularity of cloud computing, the virtual machine quantity that is manually completed configuration operation by user is a lot, may once can create tens, up to a hundred virtual machines, if be all manually configured by user, suitable large of workload so.
In addition, when after virtual machine creating success, how to want to conduct interviews by network, be necessary for so virtual machine and configure corresponding network, can realize by manual change relevant configuration, such as WINDOWS can realize by configuring local connection, LINUX need to configure associated documents.In the time creating virtual machine by masterplate, may relate to change virtual machine network, otherwise can produce the situation of network conflict.In the time creating virtual machine in batches, need a large amount of virtual machine network setting operations, aobvious very expend energy on.
Network block equipment (Network Block Device, NBD) allows the user can be by the disk space of a distance host, is used as a block device and uses, just as a hard disk.Utilize its user very easily by the hard drive space of another station server, to be increased on home server.
Therefore for prior art, how to be a problem demanding prompt solution at the operating efficiency that improves virtual machine configuration network information in group system.
Summary of the invention
The invention provides a kind of method and system of the configuring virtual machine network information, in order to improve the operating efficiency of virtual machine configuration network information in group system.
Based on the problems referred to above, the system of a kind of configuring virtual machine network information provided by the invention, comprise multiple physical hosts, on each physical host, be provided with one or more virtual machines, in the operating system of each physical host, all dispose NBD equipment, between multiple physical hosts, complete sharing of storage by NFS agreement;
Described NBD equipment is for carrying out the configuration of the network information to the virtual machine on group system physical host;
Physical host comprises acquisition module, wherein:
Described acquisition module, needs the virtual machine of configuration network information attribute information for obtaining, and according to described virtual machine attribute information, determines the virtual machine image file that described virtual machine is corresponding, determines target physical main frame according to concrete service needed;
Described NBD equipment comprises carry configuration module, wherein:
Described carry configuration module, for being mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.
Preferably, as a kind of embodiment, described carry configuration module comprises carry submodule, wherein:
Described carry submodule, for virtual machine image file being connected to the NBD equipment of target physical main frame, judgement needs the OS Type of the virtual machine of configuration network information, if the operating system of described virtual machine is WINDOWS operating system, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system;
If the operating system of described virtual machine is LINUX operating system, whether the LINUX system that judges described virtual machine there is LVM subregion, if there is LVM subregion, generate NBD subset and multiple subregion, and in the multiple subregions that generate, search the NBD subset that LVM subregion is corresponding, activate the subregion corresponding with NBD subset, subregion corresponding after activating can produce multiple child partitions, each child partition is investigated one by one, if have the network profile that needs amendment in child partition, child partition be mounted under the temp directory of target physical host operating system; If there is not the network profile that needs amendment in child partition, child partition cancelled to state of activation; If there is not LVM subregion, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system.
Preferably, as a kind of embodiment, described carry configuration module also comprises default submodule, wherein:
Described default submodule, for before generating each NBD subset, has preset the temp directory position after NBD subset carry.
Preferably, as a kind of embodiment, described carry configuration module also comprises amendment submodule, wherein:
Described amendment submodule, under predefined temp directory corresponding to target physical host operating system NBD subset, searches the network profile that needs amendment, revises described network profile and preserves.
Preferably, as a kind of embodiment, described virtual machine attribute information comprises filename and the VME operating system type of virtual machine image file;
Described network profile comprises the network configuration information of virtual machine, and the network configuration information of described virtual machine comprises that IP, MAC Address, gateway, subnet close mask, DNS, virtual machine Adapter Name, physical host name.
Correspondingly, the present invention also provides a kind of method of the configuring virtual machine network information, comprises the following steps:
Obtain and need the virtual machine of configuration network information attribute information, according to described virtual machine attribute information, determine the virtual machine image file that described virtual machine is corresponding, determine target physical main frame according to concrete service needed;
Be mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.
Preferably, as a kind of embodiment, under the described temp directory that is mounted to target physical host operating system using virtual machine image file as block device, comprise the steps:
Virtual machine image file is connected on the NBD equipment of target physical main frame, judgement needs the OS Type of the virtual machine of configuration network information, if the operating system of described virtual machine is WINDOWS operating system, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system;
If the operating system of described virtual machine is LINUX operating system, whether the LINUX system that judges described virtual machine there is LVM subregion, if there is LVM subregion, generate NBD subset and multiple subregion, and in the multiple subregions that generate, search the NBD subset that LVM subregion is corresponding, activate the subregion corresponding with NBD subset, subregion corresponding after activating can produce multiple child partitions, each child partition is investigated one by one, if have the network profile that needs amendment in child partition, child partition be mounted under the temp directory of target physical host operating system; If there is not the network profile that needs amendment in child partition, child partition cancelled to state of activation; If there is not LVM subregion, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system.
Preferably, as a kind of embodiment, in the time carrying out carry, also comprise the steps:
Before generating each NBD subset, all preset the temp directory position after NBD subset carry.
Preferably, as a kind of embodiment, after described execution carry, be also included in Network Search configuration file under temp directory, the step of revising and preserving:
Under the predefined temp directory that NBD subset is corresponding in target physical host operating system, search the network profile that needs amendment, revise described network profile and preserve;
Preferably, as a kind of embodiment, described collocation method also comprises the steps:
After virtual machine activation, dummy machine system loads amended network profile, and carries out the operation of configuration network information.
Beneficial effect of the present invention comprises:
The invention provides a kind of method and system of the configuring virtual machine network information, wherein method comprises: obtain and need the virtual machine of configuration network information attribute information, according to described virtual machine attribute information, determine the virtual machine image file that described virtual machine is corresponding, determine target physical main frame according to concrete service needed; Be mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.The method and system of the configuring virtual machine network information provided by the invention, for the virtual machine Lookup protocol network information, reduce manual intervention and workload, thereby improved the efficiency of virtual machine configuration network information, can realize remotely modifying network profile, this will further improve allocative efficiency simultaneously.
Brief description of the drawings
Fig. 1 is the system configuration schematic diagram of an embodiment of the system of the configuring virtual machine network information of the present invention;
Fig. 2 is the structural representation of the NBD equipment in the system embodiment of the configuring virtual machine network information of the present invention in Fig. 1;
Fig. 3 is the system configuration schematic diagram of another embodiment of the system of the configuring virtual machine network information of the present invention;
Fig. 4 is the schematic flow sheet of an embodiment of the method for the configuring virtual machine network information of the present invention;
Fig. 5 is that the method for the configuring virtual machine network information of the present invention is at the schematic flow sheet of a concrete embodiment who carries out carry configuration operation.
Embodiment
Below in conjunction with Figure of description, the embodiment of the method and system to the configuring virtual machine network information in the embodiment of the present invention describes.
The embodiment of the present invention provides the system 1 of the configuring virtual machine network information, as shown in Figure 1, described configuration-system 1 comprises multiple physical hosts 2, on each physical host 2, be provided with one or more virtual machines 20, in the operating system 21 of each physical host 2, all dispose NBD equipment 211, between multiple physical hosts, complete sharing of storage by NFS agreement, described NBD equipment 211 is for realizing the configuration of the network information to the virtual machine on group system physical host, in system, each physical host of installing after NBD equipment all can be used as NBD server or client, realize mutually the operation of carry and the amendment network profile of virtual machine image file, described NBD equipment 211 comprises carry configuration module 2111, as shown in Figure 2, wherein:
Physical host 2 comprises acquisition module 22, wherein:
Described acquisition module 22, needs the virtual machine of configuration network information attribute information for obtaining, and according to described virtual machine attribute information, determines the virtual machine image file that described virtual machine is corresponding, determines target physical main frame according to concrete service needed;
Described NBD equipment 211 comprises carry configuration module 2111, wherein:
Described carry configuration module 2111, for being mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.
It should be noted that, network block equipment (NBD) is all installed in the operating system of each physical host, each after installation physical host all can be looked NBD server and client side, and can mutually realize as required the carry processing of virtual machine image file and the operation of amendment network profile wherein.
Determine target physical main frame according to concrete service needed, while installation in the operating system of target physical main frame, specifically comprise the steps:
User need to install NBD equipment and related tool (for example: nbd-server and nbd-client instrument) in server end and client.NBD is as a kind of system kernel module, and user puts into NBD.KO the operating system nucleus of target physical main frame, and loads.
The order providing by NBD equipment, first virtual machine image file is mounted to system temp directory, order as follows: qemu-nbd – c nbd-name(nbd title, can be by specifying, generate the NBD equipment of fixed qty) image-name(virtual machine image file title is virtual machine attribute information), execute after above order, NBD equipment can generate corresponding NBD subset; After installation, need under the temp directory of the operating system that is mounted to target physical main frame using virtual machine image file as block device.
Preferably, as a kind of embodiment, described carry configuration module 2111 comprises carry submodule, wherein:
Described carry submodule, for virtual machine image file being connected to the NBD equipment of target physical main frame, judgement needs the OS Type of the virtual machine of configuration network information, if the operating system of described virtual machine is WINDOWS operating system, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system;
If the operating system of described virtual machine is LINUX operating system, whether the LINUX system that judges described virtual machine there is LVM subregion, if there is LVM subregion, generate NBD subset and multiple subregion, and in the multiple subregions that generate, search the NBD subset that LVM subregion is corresponding, activate the subregion corresponding with NBD subset, subregion corresponding after activating can produce multiple child partitions, each child partition is investigated one by one, if have the network profile that needs amendment in child partition, child partition be mounted under the temp directory of target physical host operating system; If there is not the network profile that needs amendment in child partition, child partition cancelled to state of activation; If there is not LVM subregion, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system.
Preferably, as a kind of embodiment, described carry configuration module 2111 also comprises default submodule, wherein:
Described default submodule, for before generating each NBD subset, has all preset the temp directory position after NBD subset carry.
Preferably, as a kind of embodiment, described carry configuration module 2111 also comprises amendment submodule, wherein:
Described amendment submodule, described amendment submodule, under predefined temp directory corresponding to target physical host operating system NBD subset, searches the network profile that needs amendment, revises described network profile and preserves.
Revising described network profile comprises and writes network configuration script and registry information.
Preferably, comprise filename and the VME operating system type of virtual machine image file as virtual machine attribute information described in a kind of embodiment;
Described network profile comprises the network configuration information of virtual machine, and the network configuration information of described virtual machine comprises that IP, MAC Address, gateway, subnet close mask, DNS, virtual machine Adapter Name, physical host name.
Illustrate, in embodiments of the present invention, Fig. 3 has illustrated in the System Implementation layoutprocedure of the configuring virtual machine network information of the present invention.
In Fig. 3, taking two physical hosts in group system (physical host A and physical host B) as example, on physical host B or A, there is individual virtual machine (Virtual Machine, VM), virtual machine is VM1, the image file that VM1 is corresponding is that img1(img formatted file is a kind of virtual machine image file), now suppose that image file that VM1 is corresponding is on physical host B.Physical host A and physical host B are by NFS agreement (Network File System) share directory and file.By using NFS, the image file in physical host A routine access far-end (physical host B) system.
Meanwhile, suppose at physical host A according to service needed, as target physical main frame, need to be embedded in NBD kernel module is installed in the operating system of physical host A.Carry configuration module is carried out carry operation, the image file on physical host B will be mounted under physical host A temp directory, then under temp directory Network Search configuration file, revise network configuration information and also preserve network profile.
Those skilled in the art are to be understood that, the essence of the embodiment of the present invention is by NBD equipment, be mounted to virtual machine image file as block device under the temp directory of target physical host computer system, can long-range or local amendment network profile on physical host, after virtual machine activation, direct configuration network information while reading virtual machine image file.
Based on same inventive concept, the embodiment of the present invention also provides a kind of method of the configuring virtual machine network information, the principle of dealing with problems due to the method realizes by the system of aforementioned a kind of configuring virtual machine network information, therefore the enforcement of the method can be referring to the enforcement of aforementioned system function, repeats part and repeat no more.
The method of a kind of configuring virtual machine network information that the embodiment of the present invention provides, Fig. 4 is the method flow diagram of the configuring virtual machine network information of the embodiment of the present invention.As shown in Figure 4, the method that the present embodiment uses comprises following several step:
Step S100, obtain and need the virtual machine of configuration network information attribute information, according to described virtual machine attribute information, determine the virtual machine image file that described virtual machine is corresponding, determine target physical main frame according to concrete service needed;
Step S200, be mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.
Preferably, as a kind of embodiment, in step S200, under the described temp directory that is mounted to target physical host operating system using virtual machine image file as block device, comprise the steps:
Virtual machine image file is connected on the NBD equipment of target physical main frame, judgement needs the OS Type of the virtual machine of configuration network information, if the operating system of described virtual machine is WINDOWS operating system, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system;
If the operating system of described virtual machine is LINUX operating system, whether the LINUX system that judges described virtual machine there is LVM subregion, if there is LVM subregion, generate NBD subset and multiple subregion, and in the multiple subregions that generate, search the NBD subset that LVM subregion is corresponding, activate the subregion corresponding with NBD subset, subregion corresponding after activating can produce multiple child partitions, each child partition is investigated one by one, if have the network profile that needs amendment in child partition, child partition be mounted under the temp directory of target physical host operating system; If there is not the network profile that needs amendment in child partition, child partition cancelled to state of activation; If there is not LVM subregion, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system.
Preferably, as a kind of embodiment, in step S200, in the time carrying out carry, also comprise the steps:
Before generating each NBD subset, all preset the temp directory position after NBD subset carry.
Preferably, as a kind of embodiment, in step S200, after described execution carry, be also included in Network Search configuration file under temp directory, the step of revising and preserving:
Target approach physical host operating system, under the predefined temp directory that NBD subset is corresponding in target physical host operating system, searches the network profile that needs amendment, revises described network profile, also preserves;
Preferably, as a kind of embodiment, described collocation method also comprises the steps in S300:
Step S300, after virtual machine activation, dummy machine system loads amended network profile, and realizes the operation of automatic configuration network information.
In step S200, the order providing by NBD equipment, is first mounted to virtual machine image file system temp directory, orders as follows:
Qemu-nbd-c nbd-name(nbd title, can, by specifying, generate the NBD equipment of fixed qty) image-name(virtual machine image file title), executing after above order, NBD equipment can generate corresponding NBD subset; If virtual machine LINUX operating system exists LVM subregion, also can generate the multiple subregions corresponding according to the LVM subregion of institute's load images file.
NBD equipment can be according to the OS Type difference of virtual machine, and the mode that realizes carry is also different.For instance, according to the OS Type difference of virtual machine, for example WINDOWS or LINUX system.
Situation one, for WINDOWS system virtual machine; NBD equipment generates NBD subset, directly the NBD subset of generation is mounted under the default temp directory of target physical host operating system.
Situation two, for LINUX system virtual machine; Whether the LINUX system that judges described virtual machine there is LVM subregion, if there is LVM subregion, generates NBD subset and multiple subregion, then the subregion of needs is carried out to carry operation, below example describe above-mentioned concrete implementation step in detail.
For example, NBD equipment has generated multiple NBD subsets, comprise that name is called NBD0, NBD1, NBD2, ... the NBD subset of NBD16, because there is LVM subregion in the LINUX system of described virtual machine, generate subset simultaneously, multiple subregions that each subset is corresponding are also generated, and in the multiple subregions that generate, search the NBD subset that LVM subregion is corresponding, activate the subregion corresponding with NBD subset, subregion corresponding after activating can produce multiple child partitions, for example: multiple subregions that NBD0 subset is corresponding are NBD0sp1, NBD0sp2, NBD0sp3, ... NBD0spN.(N is constant).For example show that through test NBD0sp1 is system partitioning, to activate NBD0sp1, corresponding subregion after activation can produce individual child partition, each child partition is wherein investigated one by one, if have the network profile that needs amendment in child partition, child partition be mounted under the temp directory of target physical host operating system; Wherein, cancel carry for the network profile that does not need amendment in subregion, if the NBD subset at place is not system partitioning (not having the network profile that will revise), unload NBD subset, in order to use next time.
For the virtual machine of LINUX operating system, the mode difference of subregion, also distinct by the mode of NBD carry processing, as shown in Figure 5, wherein, the processing mode of Ubuntu and Debian is identical, and Centos is identical with Redhat mode.First by NBD carry image file, indistinction herein, but there is LVM subregion and image file non-LVM subregion, after completing the first step, the nbd subset that loads is out different, in system, checks it is also distinguishing by disk management instrument, and concrete difference is, exist the file of LVM subregion can generate the LVM subregion being associated with NBD subset in disk management, but not the file of LVM subregion is can not add to set out this part subregion content.
If file in LVM is carried out to carry, need to once process, first find out and device-dependent that subregion of NBD (in system, likely having other LVM subregion) by LVM system command, after finding, activating command by LVM activates, after activation, LVM state can be shown as state of activation, now just can be mounted to temp directory, after activating, may there are multiple little subregions (child partition) in LVM under it, because the file that will revise is uncertain in that child partition inside, need to carry out one by one carry, investigation, until find the child partition of the file that comprises amendment and child partition be mounted under the temp directory of target physical host operating system.After use finishes, also need LVM flyback to live, ensure that next use is normal.
There is no the file of LVM subregion, the NBD subset directly generating is mounted to temp directory, without above operation.
In embodiments of the present invention, the embodiment of the present invention provides the method for the configuring virtual machine network information, can manually arrange that realization is more stable, more high-efficient disposition operation than existing, realizes remotely modifying network profile simultaneously.Like this, in a carry image file, need the file of configuration, also avoided using a large amount of loaded down with trivial details configurators.
The embodiment of the present invention provides a kind of method and system of the configuring virtual machine network information, wherein method comprises: obtain and need the virtual machine of configuration network information attribute information, according to described virtual machine attribute information, determine the virtual machine image file that described virtual machine is corresponding, determine target physical main frame according to concrete service needed; Be mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.The method and system of the configuring virtual machine network information that the embodiment of the present invention provides, for the virtual machine Lookup protocol network information, reduce manual intervention and workload, thereby improve the efficiency of virtual machine configuration network information, can realize remotely modifying network profile, this will further improve allocative efficiency simultaneously.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (10)

1. the system of a configuring virtual machine network information, comprise multiple physical hosts, on each physical host, be provided with one or more virtual machines, it is characterized in that, in the operating system of each physical host, all dispose NBD equipment, between multiple physical hosts, complete sharing of storage by NFS agreement;
Described NBD equipment is for carrying out the configuration of the network information to the virtual machine on group system physical host;
Physical host comprises acquisition module, wherein:
Described acquisition module, needs the virtual machine of configuration network information attribute information for obtaining, and according to described virtual machine attribute information, determines the virtual machine image file that described virtual machine is corresponding, determines target physical main frame according to concrete service needed;
Described NBD equipment comprises carry configuration module, wherein:
Described carry configuration module, for being mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.
2. the system of the configuring virtual machine network information according to claim 1, is characterized in that, described carry configuration module comprises carry submodule, wherein:
Described carry submodule, for virtual machine image file being connected to the NBD equipment of target physical main frame, judgement needs the OS Type of the virtual machine of configuration network information, if the operating system of described virtual machine is WINDOWS operating system, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system;
If the operating system of described virtual machine is LINUX operating system, whether the LINUX system that judges described virtual machine there is LVM subregion, if there is LVM subregion, generate NBD subset and multiple subregion, and in the multiple subregions that generate, search the NBD subset that LVM subregion is corresponding, activate the subregion corresponding with NBD subset, subregion corresponding after activating can produce multiple child partitions, each child partition is investigated one by one, if have the network profile that needs amendment in child partition, child partition be mounted under the temp directory of target physical host operating system; If there is not the network profile that needs amendment in child partition, child partition cancelled to state of activation; If there is not LVM subregion, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system.
3. the system of the configuring virtual machine network information according to claim 2, is characterized in that, described carry configuration module also comprises default submodule, wherein:
Described default submodule, for before generating each NBD subset, has preset the temp directory position after NBD subset carry.
4. the system of the configuring virtual machine network information according to claim 3, is characterized in that, described carry configuration module also comprises amendment submodule, wherein:
Described amendment submodule, under predefined temp directory corresponding to target physical host operating system NBD subset, searches the network profile that needs amendment, revises described network profile and preserves.
5. according to the system of the configuring virtual machine network information described in claim 1-4, it is characterized in that, described virtual machine attribute information comprises filename and the VME operating system type of virtual machine image file;
Described network profile comprises the network configuration information of virtual machine, and the network configuration information of described virtual machine comprises that IP, MAC Address, gateway, subnet close mask, DNS, virtual machine Adapter Name, physical host name.
6. a method for the configuring virtual machine network information, is characterized in that, comprises the following steps:
Obtain and need the virtual machine of configuration network information attribute information, according to described virtual machine attribute information, determine the virtual machine image file that described virtual machine is corresponding, determine target physical main frame according to concrete service needed;
Be mounted to virtual machine image file as block device under the temp directory of operating system of target physical main frame, Network Search configuration file under temp directory, amendment network profile is also preserved.
7. the method for the configuring virtual machine network information according to claim 6, is characterized in that, under the described temp directory that is mounted to target physical host operating system using virtual machine image file as block device, comprises the steps:
Virtual machine image file is connected on the NBD equipment of target physical main frame, judgement needs the OS Type of the virtual machine of configuration network information, if the operating system of described virtual machine is WINDOWS operating system, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system;
If the operating system of described virtual machine is LINUX operating system, whether the LINUX system that judges described virtual machine there is LVM subregion, if there is LVM subregion, generate NBD subset and multiple subregion, and in the multiple subregions that generate, search the NBD subset that LVM subregion is corresponding, activate the subregion corresponding with NBD subset, subregion corresponding after activating can produce multiple child partitions, each child partition is investigated one by one, if have the network profile that needs amendment in child partition, child partition be mounted under the temp directory of target physical host operating system; If there is not the network profile that needs amendment in child partition, child partition cancelled to state of activation; If there is not LVM subregion, generate NBD subset, directly the NBD subset of generation is mounted under the temp directory of target physical host operating system.
8. according to the method for the configuring virtual machine network information described in claim 6 or 7, it is characterized in that, in the time carrying out carry, also comprise the steps:
Before generating each NBD subset, all preset the temp directory position after NBD subset carry.
9. the method for the configuring virtual machine network information according to claim 8, is characterized in that, after described execution carry, is also included in Network Search configuration file under temp directory, the step of revising and preserving:
Under the predefined temp directory that NBD subset is corresponding in target physical host operating system, search the network profile that needs amendment, revise described network profile and preserve.
10. the method for the configuring virtual machine network information according to claim 6, is characterized in that, described collocation method also comprises the steps:
After virtual machine activation, dummy machine system loads amended network profile, and carries out the operation of configuration network information.
CN201210517953.6A 2012-12-05 2012-12-05 Configure the method and system of virtual machine network information Active CN103856343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210517953.6A CN103856343B (en) 2012-12-05 2012-12-05 Configure the method and system of virtual machine network information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210517953.6A CN103856343B (en) 2012-12-05 2012-12-05 Configure the method and system of virtual machine network information

Publications (2)

Publication Number Publication Date
CN103856343A true CN103856343A (en) 2014-06-11
CN103856343B CN103856343B (en) 2017-07-07

Family

ID=50863588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210517953.6A Active CN103856343B (en) 2012-12-05 2012-12-05 Configure the method and system of virtual machine network information

Country Status (1)

Country Link
CN (1) CN103856343B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306622A (en) * 2015-11-30 2016-02-03 南京优速网络科技有限公司 Cloud network convergence domain name analysis system and DNS service method thereof
CN105573820A (en) * 2015-12-15 2016-05-11 国云科技股份有限公司 Hot plug method for Xen virtual machine compact disc
CN105573819A (en) * 2015-12-11 2016-05-11 国云科技股份有限公司 Method for obtaining disk capacity information of virtual machine directly through host machine
CN106155759A (en) * 2015-03-26 2016-11-23 华为软件技术有限公司 virtual machine batch creation method and device
CN106383796A (en) * 2016-10-18 2017-02-08 广州视睿电子科技有限公司 Host operation system type identification method and system
CN106656621A (en) * 2016-12-31 2017-05-10 云宏信息科技股份有限公司 Method and system for configuring virtual machine DNS based on XEN
CN107463427A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 The acquisition methods and device of a kind of VME operating system type and version
CN107463404A (en) * 2017-08-03 2017-12-12 浪潮(北京)电子信息产业有限公司 Increase the method and system of configuration file in a kind of system to virtual machine file
CN107493204A (en) * 2016-06-13 2017-12-19 阿里巴巴集团控股有限公司 The method and device of a kind of microscope testing
CN107608753A (en) * 2016-07-12 2018-01-19 阿里巴巴集团控股有限公司 A kind of virtual machine creation method and device
CN107861761A (en) * 2017-10-31 2018-03-30 北京优帆科技有限公司 A kind of startup method and system of physical host
CN108170508A (en) * 2017-12-12 2018-06-15 顺丰科技有限公司 Batch creates method, apparatus, equipment and its storage medium of virtual machine
CN110333931A (en) * 2019-05-27 2019-10-15 北京迈格威科技有限公司 The system of shared storage for training pattern
CN110618896A (en) * 2018-06-19 2019-12-27 深信服科技股份有限公司 Data processing method and device, equipment and computer storage medium
CN112653739A (en) * 2020-12-14 2021-04-13 南京壹进制信息科技有限公司 Agent emergency disaster recovery method and system for externally-assigned virtual machine network
WO2022134918A1 (en) * 2020-12-24 2022-06-30 中兴通讯股份有限公司 Virtual machine attribute changing method and apparatus, storage medium, and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088367A (en) * 2010-12-10 2011-06-08 北京世纪互联工程技术服务有限公司 Method for quickly deploying in virtualization environment
CN102455929A (en) * 2011-08-19 2012-05-16 中标软件有限公司 Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image
CN102567075A (en) * 2011-12-05 2012-07-11 中标软件有限公司 Virtual machine context setting method in cloud computing environment
US20120191908A1 (en) * 2011-01-25 2012-07-26 International Business Machines Corporation Storage writes in a mirrored virtual machine system
CN102662727A (en) * 2012-04-05 2012-09-12 北京天地云箱科技有限公司 Virtual machine creating method and virtual machine creating device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088367A (en) * 2010-12-10 2011-06-08 北京世纪互联工程技术服务有限公司 Method for quickly deploying in virtualization environment
US20120191908A1 (en) * 2011-01-25 2012-07-26 International Business Machines Corporation Storage writes in a mirrored virtual machine system
CN102455929A (en) * 2011-08-19 2012-05-16 中标软件有限公司 Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image
CN102567075A (en) * 2011-12-05 2012-07-11 中标软件有限公司 Virtual machine context setting method in cloud computing environment
CN102662727A (en) * 2012-04-05 2012-09-12 北京天地云箱科技有限公司 Virtual machine creating method and virtual machine creating device

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155759A (en) * 2015-03-26 2016-11-23 华为软件技术有限公司 virtual machine batch creation method and device
CN106155759B (en) * 2015-03-26 2019-05-28 华为软件技术有限公司 Virtual machine batch creation method and device
CN105306622A (en) * 2015-11-30 2016-02-03 南京优速网络科技有限公司 Cloud network convergence domain name analysis system and DNS service method thereof
CN105306622B (en) * 2015-11-30 2018-08-10 南京优速网络科技有限公司 A kind of cloud net fusion domain name analysis system and its DNS service method
CN105573819A (en) * 2015-12-11 2016-05-11 国云科技股份有限公司 Method for obtaining disk capacity information of virtual machine directly through host machine
CN105573820A (en) * 2015-12-15 2016-05-11 国云科技股份有限公司 Hot plug method for Xen virtual machine compact disc
CN107493204A (en) * 2016-06-13 2017-12-19 阿里巴巴集团控股有限公司 The method and device of a kind of microscope testing
CN107608753A (en) * 2016-07-12 2018-01-19 阿里巴巴集团控股有限公司 A kind of virtual machine creation method and device
CN106383796A (en) * 2016-10-18 2017-02-08 广州视睿电子科技有限公司 Host operation system type identification method and system
CN106383796B (en) * 2016-10-18 2019-06-14 广州视睿电子科技有限公司 A kind of recognition methods and system of host operating system type
CN106656621A (en) * 2016-12-31 2017-05-10 云宏信息科技股份有限公司 Method and system for configuring virtual machine DNS based on XEN
CN107463427A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 The acquisition methods and device of a kind of VME operating system type and version
CN107463404A (en) * 2017-08-03 2017-12-12 浪潮(北京)电子信息产业有限公司 Increase the method and system of configuration file in a kind of system to virtual machine file
CN107861761A (en) * 2017-10-31 2018-03-30 北京优帆科技有限公司 A kind of startup method and system of physical host
CN108170508A (en) * 2017-12-12 2018-06-15 顺丰科技有限公司 Batch creates method, apparatus, equipment and its storage medium of virtual machine
CN110618896A (en) * 2018-06-19 2019-12-27 深信服科技股份有限公司 Data processing method and device, equipment and computer storage medium
CN110333931A (en) * 2019-05-27 2019-10-15 北京迈格威科技有限公司 The system of shared storage for training pattern
CN112653739A (en) * 2020-12-14 2021-04-13 南京壹进制信息科技有限公司 Agent emergency disaster recovery method and system for externally-assigned virtual machine network
WO2022134918A1 (en) * 2020-12-24 2022-06-30 中兴通讯股份有限公司 Virtual machine attribute changing method and apparatus, storage medium, and electronic device

Also Published As

Publication number Publication date
CN103856343B (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN103856343A (en) Method and system for configurating virtual machine network information
CN109155755B (en) Automatic generation and deployment workflow for cloud platform based on logic stack
US20220327007A1 (en) Migrating edge device resources to a cloud computing environment
US11146620B2 (en) Systems and methods for instantiating services on top of services
US10013213B2 (en) Container migration utilizing state storage of partitioned storage volume
CN103425511B (en) The system and method for application software installation and deployment in cloud computing environment
EP3355193A1 (en) Security-based container scheduling
US9465625B2 (en) Provisioning of operating environments on a server in a networked environment
US20200192689A1 (en) Container migration in computing systems
CN102571698A (en) Access authority control method, system and device for virtual machine
CN106886429B (en) Method for loading driver and server
US10341253B2 (en) Automatic consolidation of network resources
US9959136B2 (en) Optimizations and enhancements of application virtualization layers
CN113127150A (en) Rapid deployment method and device of cloud native system, electronic equipment and storage medium
US20210392091A1 (en) User-mode protocol stack-based network isolation method and device
CN109144526B (en) Rapid deployment system and method for substation automation software
CN110413311A (en) ' In System Reconfiguration Method and server
CN115913778A (en) Network strategy updating method, system and storage medium based on sidecar mode
US10911371B1 (en) Policy-based allocation of provider network resources
US11055115B1 (en) Virtual machine conversion in distributed system of remote desktops
CN108650320B (en) Method for synchronizing configuration files of isomorphic cascading equipment in cluster environment
US10862952B1 (en) Migration of operational computing hardware to a data center
US20230342341A1 (en) Automatic sequencing of database objects
US20240143318A1 (en) Efficient configuration management in continuous deployment
US20240143315A1 (en) Efficient configuration management in continuous deployment

Legal Events

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