CN103473064A - Method for monitoring use conditions of magnetic disk of virtual machine in host machine - Google Patents

Method for monitoring use conditions of magnetic disk of virtual machine in host machine Download PDF

Info

Publication number
CN103473064A
CN103473064A CN2013104302063A CN201310430206A CN103473064A CN 103473064 A CN103473064 A CN 103473064A CN 2013104302063 A CN2013104302063 A CN 2013104302063A CN 201310430206 A CN201310430206 A CN 201310430206A CN 103473064 A CN103473064 A CN 103473064A
Authority
CN
China
Prior art keywords
virtual machine
host
machine image
operating system
xen
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
Application number
CN2013104302063A
Other languages
Chinese (zh)
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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud 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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN2013104302063A priority Critical patent/CN103473064A/en
Publication of CN103473064A publication Critical patent/CN103473064A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of cloud computation and particularly relates to a method for monitoring use conditions of a magnetic disk of a virtual machine in a host machine. The method comprises the following steps: mounting a mirror image document of the virtual machine on the host machine in a read-only manner; then checking the use conditions of the mirror image magnetic disk of the virtual machine in a manner of executing df-h so as to conveniently and uniformly monitor and manage resources of the virtual machine. According to the method provided by the invention, the use conditions of the magnetic disk of the virtual machine are monitored on the host machine; the method can be used for monitoring the use conditions of the magnetic disk of the virtual machine.

Description

