CN108304249B - Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine - Google Patents

Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine Download PDF

Info

Publication number
CN108304249B
CN108304249B CN201711434439.5A CN201711434439A CN108304249B CN 108304249 B CN108304249 B CN 108304249B CN 201711434439 A CN201711434439 A CN 201711434439A CN 108304249 B CN108304249 B CN 108304249B
Authority
CN
China
Prior art keywords
vbd
virtual machine
iso file
minimum
changing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711434439.5A
Other languages
Chinese (zh)
Other versions
CN108304249A (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.)
Guangdong Eflycloud Computing Co Ltd
Original Assignee
Guangdong Eflycloud Computing 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 Guangdong Eflycloud Computing Co Ltd filed Critical Guangdong Eflycloud Computing Co Ltd
Priority to CN201711434439.5A priority Critical patent/CN108304249B/en
Publication of CN108304249A publication Critical patent/CN108304249A/en
Application granted granted Critical
Publication of CN108304249B publication Critical patent/CN108304249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Abstract

A method for rapidly replacing optical disc ISO files by a XenServer virtual machine is disclosed, the XenServer virtual machine automatically finds and loads an optical drive with the smallest VBD equipment number, XenAPI reconfigures the VBD equipment number corresponding to the mounted optical disc ISO file on the XenServer virtual machine through XML-RPC protocol, and comprises the process of rapidly replacing the optical disc ISO file: step A: a user schedules an appointed optical disk ISO file to be used by a virtual machine on a cloud management platform; and B: changing the VBD equipment number of the optical drive with the minimum number of the virtual machine into the maximum equipment number; and C: changing the VBD equipment number of the optical drive where the specified ISO file is located into the minimum equipment number; step D: the virtual machine automatically discovers the specified optical disc ISO file and uses the ISO file. The invention aims to provide a method for rapidly replacing an optical disk ISO file by a XenServer virtual machine for loading, and solves the problem of realizing compatibility under the condition of existence of XenServer Tools.

