CN105488086A - Log recording method and system under virtualized environment - Google Patents
Log recording method and system under virtualized environment Download PDFInfo
- Publication number
- CN105488086A CN105488086A CN201410844486.7A CN201410844486A CN105488086A CN 105488086 A CN105488086 A CN 105488086A CN 201410844486 A CN201410844486 A CN 201410844486A CN 105488086 A CN105488086 A CN 105488086A
- Authority
- CN
- China
- Prior art keywords
- mac address
- virtual machine
- list
- virtualized environment
- host
- 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
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention belongs to the field of computer control management, and particularly relates to a log recording method and system under a virtualized environment. The log recording method comprises the following steps: initializing a host machine, generating a list which contains used mac addresses, and a list which contains unused mac addresses, wherein the list which contains unused mac addresses stores the mac addresses which are not distributed to a virtual machine, and the list which contains used mac addresses stores the mac addresses which are distributed to the virtual machine; then, before the virtual machine is newly built, taking one mac address from the list which contains unused mac addresses by the host machine, distributing the mac address to the virtual machine, meanwhile, deleting the mac address which is distributed to the virtual machine from the list which contains unused mac addresses, and adding the mac address into the list which contains used mac addresses; and finally, generating a log which contains the mac address associated with the virtual machine by the virtual machine. The system comprises a mac address management module, a mac address distribution module and a log generation module, wherein the mac address management module, the mac address distribution module and the log generation module are used for realizing the above method. The log recording method can solve the problem of the corresponding relationship of the virtual machine log and the virtual machine, and is convenient in carrying out system problem troubleshooting.
Description
Technical field
The invention belongs to computer control managing field, be specifically related to the log recording method under a kind of virtualized environment and system.
Background technology
In computer realm, log recording method under traditional virtual environment, only virtual machine daily record regularly can be passed to host, but in time having a lot of platform virtual machine under a host, be difficult to judge that these daily records are all by which virtual machine generated, like this will be pretty troublesome when tracing system problem.
Summary of the invention
In order to solve the problem, the invention discloses the log recording method under a kind of virtualized environment and system, the method and system can solve the corresponding relation problem of virtual machine daily record and virtual machine, are convenient to system problem investigation.
The object of the present invention is achieved like this:
Log recording method under virtualized environment, comprises the following steps:
S01, host initialization, generating mac address does not use list and mac address to use list, described mac address does not use list to have not to the mac address that virtual machine distributes, and described mac address has used list to have to the mac address that virtual machine distributes;
Before S02, newly-built virtual machine, host does not use from mac address list and takes out a mac address assignment to virtual machine, is not used list the mac address distributing to virtual machine simultaneously and deletes, add mac address to and used in list from mac address;
S03, virtual machine generate the daily record containing associated mac address.
Log recording method under above-mentioned virtualized environment, also comprises:
S04, delete virtual machine, disconnect associating of the mac address that obtains with step S02 of virtual machine simultaneously, by with delete mac address that front virtual machine associates and to have used list from mac address and delete, add mac address to and do not use in list.
Log recording method under above-mentioned virtualized environment, described step S02 is specially:
S021, virtual machine are to host request mac address;
S022, host do not use from mac address list and take out a mac address assignment to virtual machine;
S023, judge whether the mac address that virtual machine obtains is effective mac address, if:
The mac address distributing to virtual machine is not used list from mac address and deletes, add mac address to and used in list;
No, give host error message notification, return step S021.
Based on the diary record system under the virtualized environment of the log recording method under above-mentioned virtualized environment, comprising:
Mac address management module: host initialization, generating mac address does not use list and mac address to use list, described mac address does not use list to have not to the mac address that virtual machine distributes, and described mac address has used list to have to the mac address that virtual machine distributes;
Mac address assignment module: before newly-built virtual machine, host does not use from mac address list and takes out a mac address assignment to virtual machine, the mac address distributing to virtual machine is not used list from mac address simultaneously and delete, add mac address to and used in list;
Daily record generation module: virtual machine generates the daily record containing associated mac address.
Diary record system under above-mentioned virtualized environment, also comprise mac address cancel module: delete virtual machine, disconnect associating of the mac address that obtains with step S02 of virtual machine simultaneously, the mac address associated with virtual machine before deletion is used list from mac address and has deleted, added mac address to and do not use in list.
Beneficial effect:
This method by safeguarding the corresponding lists of a mac address and virtual machine between host and virtual machine, and when establishment virtual machine, for each virtual machine arranges the exclusive mac address of oneself, thus corresponding virtual machine can be found out according to mac address; When virtual machine log, mac address also can be recorded wherein, when accomplishing to check daily record with this, which virtual machine record can separate this daily record according to the mac address area in daily record is, thus makes the positioning problems of virtual machine in system easier.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the log recording method specific embodiment one under virtualized environment of the present invention.
Fig. 2 is the process flow diagram of the log recording method specific embodiment two under virtualized environment of the present invention.
Fig. 3 is the schematic diagram of the diary record system specific embodiment three under virtualized environment of the present invention.
Fig. 4 is the schematic diagram of the diary record system specific embodiment four under virtualized environment of the present invention.
In figure: mac address management module 1, mac address assignment module 2, daily record generation module 3, mac address cancel module 4.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the invention is described in further detail.
Specific embodiment one
The present embodiment is the log recording method embodiment under virtualized environment.
Log recording method under the virtualized environment of the present embodiment, process flow diagram as shown in Figure 1.The method comprises the following steps:
S01, host initialization, generating mac address does not use list and mac address to use list, described mac address does not use list to have not to the mac address that virtual machine distributes, and described mac address has used list to have to the mac address that virtual machine distributes;
Before S02, newly-built virtual machine, host does not use from mac address list and takes out a mac address assignment to virtual machine, is not used list the mac address distributing to virtual machine simultaneously and deletes, add mac address to and used in list from mac address;
S03, virtual machine generate the daily record containing associated mac address.
Specific embodiment two
The present embodiment is the log recording method embodiment under virtualized environment.
Log recording method under the virtualized environment of the present embodiment, process flow diagram as shown in Figure 2.The method is on the basis of specific embodiment one, and further restriction also comprises:
S04, delete virtual machine, disconnect associating of the mac address that obtains with step S02 of virtual machine simultaneously, by with delete mac address that front virtual machine associates and to have used list from mac address and delete, add mac address to and do not use in list.
Above two embodiments, step S02 is specially:
S021, virtual machine are to host request mac address;
S022, host do not use from mac address list and take out a mac address assignment to virtual machine;
S023, judge whether the mac address that virtual machine obtains is effective mac address, if:
The mac address distributing to virtual machine is not used list from mac address and deletes, add mac address to and used in list;
No, give host error message notification, return step S021.
It should be noted that, the quantity of total mac address that mac address does not use list and mac address to use in list is limited, if mac address does not use the mac address in list to be all assigned with away, virtual machine is again to host request mac address, and the mac address that virtual machine obtains is exactly invalid mac address.
Specific embodiment three
The present embodiment is the diary record system embodiment under virtualized environment.
Diary record system under the virtualized environment of the present embodiment, schematic diagram as shown in Figure 3.This system comprises:
Mac address management module 1: host initialization, generating mac address does not use list and mac address to use list, described mac address does not use list to have not to the mac address that virtual machine distributes, and described mac address has used list to have to the mac address that virtual machine distributes;
Mac address assignment module 2: before newly-built virtual machine, host does not use from mac address list and takes out a mac address assignment to virtual machine, the mac address distributing to virtual machine is not used list from mac address simultaneously and delete, add mac address to and used in list;
Daily record generation module 3: virtual machine generates the daily record containing associated mac address.
Specific embodiment four
The present embodiment is the diary record system embodiment under virtualized environment.
Diary record system under the virtualized environment of the present embodiment, schematic diagram as shown in Figure 4.This system is on the basis of specific embodiment three, further restriction also comprises mac address cancel module 4: delete virtual machine, disconnect associating of the mac address that obtains with step S02 of virtual machine simultaneously, the mac address associated with virtual machine before deletion is used list from mac address and has deleted, added mac address to and do not use in list.
Claims (5)
1. the log recording method under virtualized environment, is characterized in that, comprises the following steps:
S01, host initialization, generating mac address does not use list and mac address to use list, described mac address does not use list to have not to the mac address that virtual machine distributes, and described mac address has used list to have to the mac address that virtual machine distributes;
Before S02, newly-built virtual machine, host does not use from mac address list and takes out a mac address assignment to virtual machine, is not used list the mac address distributing to virtual machine simultaneously and deletes, add mac address to and used in list from mac address;
S03, virtual machine generate the daily record containing associated mac address.
2. the log recording method under virtualized environment according to claim 1, is characterized in that, also comprise:
S04, delete virtual machine, disconnect associating of the mac address that obtains with step S02 of virtual machine simultaneously, by with delete mac address that front virtual machine associates and to have used list from mac address and delete, add mac address to and do not use in list.
3. the log recording method under virtualized environment according to claim 1 and 2, is characterized in that, described step S02 is specially:
S021, virtual machine are to host request mac address;
S022, host do not use from mac address list and take out a mac address assignment to virtual machine;
S023, judge whether the mac address that virtual machine obtains is effective mac address, if:
The mac address distributing to virtual machine is not used list from mac address and deletes, add mac address to and used in list;
No, give host error message notification, return step S021.
4. based on the diary record system under the virtualized environment of the log recording method under virtualized environment described in claim 1, it is characterized in that, comprising:
Mac address management module: host initialization, generating mac address does not use list and mac address to use list, described mac address does not use list to have not to the mac address that virtual machine distributes, and described mac address has used list to have to the mac address that virtual machine distributes;
Mac address assignment module: before newly-built virtual machine, host does not use from mac address list and takes out a mac address assignment to virtual machine, the mac address distributing to virtual machine is not used list from mac address simultaneously and delete, add mac address to and used in list;
Daily record generation module: virtual machine generates the daily record containing associated mac address.
5. the diary record system under virtualized environment according to claim 4, it is characterized in that, also comprise mac address cancel module: delete virtual machine, disconnect associating of the mac address that obtains with step S02 of virtual machine simultaneously, the mac address associated with virtual machine before deletion is used list from mac address and has deleted, added mac address to and do not use in list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410844486.7A CN105488086A (en) | 2014-12-31 | 2014-12-31 | Log recording method and system under virtualized environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410844486.7A CN105488086A (en) | 2014-12-31 | 2014-12-31 | Log recording method and system under virtualized environment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105488086A true CN105488086A (en) | 2016-04-13 |
Family
ID=55675064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410844486.7A Pending CN105488086A (en) | 2014-12-31 | 2014-12-31 | Log recording method and system under virtualized environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105488086A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108600416A (en) * | 2018-07-06 | 2018-09-28 | 杭州涂鸦信息技术有限公司 | A kind of method that internet of things equipment MAC Address dynamically distributes |
CN109656687A (en) * | 2018-12-21 | 2019-04-19 | 合肥时代智慧高新投资管理有限公司 | A kind of host to client computer information transferring method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102710814A (en) * | 2012-06-21 | 2012-10-03 | 奇智软件(北京)有限公司 | Method and device for controlling Internet protocol (IP) address of virtual machine |
CN103220298A (en) * | 2013-04-27 | 2013-07-24 | 西北工业大学 | Windows Virtual machine remote detecting method |
US20140068604A1 (en) * | 2012-09-04 | 2014-03-06 | Red Hat Israel, Ltd. | Display power management in distributed virtualized systems |
CN104219241A (en) * | 2014-09-04 | 2014-12-17 | 国云科技股份有限公司 | A two-way defense method for ARP attacks suitable for virtual machines |
-
2014
- 2014-12-31 CN CN201410844486.7A patent/CN105488086A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102710814A (en) * | 2012-06-21 | 2012-10-03 | 奇智软件(北京)有限公司 | Method and device for controlling Internet protocol (IP) address of virtual machine |
US20140068604A1 (en) * | 2012-09-04 | 2014-03-06 | Red Hat Israel, Ltd. | Display power management in distributed virtualized systems |
CN103220298A (en) * | 2013-04-27 | 2013-07-24 | 西北工业大学 | Windows Virtual machine remote detecting method |
CN104219241A (en) * | 2014-09-04 | 2014-12-17 | 国云科技股份有限公司 | A two-way defense method for ARP attacks suitable for virtual machines |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108600416A (en) * | 2018-07-06 | 2018-09-28 | 杭州涂鸦信息技术有限公司 | A kind of method that internet of things equipment MAC Address dynamically distributes |
CN109656687A (en) * | 2018-12-21 | 2019-04-19 | 合肥时代智慧高新投资管理有限公司 | A kind of host to client computer information transferring method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102449753B1 (en) | A system and method for supporting namespaces in a multi-tenant application server environment. | |
CN107004032B (en) | Mirror image file conversion method and device | |
CN105872078B (en) | Mixed cloud desktop system and management method | |
CN104145468B (en) | File access authority control method and device thereof | |
EP3612973B1 (en) | Referenced access control list | |
WO2017020637A1 (en) | Task allocation method and task allocation apparatus for distributed data calculation | |
US20120042162A1 (en) | Cloud Data Management | |
CN105900093B (en) | A kind of update method of the tables of data of KeyValue databases and table data update apparatus | |
CN109144406B (en) | Metadata storage method, system and storage medium in distributed storage system | |
CN103078965B (en) | The IP address management method of virtual machine | |
CN102521114B (en) | File system log storage system under virtualization environment | |
CN108322325A (en) | A kind of virtual machine management method and device | |
CN114064563A (en) | Data migration method and server based on object storage | |
CN103324532A (en) | Dynamic migration method and system of virtual machine | |
CN104461685A (en) | Virtual machine processing method and virtual computer system | |
CN109327557A (en) | A kind of management method and device of virtual machine IP address | |
CN106210046A (en) | A kind of volume based on Cinder is across cluster hanging method and system | |
CN103116627A (en) | Database access method with high concurrency service-oriented architecture (SOA) technology and system | |
CN102195815A (en) | Network management method and device | |
CN103218305B (en) | The distribution method of memory space | |
CN107977773A (en) | A method for managing multi-project resource quotas of multiple cloud platforms | |
CN104182503A (en) | Cloud platform data access safety isolation method | |
CN103888492A (en) | Memory management system and method | |
CN105488086A (en) | Log recording method and system under virtualized environment | |
CN107562547A (en) | A kind of CTDB group systems and creation method, create 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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160413 |
|
WD01 | Invention patent application deemed withdrawn after publication |