A kind of method of monitoring virtual machine disk behaviour in service in host
Technical field
The present invention relates to the cloud computing technology field, particularly a kind of method of monitoring virtual machine disk behaviour in service in host.
Background technology
In the cloud computing field, operating system and application program operate on virtual machine; Facing several operation systems and numerous application software, and between the two when freely arranging in pairs or groups to provide the application scenarios of service; Need the virtual machine quantity created to get more and more.Therefore, particularly the disk service condition is very large to the normal influence on system operation of operating system and application program for resources of virtual machine.But, aspect monitoring virtual machine disk service condition, there is at present following problem:
The one, virtual machine image is changeable, causes monitoring virtual machine dumb; Current virtual machine operation comes from virtual machine image, virtual machine image expansion at present is dumb, when increasing an application software, may need so again to make the virtual machine image be complementary with operating system or application software quantity, also bring the monitoring of virtual machine not convenient simultaneously.
The 2nd, increase cost, the monitoring resources of virtual machine needs corresponding exploitation monitoring tools or software to be monitored, and increases the technology input cost of company; Because virtual machine quantity is more, to the monitoring of every virtual machine, the monitoring software of customization need to be installed to virtual machine, this monitoring software needs the input cost exploitation.
The 3rd, to virtual machine monitoring process complexity, when the virtual machine disk is monitored, often need manually to log in virtual machine, after logging in virtual machine, manually use the related command mode to monitor the disk service condition of virtual machine, along with the increase of virtual machine quantity, every virtual machine all needs manually to log in and monitored, when increasing workload, often attend to one thing and lose sight of another, fail the resource situations such as convenient and swift effective monitoring virtual machine disk.
In order to promote the monitoring efficiency to virtual machine disk service condition, facilitate the disk service condition of monitoring efficiently and effectively virtual machine on host, need a kind of method in host's in-flight monitoring virtual machine disk service condition, in numerous virtual machine operational processs, only need on host, just can accurately monitor in real time the disk service condition of virtual machine.
Summary of the invention
The technical matters that the present invention solves is to propose a kind of method of monitoring virtual machine disk behaviour in service in host; Can on host, accurately monitor in real time the disk service condition of virtual machine.
The technical scheme that the present invention solves the problems of the technologies described above is:
Comprise the steps:
Step 1: the virtual kernel of xen is installed on the linux host;
Step 2: make the virtual machine image of preparing a vhd form on host;
Step 3: by a configuration file, use the order of xen kernel to start the virtual machine image of making;
Step 4: after starting virtual machine image, carry out the xen related command, get the device number of virtual machine image correspondence on host;
Step 5: virtual machine image, in read-only mode, is mounted on host equipment, supplies to check by the associated available directories of equipment;
Step 6: after the carry success, carry out the size cases that df – h checks associated catalogue on host, be the mirrored disk behaviour in service of virtual machine.
Described virtual machine image is mounted to the list mode as host on host and exists, and can enter catalogue and check the associated documents in mirror image, be i.e. the disc content file.
Described host is physical server, is generally linux operating system main frame, supports as each operating system versions such as centos5.5, needs to install the virtual support of xen kernel.
Described virtual machine image is supported the several operation systems such as windows series or linux series operating system, and the image file size is without specific (special) requirements, and virtual machine image can be normally by the control operations such as startup, operation on host operation.
The present invention passes through the virtual machine image carry on host; Realized accurately monitoring in real time the disk service condition of virtual machine on host; Effectively avoided existing existing method for supervising virtual machine image numerous, need monitoring software, and problems such as monitor procedure complexity.
The accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Accompanying drawing is the inventive method process flow diagram.
Embodiment
Please refer to accompanying drawing, the basic procedure that the present invention sends out is as follows:
1, at first linux series is installed on host as centos5.5 version operating system, then carries out following Installing of Command xen kernel:
#yum install centos-release-xen -y
#yum install xen -y
After the xen kernel is installed, remember to revise following xen configuration file:
#vi/etc/xen/xend-config.sxp
Find following parameter that " # " annotation in front is removed, revise parameter as follows:
(xend-http-server yes)
(xend-unix-server yes)
(xend-tcp-xmlrpc-server yes)
(xend-relocation-server no)
(xend-udev-event-server yes)
(xend-unix-path/var/lib/xend/xend-socket)
(xend-port 8000)
(xend-relocation-port8002)
(xend-address'')
(xend-address localhost)
(xend-relocation-address'')
Then restart the xen service:
#/etc/init.d/xend restart
Finally restart physical machine.
2, after host is restarted, prepare the virtual machine image of a vhd form, deposit associative directory as/instances catalogue, and define a configuration file libvirt.xml, libvirt.xml is defined as follows:
Figure BDA0000384061230000051
Figure BDA0000384061230000061
Carry out following order and create virtual machine by this mirror image:
#virsh create libvirt.xml
After virtual machine activation, carry out the xenstore-ls order, according to Output rusults, find corresponding virtual machine corresponding instance path:
#xenstore-ls
// output is as follows:
tapdisk-params="tapdisk:vhd:/instances/win2003.vhd"
Illustrate :/instances/win2003.vhd corresponds to the path of virtual machine image.
3, current virtual machine, in operational process, in read-only mode, is mounted to virtual machine image on host equipment, by the associated available directories of equipment, supply to check, as :/mnt catalogue.
1) on host, below execution, order be mounted to/dev/xvdk of virtual machine read-only mode equipment:
#xm block-attach0tap2:tapdisk:vhd:/instances/win2003.vhd /dev/xvdk r0
2) under arrive/mnt catalogue of general/dev/xvdk equipment mount, order below carrying out:
#mount-t ntfs-3g-o ro/dev/xvdk1/mnt
Illustrate: ntfs-3g is the disk file type, and windows operating system is ntfs-3g, and linux operating system is ext3 or ext4 file layout.
4, after successful to host/mnt catalogue with read-only mode carry disk, carry out the size cases that df – h checks associated catalogue on host, be the mirrored disk service condition of virtual machine.
Carry out check/mnt of df-h directory size situation in host:
#df -h
// output content is as follows:
/dev/xvdk1 40G 5.7G 35G 15%/mnt
Log in the virtual machine disk size that virtual machine checks that virtual machine disk service condition and host monitor basically identical.
5, enter host/mnt catalogue, find the related system file under the virtual machine disk:
#cd/mnt
#ls
// output file is as follows:
Figure BDA0000384061230000081
By check/mnt of df – h directory size, and enter/mnt catalogue checks the system file under catalogue, can not need to log in virtual machine, the situation that unified monitoring is used to the disk of virtual machine on host; Minimizing is because virtual machine quantity increases the workload of bringing; The service condition of convenient and swift Real-Time Monitoring virtual machine disk simultaneously, for resources of virtual machine monitoring alarm etc. is carried out relevant prevention and emergent the preparation.