Description

Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine
Technical Field
The invention relates to the field of virtual machines, in particular to a method and a system for rapidly replacing optical disk ISO files by a XenServer virtual machine.
Background
When the XenServer virtual machine needs to replace the ISO file load when a plurality of optical disc ISO files are already mounted, there are two methods at present:
1. carrying out cold plugging for replacement under the condition that the XenServer virtual machine is not provided with XenServer Tools, namely, starting or restarting the virtual machine;
2. under the condition that the XenServer Tools are installed in the XenServer virtual machine, a VBD hot plug interface provided by XenAPI is used for completely pulling out the optical drive which is mounted on the virtual machine, and then the optical drive which needs to be loaded is mounted on the virtual machine again for the first time.
The two methods have the following disadvantages: the method is not compatible with the installation of XenServer Tools, and has the disadvantages of complicated operation and low efficiency.
Disclosure of Invention
The invention aims to provide a method and a system for rapidly replacing an optical disk ISO file by a XenServer virtual machine, which solve the problem of realizing compatibility under the condition of existence of XenServer Tools.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for rapidly replacing optical disc ISO files by a XenServer virtual machine is disclosed, the XenServer virtual machine automatically finds and loads an optical drive with the smallest VBD equipment number, XenAPI reconfigures the VBD equipment number corresponding to the mounted optical disc ISO file on the XenServer virtual machine through XML-RPC protocol, and comprises the process of rapidly replacing the optical disc ISO file:
step A: a user schedules an appointed optical disk ISO file to be used by a virtual machine on a cloud management platform;
and B: changing the VBD equipment number of the optical drive with the minimum number of the virtual machine into the maximum equipment number;
and C: changing the VBD equipment number of the optical drive where the specified ISO file is located into the minimum equipment number;
step D: the virtual machine automatically discovers the specified optical disc ISO file and uses the ISO file.
Preferably, the method includes a process of changing the VBD minimum device number of the optical disc drive to the maximum device number:
step B1: the cloud management platform calls the XenAPI to traverse all the VBD devices with the types of CDs of the virtual machine;
step B2: sorting according to the number of the device number attribute uservevice in the traversed attribute table record of the VBD device;
step B3: the device number of the VBD device with the minimum device number is reconfigured to be the maximum device number through a set user device interface, and the device number of the VBD device with the minimum original device number is recorded into a storage library.
Preferably, the method includes a process of changing the VBD device number of the optical drive where the specified ISO file is located to the minimum device number:
step C1: the cloud management platform calls the XenAPI to traverse all the VBD devices with the types of CDs of the virtual machine;
step C2: finding out VBD devices with the names of the connected VDIs being the same as the specified ISO file names in the traversed VBD devices;
step C3: and finally, changing the VBD equipment number of the optical drive where the specified ISO file is located into the VBD equipment number of the optical drive recorded in the storage library through a set user device interface.
A system for rapidly replacing optical disc ISO files by a XenServer virtual machine is characterized in that the XenServer virtual machine automatically finds and loads an optical disc drive with the smallest VBD equipment number, and comprises a rapid replacement ISO file module, wherein XenAPI reconfigures the VBD equipment number corresponding to the mounted optical disc ISO file on the XenServer virtual machine through an XML-RPC protocol for rapidly replacing the optical disc ISO file;
firstly, a user schedules an appointed optical disk ISO file to be used by a virtual machine on a cloud management platform; then changing the VBD equipment number of the optical drive with the minimum number of the virtual machine into the maximum equipment number; then changing the VBD equipment number of the optical drive where the specified ISO file is located into the minimum equipment number; and finally, automatically discovering the specified optical disc ISO file and using the ISO file by the virtual machine.
Preferably, the fast ISO file replacing module includes a VBD device number changing module, configured to change a minimum device number to a maximum device number, and change a VBD device number of an optical drive in which the specified ISO file is located to the minimum device number;
the VBD equipment number replacing module comprises a module for changing the VBD equipment number to be the maximum equipment number and a module for changing the VBD equipment number to be the minimum equipment number;
the mode of changing the virtual machine into the maximum equipment number mode comprises the step that a cloud management platform calls a XenAPI to traverse all VBD equipment with CD types of the virtual machine; then sorting according to the number size of the device number attribute uservevice in the traversed attribute table record of the VBD device; and finally, reconfiguring the device number of the VBD device with the minimum device number into the maximum device number through a set user device interface, and recording the device number of the VBD device with the minimum original device number into a storage library.
Preferably, the module for changing the virtual machine to the minimum device number includes that the cloud management platform calls a XenAPI to traverse all VBD devices of the virtual machine, the VBD devices being of the CD type; finding out VBD devices with the names of the connected VDIs being the same as the specified ISO file names in the traversed VBD devices; and finally, changing the VBD equipment number of the optical drive where the specified ISO file is located into the VBD equipment number of the optical drive recorded in the storage library through a set user device interface.
Drawings
FIG. 1 is a flow chart of the present invention for fast replacing optical disc ISO files;
FIG. 2 is a system framework diagram of the present invention;
FIG. 3 is a flowchart illustrating changing the VBD minimum device number of the optical disc drive to the maximum device number according to the present invention;
fig. 4 is a flowchart illustrating that the VBD device number of the optical disc drive where the specified ISO file is located is changed to the minimum device number according to the present invention.
Wherein: XenServer- -Sime Xen-based virtualization server, VM- -virtual machine, XenAPI- -programmer-oriented XenServer programming interface, XML-RPC- -is the use of http as transport protocol, VDI- -virtual disk image, VBD- -virtual block device, representing the connection between VM and VD.
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
In the method for rapidly replacing an optical disc ISO file by a XenServer virtual machine according to this embodiment, the XenServer virtual machine automatically discovers and loads an optical disc drive with the smallest VBD device number, and the XenAPI reconfigures the VBD device number corresponding to the mounted optical disc ISO file on the XenServer virtual machine by using an XML _ RPC protocol, as shown in fig. 1, including a process of rapidly replacing the optical disc ISO file:
step A: a user schedules an appointed optical disk ISO file to be used by a virtual machine on a cloud management platform;
and B: changing the VBD equipment number of the optical drive with the minimum number of the virtual machine into the maximum equipment number;
and C: changing the VBD equipment number of the optical drive where the specified ISO file is located into the minimum equipment number;
step D: the virtual machine automatically discovers the specified optical disc ISO file and uses the ISO file.
The VBD has a device number attribute, ordered from 0 to 6. The XenServer virtual machine automatically discovers and loads the optical drive with the smallest VBD equipment number uniquely, and other optical drives cannot be discovered and loaded by the virtual machine. Automatically discovering and loading the optical drive with the minimum VBD equipment serial number by using the XenServer virtual machine, and then realizing the VBD equipment serial number corresponding to the mounted optical disk ISO file on the XenServer virtual machine by calling a development interface XenAPI provided by the XenServer through an XML-RPC protocol by a cloud management platform; therefore, when the XenServer virtual machine of the cloud computing management platform needs to replace the optical disk ISO files to load under the condition that a plurality of optical disk ISO files are mounted, the virtual machine can find the specified optical disk and use the optical disk ISO files without restarting and hot plugging. The XeServer virtual machine with or without the XeServer Tools is compatible, so that the use efficiency of the virtual machine is improved, and the use experience of a user of the cloud computing management platform is improved.
For example: the XenServer virtual machine currently carries 2 optical disc ISO files, namely, an ISO file name connected with VBD1 with device number 1 is a.iso, an ISO file name connected with VBD2 with device number 2 is b.iso, and the currently loaded virtual machine is the a.iso file with the smallest VBD device number. When a user needs to use the B.ISO, the device number of VBD1 is firstly reconfigured to be 7 through the set _ user interface of the XenAPI, then the device number of VBD2 is reconfigured to be 1 through the set _ user interface of the XenAPI, and finally the virtual machine automatically discovers the B.ISO file and loads the B.ISO file for use.
Preferably, the method includes a process of changing the VBD minimum device number of the optical disc drive to the maximum device number:
step B1: as shown in fig. 3, the cloud management platform calls the XenAPI to traverse all VBD devices of the virtual machine, which are CD types;
step B2: sorting according to the number of the device number attribute uservevice in the traversed attribute table record of the VBD device;
step B3: the device number of the VBD device with the minimum device number is reconfigured to be the maximum device number through a set user device interface, and the device number of the VBD device with the minimum original device number is recorded into a storage library.
Preferably, as shown in fig. 4, the method includes a process of changing the VBD device number of the optical disc drive where the specified ISO file is located to the minimum device number:
step C1: the cloud management platform calls the XenAPI to traverse all the VBD devices with the types of CDs of the virtual machine;
step C2: finding out VBD devices with the names of the connected VDIs being the same as the specified ISO file names in the traversed VBD devices;
step C3: and finally, changing the VBD equipment number of the optical drive where the specified ISO file is located into the VBD equipment number of the optical drive recorded in the storage library through a set user device interface.
A system for rapidly replacing optical disc ISO files by a XenServer virtual machine is characterized in that the XenServer virtual machine automatically finds and loads an optical disc drive with the smallest VBD equipment number, and comprises a rapid replacement ISO file module, wherein XenAPI reconfigures the VBD equipment number corresponding to the mounted optical disc ISO file on the XenServer virtual machine through an XML-RPC protocol for rapidly replacing the optical disc ISO file;
as shown in fig. 2, firstly, a user schedules a specified optical disc ISO file to be used by a virtual machine on a cloud management platform; then changing the VBD equipment number of the optical drive with the minimum number of the virtual machine into the maximum equipment number; then changing the VBD equipment number of the optical drive where the specified ISO file is located into the minimum equipment number; and finally, automatically discovering the specified optical disc ISO file and using the ISO file by the virtual machine.
Preferably, the fast ISO file replacing module includes a VBD device number changing module, configured to change a minimum device number to a maximum device number, and change a VBD device number of an optical drive in which the specified ISO file is located to the minimum device number;
the VBD equipment number replacing module comprises a module for changing the VBD equipment number to be the maximum equipment number and a module for changing the VBD equipment number to be the minimum equipment number;
the mode of changing the virtual machine into the maximum equipment number mode comprises the step that a cloud management platform calls a XenAPI to traverse all VBD equipment with CD types of the virtual machine; then sorting according to the number size of the device number attribute uservevice in the traversed attribute table record of the VBD device; and finally, reconfiguring the device number of the VBD device with the minimum device number into the maximum device number through a set user device interface, and recording the device number of the VBD device with the minimum original device number into a storage library.
Preferably, the module for changing the virtual machine to the minimum device number includes that the cloud management platform calls a XenAPI to traverse all VBD devices of the virtual machine, the VBD devices being of the CD type; finding out VBD devices with the names of the connected VDIs being the same as the specified ISO file names in the traversed VBD devices; and finally, changing the VBD equipment number of the optical drive where the specified ISO file is located into the VBD equipment number of the optical drive recorded in the storage library through a set user device interface.
The technical principle of the present invention is described above in connection with specific embodiments. The description is made for the purpose of illustrating the principles of the invention and should not be construed in any way as limiting the scope of the invention. Based on the explanations herein, those skilled in the art will be able to conceive of other embodiments of the present invention without inventive effort, which would fall within the scope of the present invention.

