CN109710382A - A kind of virtual platform construction method - Google Patents
A kind of virtual platform construction method Download PDFInfo
- Publication number
- CN109710382A CN109710382A CN201811631621.4A CN201811631621A CN109710382A CN 109710382 A CN109710382 A CN 109710382A CN 201811631621 A CN201811631621 A CN 201811631621A CN 109710382 A CN109710382 A CN 109710382A
- Authority
- CN
- China
- Prior art keywords
- virtual platform
- configuration file
- virtual
- network
- construction method
- 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.)
- Pending
Links
- 238000010276 construction Methods 0.000 title claims abstract description 10
- 238000000034 method Methods 0.000 claims abstract description 30
- 238000003860 storage Methods 0.000 claims abstract description 15
- 230000004048 modification Effects 0.000 claims description 4
- 238000012986 modification Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 13
- 238000004590 computer program Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000000875 corresponding effect Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012550 audit Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
Virtual platform construction method disclosed by the invention, it is related to technical field of virtualization, the network and storage of virtual platform are configured under linux environment by disposing linux environment on physical server, generate configuration file, corresponding instruction is inputted in configuration file, generate virtual machine and starts virtual machine, simplifies the creation process of virtual platform, the creation process for simplifying virtual platform, improves the versatility of virtual platform.
Description
Technical field
The present invention relates to technical field of virtualization, and in particular to a kind of virtual platform construction method.
Background technique
Virtual platform is due to that can increase substantially the utilization rate of computing resource and reduce cost, facilitate computing resource
Rapid deployment and recycling and be widely used.
Major part virtual platform does not provide source code at present, and the Open Source Code of some virtual platforms is more complicated and creates
Not in the same network segment, needing to carry out corresponding NAT can be just connected to postponing with outside for the virtual machine built and host.
For example, Oracle VM VirtualBox is a free virtual platform, but since its source code is closed, nothing
Method carries out the audit work based on source code.Openstack is the cloud computing management platform of open source, but since its module is complicated,
It is difficult to carry out small-scale automatic configuration to it.The virtual machine of Oracle VM VirtualBox and Openstack creation is not
In host mesh network segment limit, needing to carry out the work of the complex configurations such as NAT can just be connected to outside.
Summary of the invention
To solve the deficiencies in the prior art, the embodiment of the invention provides a kind of virtual platform construction method, this method
The following steps are included:
(1) linux environment is disposed on physical server;
(2) under linux environment, the network of the virtual platform is configured, comprising:
It (21) is listening mode by the Network card setup by the configuration file of modification network interface card;
(22) bridge is created, the network interface card is added to the bridge;
(23) configuration file for modifying DNSmasq is the Network card setup dns and gateway, respectively by DNSmasq
Each ip corresponding mac, hostname, mtu value and ntp server are bound;
(24) start dnsmasq when setting starting;
(25) firewall rule present in the network interface card is nullified;
(3) under linux environment, the storage of the virtual platform is configured, comprising:
(31) judge that the foundation image of each virtual platform whether there is;
If it exists, then lvm component is utilized, increment disk is created from the foundation image as root disk.
(4) physical server generates configuration file, inputs phase in the configuration file according to above-mentioned steps (2)-(3)
The instruction answered generates virtual machine and starts virtual machine.
Further, the method also includes:
According to the characteristic of physical server CPU, kvm component is optimized.
Virtual platform construction method provided in an embodiment of the present invention has the advantages that
User need to only input an instruction, can create and using configured virtual platform, not need progress NAT and match
It sets, simplifies the creation process of virtual platform, simplify the creation process of virtual platform, improve the logical of virtual platform
The property used.
Detailed description of the invention
Fig. 1 is the flow diagram of virtual platform construction method provided in an embodiment of the present invention.
Specific embodiment
Specific introduce is made to the present invention below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, fixed site optimization method provided in an embodiment of the present invention the following steps are included:
S101 disposes linux environment on physical server;
S102 configures the network of the virtual platform under linux environment, comprising:
The Network card setup is listening mode by the configuration file of modification network interface card by S1021.
S1022 creates bridge, and the network interface card is added to the bridge.
S1023 modifies the configuration file of DNSmasq, is the Network card setup dns and gateway by DNSmasq, point
Each ip corresponding mac, hostname, mtu value and ntp server are not bound.
Start dnsmasq when S1024 setting starting.
S1025 nullifies firewall rule present in the network interface card.
As a specific embodiment, before step S102, can input to issue orders and create virtual machine platform:
./create-machine.sh win7.raw win7 1
Wherein: imagename is the name for the mirror image that virtual machine uses, and vmbasename is virtual machine name, and vmnum is
The serial number of virtual machine.The virtual machine that a name is win7_1 can be generated by the order.
S103 configures the storage of the virtual platform under linux environment, comprising:
S1031 judges that the foundation image of each virtual platform whether there is.
Based on the above embodiment, need to judge that name whether there is for the virtual machine foundation image of win7.raw.
S1032 if it exists, then utilizes lvm component, and increment disk is created from the foundation image as root disk.
S104 generates configuration file according to above-mentioned steps S102-S103, and input refers to accordingly in the configuration file
It enables, generate virtual machine and starts virtual machine.
As a specific embodiment, the order for generating virtual machine is virsh define win7_1, generates virtual machine
Order be virsh start win7_1.
Further, the method also includes:
Physical server optimizes kvm component according to the characteristic of physical server CPU.
Virtual platform construction method provided in an embodiment of the present invention, by disposing linux environment on physical server,
Under linux environment, the network and storage of virtual platform are configured, configuration file is generated, is inputted in configuration file
Corresponding instruction generates virtual machine and starts virtual machine, simplifies the creation process of virtual platform, simplify virtual platform
Creation process, improve the versatility of virtual platform.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
It is understood that the correlated characteristic in the above method and device can be referred to mutually.In addition, in above-described embodiment
" first ", " second " etc. be and not represent the superiority and inferiority of each embodiment for distinguishing each embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In addition, memory may include the non-volatile memory in computer-readable medium, random access memory
(RAM) and/or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes extremely
A few storage chip.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie
The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.
Claims (2)
1. a kind of virtual platform construction method characterized by comprising
(1) linux environment is disposed on physical server;
(2) under linux environment, the network of the virtual platform is configured, comprising:
It (21) is listening mode by the Network card setup by the configuration file of modification network interface card;
(22) bridge is created, the network interface card is added to the bridge;
(23) configuration file for modifying DNSmasq is the Network card setup dns and gateway by DNSmasq, respectively will be each
A ip corresponding mac, hostname, mtu value and ntp server is bound;
(24) start dnsmasq when setting starting;
(25) firewall rule present in the network interface card is nullified;
(3) under linux environment, the storage of the virtual platform is configured, comprising:
(31) judge that the foundation image of each virtual platform whether there is;
If it exists, then lvm component is utilized, increment disk is created from the foundation image as root disk.
(4) physical server generates configuration file according to above-mentioned steps (2)-(3), inputs in the configuration file corresponding
Instruction generates virtual machine and starts virtual machine.
2. virtual platform construction method according to claim 1, which is characterized in that the method also includes:
According to the characteristic of physical server CPU, kvm component is optimized.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811631621.4A CN109710382A (en) | 2018-12-29 | 2018-12-29 | A kind of virtual platform construction method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811631621.4A CN109710382A (en) | 2018-12-29 | 2018-12-29 | A kind of virtual platform construction method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN109710382A true CN109710382A (en) | 2019-05-03 |
Family
ID=66258184
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811631621.4A Pending CN109710382A (en) | 2018-12-29 | 2018-12-29 | A kind of virtual platform construction method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109710382A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110502316A (en) * | 2019-08-26 | 2019-11-26 | 杭州安恒信息技术股份有限公司 | A kind of test machine configuration method, system and relevant apparatus based on KVM platform |
| CN113806015A (en) * | 2021-09-03 | 2021-12-17 | 上海云轴信息科技有限公司 | ARM architecture-based virtual routing network construction method and device |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104363159A (en) * | 2014-07-02 | 2015-02-18 | 北京邮电大学 | Virtual open network building system and method based on software definition network |
| CN104580519A (en) * | 2015-01-29 | 2015-04-29 | 福建师范大学福清分校 | Method for rapid deployment of openstack cloud computing platform |
| CN104679608A (en) * | 2015-02-09 | 2015-06-03 | 广州杰赛科技股份有限公司 | Infrastructure visualization platform building method and mirror management structure of infrastructure visualization platform building method |
-
2018
- 2018-12-29 CN CN201811631621.4A patent/CN109710382A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104363159A (en) * | 2014-07-02 | 2015-02-18 | 北京邮电大学 | Virtual open network building system and method based on software definition network |
| CN104580519A (en) * | 2015-01-29 | 2015-04-29 | 福建师范大学福清分校 | Method for rapid deployment of openstack cloud computing platform |
| CN104679608A (en) * | 2015-02-09 | 2015-06-03 | 广州杰赛科技股份有限公司 | Infrastructure visualization platform building method and mirror management structure of infrastructure visualization platform building method |
Non-Patent Citations (1)
| Title |
|---|
| BLAKETAIRAN: "KVM虚拟化的一种打包及部署方案", 《CSDN博客,HTTPS://BLOG.CSDN.NET/BLAKETAIRAN/ARTICLE/DETAILS/54780957》 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110502316A (en) * | 2019-08-26 | 2019-11-26 | 杭州安恒信息技术股份有限公司 | A kind of test machine configuration method, system and relevant apparatus based on KVM platform |
| CN113806015A (en) * | 2021-09-03 | 2021-12-17 | 上海云轴信息科技有限公司 | ARM architecture-based virtual routing network construction method and device |
| CN113806015B (en) * | 2021-09-03 | 2023-12-12 | 上海云轴信息科技有限公司 | Virtual routing network construction method and device based on ARM architecture |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11055403B2 (en) | Method, system, and computer program product for application identification in a cloud platform | |
| US9225604B2 (en) | Mapping requirements to a system topology in a networked computing environment | |
| US9959135B2 (en) | Pattern design for heterogeneous environments | |
| US10838702B2 (en) | Analyzing and optimizing container images in cloud computing | |
| US10108442B1 (en) | Optimization and affinity for hypervisor-based just-in-time translator | |
| US10983816B2 (en) | Self-adaptive building container images | |
| US10878032B2 (en) | Labeled graph isomorphism allowing for false positive | |
| US11714615B2 (en) | Application migration using cost-aware code dependency graph | |
| US8938712B2 (en) | Cross-platform virtual machine and method | |
| US11216281B2 (en) | Facilitating data processing using SIMD reduction operations across SIMD lanes | |
| US11294727B2 (en) | Resolving cryptographic bottlenecks for distributed multi-signature contracts shared with cryptographic accelerators by switching between local and accelerator cryptographic libraries | |
| US11546431B2 (en) | Efficient and extensive function groups with multi-instance function support for cloud based processing | |
| CN109710382A (en) | A kind of virtual platform construction method | |
| US10530842B2 (en) | Domain-specific pattern design | |
| US11620132B2 (en) | Reusing an operand received from a first-in-first-out (FIFO) buffer according to an operand specifier value specified in a predefined field of an instruction | |
| US9519566B2 (en) | Modeling memory use of applications | |
| US11765236B2 (en) | Efficient and extensive function groups with multi-instance function support for cloud based processing | |
| US11146471B2 (en) | Process-aware trace synthesis for training process learning | |
| US10296331B2 (en) | Log-based software porting | |
| US20190057054A1 (en) | Allocating address space | |
| US10417055B2 (en) | Runtime movement of microprocess components | |
| US12204646B2 (en) | Shared library customization | |
| US11841982B2 (en) | Partitioning circuits for execution of sequential secure computation code on multiple processors | |
| US20220308978A1 (en) | Task simulation using revised goals | |
| US10936644B2 (en) | Differential processing mechanism for spark-based graph computing background |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190503 |