Claims (5)

1. the method for a monitoring virtual machine disk behaviour in service in host is characterized in that:
Comprise the steps:
Step 1: the virtual kernel of xen is installed on the linux host;
Step 2: make the virtual machine image of preparing a vhd form on host;
Step 3: by a configuration file, use the order of xen kernel to start the virtual machine image of making;
Step 4: after starting virtual machine image, carry out the xen related command, get the device number of virtual machine image correspondence on host;
Step 5: virtual machine image, in read-only mode, is mounted on host equipment, supplies to check by the associated available directories of equipment;
Step 6: after the carry success, carry out the size cases that df – h checks associated catalogue on host, be the mirrored disk behaviour in service of virtual machine.
2. the method for disk behaviour in service according to claim 1, it is characterized in that: described virtual machine image is mounted to the list mode as host on host and exists, can enter catalogue and check the associated documents in mirror image, be i.e. the disc content file.
3. the method for disk behaviour in service according to claim 1, it is characterized in that: described host is physical server, is generally linux operating system main frame, supports as each operating system versions such as centos5.5, needs the virtual support of installation xen kernel.
4. the method for disk behaviour in service according to claim 2, it is characterized in that: described host is physical server, is generally linux operating system main frame, supports as each operating system versions such as centos5.5, needs the virtual support of installation xen kernel.
5. according to the method for the described disk behaviour in service of claim 1 to 4 any one, it is characterized in that: described virtual machine image is supported the several operation systems such as windows series or linux series operating system, the image file size is without specific (special) requirements, and virtual machine image can be normally by the control operations such as startup, operation on host operation.
CN2013104302063A 2013-09-18 2013-09-18 Method for monitoring use conditions of magnetic disk of virtual machine in host machine Pending CN103473064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013104302063A CN103473064A (en) 2013-09-18 2013-09-18 Method for monitoring use conditions of magnetic disk of virtual machine in host machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013104302063A CN103473064A (en) 2013-09-18 2013-09-18 Method for monitoring use conditions of magnetic disk of virtual machine in host machine

Publications (1)

Publication Number Publication Date
CN103473064A true CN103473064A (en) 2013-12-25

Family

ID=49797936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013104302063A Pending CN103473064A (en) 2013-09-18 2013-09-18 Method for monitoring use conditions of magnetic disk of virtual machine in host machine

Country Status (1)