Claims (4)

1. A method for rapidly replacing optical disk ISO files by a XenServer virtual machine is characterized in that the XenServer virtual machine automatically discovers and loads an optical drive with the minimum VBD equipment number, and the method comprises the following steps: the XenAPI reconfigures the VBD equipment number corresponding to the mounted optical disc ISO file on the XenServer virtual machine through an XML _ RPC protocol, and comprises the process of quickly replacing the optical disc ISO file:
step A: a user schedules an appointed optical disk ISO file to be used by the XenServer virtual machine on a cloud management platform;
and B: changing the minimum VBD equipment number of the optical drive of the XenServer virtual machine into the maximum VBD equipment number;
and C: changing the VBD equipment number of the optical drive where the specified optical disk ISO file is located into the minimum VBD equipment number;
step D: the XenServer virtual machine automatically finds the specified optical disk ISO file and uses the optical disk ISO file;
changing the minimum VBD device number of the optical disc drive to the maximum VBD device number includes:
step B1: the cloud management platform calls the XenAPI to traverse all VBD devices with CD types of the XenServer virtual machine;
step B2: sorting according to the number of the device number attribute uservevice in the traversed attribute table record of the VBD device;
step B3: and reconfiguring the VBD device number of the VBD device with the minimum VBD device number into the maximum VBD device number through a set user device interface, and recording the VBD device number of the VBD device with the minimum VBD device number into a storage library.
2. The method for rapidly replacing optical disc ISO files by XenServer virtual machines according to claim 1, characterized in that:
changing the VBD device number of the optical drive where the specified optical disc ISO file is located to the minimum VBD device number includes:
step C1: the cloud management platform calls the XenAPI to traverse all VBD devices with CD types of the XenServer virtual machine;
step C2: finding out VBD devices with the names of the connected VDIs being the same as the specified optical disc ISO file names from the traversed VBD devices;
step C3: and finally, changing the VBD equipment number of the optical drive where the specified optical disk ISO file is located into the VBD equipment number of the optical drive recorded in the storage library through a set user device interface.
3. A system for rapidly replacing optical disc ISO files by a XenServer virtual machine is characterized in that the XenServer virtual machine automatically discovers and loads an optical drive with the minimum VBD equipment number, and the optical drive is characterized in that: the method comprises a fast replacement ISO file module, wherein the XenAPI reconfigures the VBD equipment number corresponding to the mounted optical disc ISO file on a XenServer virtual machine through an XML-RPC protocol, and is used for fast replacing the optical disc ISO file;
firstly, a user schedules an appointed optical disk ISO file to be used by a XenServer virtual machine on a cloud management platform; then changing the minimum VBD equipment number of the optical drive of the XenServer virtual machine into the maximum VBD equipment number; then changing the VBD equipment number of the optical drive where the specified optical disk ISO file is located into the minimum VBD equipment number; finally, the XenServer virtual machine automatically finds the specified optical disk ISO file and uses the optical disk ISO file;
the fast change ISO file module comprises a VBD device number change module used for changing the minimum VBD device number into the maximum VBD device number and changing the VBD device number of the optical drive where the specified optical disc ISO file is located into the minimum VBD device number;
the VBD equipment number replacing module comprises a maximum VBD equipment number changing module and a minimum VBD equipment number changing module;
the mode of changing the VBD equipment number to the maximum VBD equipment number comprises the step that a cloud management platform calls a XenAPI to traverse all VBD equipment with CD types of the XenServer virtual machine; then sorting according to the number size of the device number attribute uservevice in the traversed attribute table record of the VBD device; and finally, reconfiguring the VBD device number of the VBD device with the minimum VBD device number into the maximum VBD device number through a set user device interface, and recording the VBD device number of the VBD device with the minimum VBD device number into a storage library.
4. The system for rapidly replacing optical disc ISO files of the XenServer virtual machine according to claim 3, wherein:
the changing to the minimum VBD equipment numbering module comprises the steps that the cloud management platform calls a XenAPI to traverse all VBD equipment with CD types of the XenServer virtual machine; finding out VBD devices with the names of the connected VDIs being the same as the specified optical disc ISO file names from the traversed VBD devices; and finally, changing the VBD equipment number of the optical drive where the specified optical disk ISO file is located into the VBD equipment number of the optical drive recorded in the storage library through a set user device interface.
CN201711434439.5A 2017-12-26 2017-12-26 Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine Active CN108304249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711434439.5A CN108304249B (en) 2017-12-26 2017-12-26 Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711434439.5A CN108304249B (en) 2017-12-26 2017-12-26 Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine

Publications (2)

Publication Number Publication Date
CN108304249A CN108304249A (en) 2018-07-20
CN108304249B true CN108304249B (en) 2021-08-24

Family

ID=62867446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711434439.5A Active CN108304249B (en) 2017-12-26 2017-12-26 Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine

Country Status (1)

Country Link
CN (1) CN108304249B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470778A (en) * 2007-12-28 2009-07-01 Ge医疗系统环球技术有限公司 Method and system for protecting patient data
CN102682012A (en) * 2011-03-14 2012-09-19 成都市华为赛门铁克科技有限公司 Method and device for reading and writing data in file system
CN104731915A (en) * 2015-03-24 2015-06-24 上海爱数软件有限公司 Magnetic disk device mapping method in distributed memory system
CN105988948A (en) * 2015-02-13 2016-10-05 浙江大华技术股份有限公司 Data transmission method and equipment
CN106484328A (en) * 2016-09-23 2017-03-08 浪潮电子信息产业股份有限公司 A kind of virtual machine based on kvm system operation uses multipath block device method
CN107221345A (en) * 2017-05-26 2017-09-29 郑州云海信息技术有限公司 A kind of DVD drive function test method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470778A (en) * 2007-12-28 2009-07-01 Ge医疗系统环球技术有限公司 Method and system for protecting patient data
CN102682012A (en) * 2011-03-14 2012-09-19 成都市华为赛门铁克科技有限公司 Method and device for reading and writing data in file system
CN105988948A (en) * 2015-02-13 2016-10-05 浙江大华技术股份有限公司 Data transmission method and equipment
CN104731915A (en) * 2015-03-24 2015-06-24 上海爱数软件有限公司 Magnetic disk device mapping method in distributed memory system
CN106484328A (en) * 2016-09-23 2017-03-08 浪潮电子信息产业股份有限公司 A kind of virtual machine based on kvm system operation uses multipath block device method
CN107221345A (en) * 2017-05-26 2017-09-29 郑州云海信息技术有限公司 A kind of DVD drive function test method