Country Link
CN (1) CN103473064A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810422A (en) * 2014-02-20 2014-05-21 东莞中国科学院云计算产业技术创新与育成中心 Safety virtualization isolation method based on mirror image intelligent management
CN104199683A (en) * 2014-08-07 2014-12-10 杭州华三通信技术有限公司 ISO mirror image document loading method and device
CN104503821A (en) * 2014-12-11 2015-04-08 国云科技股份有限公司 Method for calculating virtual disc IO (input/output) speed
CN105260217A (en) * 2015-11-03 2016-01-20 国云科技股份有限公司 Method of password external reset of linux virtual machine
CN105573819A (en) * 2015-12-11 2016-05-11 国云科技股份有限公司 Method for obtaining disk capacity information of virtual machine directly through host machine
CN107463427A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 The acquisition methods and device of a kind of VME operating system type and version
CN112000436A (en) * 2020-08-21 2020-11-27 北京浪潮数据技术有限公司 Virtual machine disk information acquisition method and device and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009153625A1 (en) * 2008-06-20 2009-12-23 Lenovo (Singapore) Pte.Ltd. Diskless clients using a hypervisor
CN101661381A (en) * 2009-09-08 2010-03-03 华南理工大学 Data sharing and access control method based on Xen
CN101986284A (en) * 2010-11-04 2011-03-16 华中科技大学 Dynamic recovery system for waste space of virtual machine image file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009153625A1 (en) * 2008-06-20 2009-12-23 Lenovo (Singapore) Pte.Ltd. Diskless clients using a hypervisor
CN101661381A (en) * 2009-09-08 2010-03-03 华南理工大学 Data sharing and access control method based on Xen
CN101986284A (en) * 2010-11-04 2011-03-16 华中科技大学 Dynamic recovery system for waste space of virtual machine image file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LWG2001S: "xen虚拟机管理xm的用法", 《HTTP://LWG2001S.ITEYE.COM/BLOG/1202918》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810422A (en) * 2014-02-20 2014-05-21 东莞中国科学院云计算产业技术创新与育成中心 Safety virtualization isolation method based on mirror image intelligent management
CN103810422B (en) * 2014-02-20 2017-05-17 东莞中国科学院云计算产业技术创新与育成中心 Safety virtualization isolation method based on mirror image intelligent management
CN104199683A (en) * 2014-08-07 2014-12-10 杭州华三通信技术有限公司 ISO mirror image document loading method and device
CN104199683B (en) * 2014-08-07 2017-10-17 新华三技术有限公司 A kind of ISO image files loading method and equipment
CN104503821A (en) * 2014-12-11 2015-04-08 国云科技股份有限公司 Method for calculating virtual disc IO (input/output) speed
CN105260217A (en) * 2015-11-03 2016-01-20 国云科技股份有限公司 Method of password external reset of linux virtual machine
CN105573819A (en) * 2015-12-11 2016-05-11 国云科技股份有限公司 Method for obtaining disk capacity information of virtual machine directly through host machine
CN107463427A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 The acquisition methods and device of a kind of VME operating system type and version
CN112000436A (en) * 2020-08-21 2020-11-27 北京浪潮数据技术有限公司 Virtual machine disk information acquisition method and device and related equipment

Similar Documents

Publication Publication Date Title
CN103473064A (en) Method for monitoring use conditions of magnetic disk of virtual machine in host machine
US10956191B2 (en) Systems and methods for customizing and programming a cloud-based management server
CA2810570C (en) Private cloud replication and recovery
CN103297504B (en) The method of physics bare machine rapid deployment operating system in a kind of cloud data center
CN111209011A (en) Cross-platform container cloud automatic deployment system
US9473356B2 (en) Automatic configuration of applications based on host metadata using application-specific templates
US9558076B2 (en) Methods and systems of cloud-based disaster recovery
US10061665B2 (en) Preserving management services with self-contained metadata through the disaster recovery life cycle
CN106775928B (en) Automatic virtual machine migration system and method between heterogeneous cloud platforms
CN111162953B (en) Data processing method, system upgrading method and server
CN113032085A (en) Management method, device, server, management system and medium of cloud operating system
US9342390B2 (en) Cluster management in a shared nothing cluster
CN111666189A (en) Method and system for declaratively visually configuring Prometheus monitoring alarm
CN103455346A (en) Application program deployment method, deployment main control computer, deployment client side and cluster
CN102937909A (en) Method for deploying and upgrading Linux system
CN113656147A (en) Cluster deployment method, device, equipment and storage medium
CN111190823A (en) UI automation test method, electronic device and computer readable storage medium
CN103716188A (en) Management and maintenance method for Linux server cluster management
US9329952B2 (en) Reducing application downtime during failover
CN108509435B (en) Method and device for mounting remote file by example system
CN114064438A (en) Database fault processing method and device
CN104461757A (en) Method and device for restoring virtual machines
CN104778048A (en) Method and device for installing and setting up server web environment on the basis of Linux system
US10776134B2 (en) Management of application properties
CN114265605A (en) Version rollback method and device for functional component of business 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20131225