Also Published As

Publication number Publication date
CN108304249A (en) 2018-07-20

Similar Documents

Publication Publication Date Title
US20230138736A1 (en) Cluster file system-based data backup method and apparatus, and readable storage medium
TWI533213B (en) Storing and resuming application runtime state
CN105022656B (en) virtual machine snapshot management method and device
CN108376100A (en) Container scheduling based on safety
CN107733985B (en) Method and device for deploying functional components of cloud computing system
CN104866391B (en) A kind of end message backup method and device based on increment information system
CN105635311A (en) Method for synchronizing resource pool information in cloud management platform
CN104020960A (en) Method and device for conducting partition formatting and mounting on hard disk
CN105704188A (en) Deployment method and apparatus of applications and services
US20110258620A1 (en) Method and Apparatus for Making a BPM Application Available to Multiple Tenants
CN106406980B (en) A kind of dispositions method and device of virtual machine
CN106155719A (en) A kind of method and system utilizing USB device to realize openstack rapid deployment
CN110134646B (en) Knowledge platform service data storage and integration method and system
WO2022095844A1 (en) Elastic block service mounting method and apparatus thereof
CN105183854B (en) A kind of dispatching method of database unloading data
CN104636441A (en) Network file system realization method and device
CN106557395B (en) Application performance monitoring management method, system and application method of system
CN108304249B (en) Method and system for rapidly replacing optical disk ISO file by XenServer virtual machine
CN109062515A (en) A kind of disk management method, system and associated component
CN102053855B (en) Software generation system and method
CN103077115B (en) A kind of compatibility testing platform building method and device
CN110888648A (en) Method for generating custom linux image through interactive interface
CN104808953A (en) Device and method for controlling data storage and mobile terminal
CN108536822A (en) Data migration method, device, system and storage medium
US10514988B2 (en) Method and system of migrating applications to a cloud-computing environment

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
GR01 Patent grant
GR01 Patent grant