CN105808247B - The physics CD-ROM drive reorientation method of virtualization product based on linux system - Google Patents

The physics CD-ROM drive reorientation method of virtualization product based on linux system Download PDF

Info

Publication number
CN105808247B
CN105808247B CN201610118456.7A CN201610118456A CN105808247B CN 105808247 B CN105808247 B CN 105808247B CN 201610118456 A CN201610118456 A CN 201610118456A CN 105808247 B CN105808247 B CN 105808247B
Authority
CN
China
Prior art keywords
rom drive
iscsi
physics
server
virtual machine
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
CN201610118456.7A
Other languages
Chinese (zh)
Other versions
CN105808247A (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.)
Wuxi Chen Yun Polytron Technologies Inc
Original Assignee
Wuxi Chen Yun Polytron Technologies Inc
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 Wuxi Chen Yun Polytron Technologies Inc filed Critical Wuxi Chen Yun Polytron Technologies Inc
Priority to CN201610118456.7A priority Critical patent/CN105808247B/en
Publication of CN105808247A publication Critical patent/CN105808247A/en
Application granted granted Critical
Publication of CN105808247B publication Critical patent/CN105808247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • 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/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators

Abstract

The present invention relates to desktop virtual technology fields, the redirection that current virtualization product can not support physical light to drive, it is even more impossible to after realizing physics CD-ROM drive being redirected to the virtual machine of distal end, so that it is also equipped with same physical light and drives the feature the same when locally using, there is also do not support linux system simultaneously, in order to solve the above problem, the present invention provides a kind of physics CD-ROM drive reorientation method of virtualization product based on linux system, the virtualization product includes the physics CD-ROM drive for being located locally end, for accessing the client of virtual machine and positioned at the virtual machine of server-side, there is the client physics CD-ROM drive to redirect service, local side and server-side are based on linux system, physics CD-ROM drive is mounted in server-side by this method using scst iscsi agreement;Recycle virsh dynamically load server-side CD-ROM equipment into virtual machine, this method can be realized the redirection of physics CD-ROM drive, and support linux system.

Description

The physics CD-ROM drive reorientation method of virtualization product based on linux system
Technical field
The present invention relates to desktop virtual technology field, the object of specially a kind of virtualization product based on linux system Reorientation method drives in Ricoh.
Background technique
In desktop virtual technology field, the support of virtual peripheral is that general need and all big enterprises focus on solving The technical issues of.
In desktop virtual technology, after client is connected to the virtual machine on remote service end, due to virtual machine and visitor Family end is not on same hardware device, in order to reach and the consistent effect of conventional desktop, the peripheral hardwares such as USB, CD-ROM drive in terminal It needs to be redirected in virtual machine by technological means.
Since physics CD-ROM drive is locally in use, have the characteristics that following two: (1) not depending on operating system, i.e. bios is opened It is dynamic to find CD-ROM drive;(2) CD-ROM equipment is identified as in Windows system.Therefore, when physics CD-ROM drive is redirected to the void of distal end It should also be as having the above feature after quasi- machine.
In current virtualization product field, the redirection that domestic virtualization product can not support physical light to drive, there are no After physics CD-ROM drive is redirected to the virtual machine of distal end by method realization, it is set to be also equipped with same physical light drive the same when locally using Feature;In external virtualization product, VMware realizes similar function, and method is to be directed to local iso file In virtual machine, since VMware belongs to commercial product, the realization details of this method is not disclosed.
In addition to the above-mentioned problems, the problem of current virtualization product can not support linux system there is also its client.
Summary of the invention
The redirection and client that physical light can not be supported to drive for existing desktop virtualization product can not support Linux The problem of system, the present invention provide a kind of physics CD-ROM drive reorientation method of virtualization product based on linux system.
To realize the above technical purpose, the technical scheme is that
A kind of physics CD-ROM drive reorientation method of the virtualization product based on linux system, the virtualization product include It is located locally physics CD-ROM drive, the client for accessing virtual machine and the virtual machine positioned at server-side at end, the client tool There is physics CD-ROM drive to redirect service, the local side and server-side are based on linux system, and the physics CD-ROM drive redirects service Based on scst iscsi agreement, using physics CD-ROM drive as iscsi target, server-side is established as iscsi initiator Scst iscsi service, redirection steps are as follows:
A. the state of the virtual machine currently connected is detected from client configuration file;
B. if the normal connecting virtual machine of client, and virtual machine id has been got, then read in physics CD-ROM drive Content;
C. the physics CD-ROM drive content that the content of present physical CD-ROM drive and last time save is compared, if it is different, then object Ricoh, which drives, to be serviced as iscsi target starting scst iscsi and waits connection server-side;
D. it is connected to server-side and executes iscsi discovery and iscsi register;
After E.iscsi discovery and the success of iscsi register, server-side possesses an iscsi equipment, then executes qemu Virsh update-device<vm_name>cdrom.xml is ordered, iscsi equipment is associated with service in a manner of block device In the virtual machine CD-ROM drive at end;
F. the content in virtual machine CD-ROM drive dynamically load iscsi equipment, redirection process are completed.
From the above, it can be seen that the present invention has following advantages:
1. local physics CD-ROM drive is mounted in server-side using scst iscsi agreement;It can using scst iscsi agreement Support a variety of CD-ROM equipments, such as CD, DVD.
2. using virsh dynamically load server-side CD-ROM equipment into virtual machine;Virsh is the pipe of qemu-kvm virtualization Program is managed, carries out dynamically load, simplified operation program using it.
Preferably, being connected to the mode of server-side described in step D are as follows: connect server-side, service by ssh agreement End ssh tunneling technique is supported by scst iscsi agreement Opposite direction connection client;Data are transmitted using ssh agreement, no It can only guarantee the safety of data transmission, and breach and require the network between client and server-side must diconnected Limitation.
Detailed description of the invention
Fig. 1 is logical flow chart of the invention.
Specific embodiment
In conjunction with Fig. 1, the specific embodiment that the present invention will be described in detail, but any limit is not done to claim of the invention It is fixed.
A kind of physics CD-ROM drive reorientation method of the virtualization product based on linux system, the virtualization product include It is located locally physics CD-ROM drive, the client for accessing virtual machine and the virtual machine positioned at server-side at end, the client tool There is physics CD-ROM drive to redirect service, the local side and server-side are based on linux system.
Using scst iscsi agreement, using physics CD-ROM drive as iscsi target, server-side is as iscsi Initiator establishes scst iscsi service;
The logic flow that physics CD-ROM drive redirects service is as follows, and as shown in Figure 1:
1. detecting the state of the virtual machine currently connected from client configuration file, four kinds of virtual machine state point:
A.VMNOTCONNECT, client is not connected, and keeping CD-ROM drive to redirect is off-state;
B.NOID, no virtual machine id;
C.NORMAL, the normal connecting virtual machine of client, and got virtual machine id;
D.VALUEERROR reads configuration file error;
2. if reading the content in physics CD-ROM drive return to NORMAL using blkid order, obtaining similar output :/ Dev/sr0:LABEL=" Openfiler ESA ISO (x86_64Disc 1 " TYPE=" iso9660
3. the physics CD-ROM drive content that the content of present physical CD-ROM drive and last time save is compared, if it is different, then will Physics CD-ROM drive/dev/sr0 starts scst iscsi service as iscsi target device configuration, and scst iscsi service makes With following similar configuration:
After 4.iscsi service starts successfully, if necessary to start the tunnel ssh, then using following ssh order connection service End, is separately turned on tunnel port in local side and server-side.
Ssh-4-o ServerAliveInterval=1-o ServerAliveCountMax=5-o StrictHostKeyChecking=no
- o UserKnownHostsFile=/dev/null-o ExitOnForwardFailure=yes-f-N-R% (remoteport) s:localhost:% (localport) s% (username) s@% (host) s
Here remoteport represents server-side Linux system local port, and localport represents client linux The local port of system.When server-side sends data to remoteport, the tunnel ssh will forward data to localport, from And realize also can normal communication when server-side can not actively connect client.
5.iscsi service starts successfully or after the tunnel ssh opens successfully, passes through ssh protocol entry to server-side linux System, and remotely execute following iscsi order:
# scans client ip, and finds iscsi target
iscsiadm--mode discovery--type sendtargets--portal$scstserver
Purview certification mode is arranged in #
Iscsiadm-m node--targetname $ target--op=update
-- 2>&1 of name=node.session.auth.authmethod--value=CHAP
Login username is arranged in #
Iscsiadm-m node--targetname $ target--op=update
-- 2>&1 of name=node.session.auth.username--value=vdi
Login password is arranged in #
Iscsiadm-m node--targetname $ target--op=update
-- 2>&1 of name=node.session.auth.password--value=$ password
# executes login
iscsiadm-m node--targetname$target-p$scstserver--login
Here $ scstserver is client ip (unlatching of the tunnel ssh is then server-side local ip), and $ target is client Hold iscsi target title.After above-mentioned iscsi register success, server-side Linux system is local will to there is similar scsi Disk unit:
/ dev/disk/by-path/ip-% (scstserver) s:3260-iscsi-% (target) s-lun-0
6. client logs on to server-side by ssh protocol remote, executed by libvirt virsh in server-side Operation:
A. the CD-ROM drive xml description of virtual machine is generated:
<disk type='block'device='cdrom'>
<driver name='qemu'type='raw'/>
<the scsi disk unit mentioned in source dev='$ device'/># step 6
<target dev='hda'bus='ide'/>
<readonly/>
</disk>
Above-mentioned xml is expressed as virtual machine and increases CD-ROM equipment, and device type is local block device, i.e., mentions in step 5 Scsi disk unit.
B. virsh update-device<vm_name>cdrom.xml order is executed, the xml in step a is applied to In virtual machine.After operating successfully, will occur new CD-ROM equipment in virtual machine, equipment content will be responsible for reading by qemu-kvm. Redirection process is completed.
The present invention selects scst iscsi, scst iscsi to be able to achieve support physical light drive apparatus as target, iscsi Remote equipment can be mounted to local use by agreement, and the equipment of local carry is that block device and physical equipment do not have function poor It is different.
In conclusion the invention has the following advantages that
1. local physics CD-ROM drive is mounted in server-side using scst iscsi agreement;It can using scst iscsi agreement Support a variety of CD-ROM equipments, such as CD, DVD.
2. using virsh dynamically load server-side CD-ROM equipment into virtual machine;Virsh is the pipe of qemu-kvm virtualization Program is managed, carries out dynamically load, simplified operation program using it.
It 3. transmitting data using ssh agreement, can not only guarantee the safety of data transmission, and breach and require client The limitation of the necessary diconnected of network between end and server-side.
It is understood that being merely to illustrate the present invention above with respect to specific descriptions of the invention and being not limited to this Technical solution described in inventive embodiments.Those skilled in the art should understand that still can be carried out to the present invention Modification or equivalent replacement, to reach identical technical effect;Needs are used as long as meeting, all in protection scope of the present invention.

Claims (2)

1. a kind of physics CD-ROM drive reorientation method of virtualization product based on linux system, it is characterised in that: the virtualization Product includes the physics CD-ROM drive for being located locally end, the client for accessing virtual machine and the virtual machine positioned at server-side, described There is client physics CD-ROM drive to redirect service, and the local side and server-side are based on linux system, the physics CD-ROM drive weight Orientation service is based on scst iscsi agreement, and using physics CD-ROM drive as iscsi target, server-side is as iscsi Initiator establishes scst iscsi service, and redirection steps are as follows:
A. the state of the virtual machine currently connected is detected from client configuration file;
B. if the normal connecting virtual machine of client, and virtual machine id has been got, has then read the content in physics CD-ROM drive;
C. the physics CD-ROM drive content that the content of present physical CD-ROM drive and last time save is compared, if it is different, then physical light It drives and services as iscsi target starting scst iscsi and wait connection server-side;
D. it is connected to server-side and executes iscsi discovery and iscsi register;
After E.iscsi discovery and the success of iscsi register, server-side possesses an iscsi equipment, then executes qemu order Virsh update-device<vm_name>cdrom.xml, is associated with server-side for iscsi equipment in a manner of block device In virtual machine CD-ROM drive;
F. the content in virtual machine CD-ROM drive dynamically load iscsi equipment, redirection process are completed.
2. the physics CD-ROM drive reorientation method of the virtualization product according to claim 1 based on linux system, feature It is: is connected to the mode of server-side described in step D are as follows: server-side is connected by ssh agreement, server-side passes through scst Iscsi agreement Opposite direction connection client, and support ssh tunneling technique.
CN201610118456.7A 2016-03-02 2016-03-02 The physics CD-ROM drive reorientation method of virtualization product based on linux system Active CN105808247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610118456.7A CN105808247B (en) 2016-03-02 2016-03-02 The physics CD-ROM drive reorientation method of virtualization product based on linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610118456.7A CN105808247B (en) 2016-03-02 2016-03-02 The physics CD-ROM drive reorientation method of virtualization product based on linux system

Publications (2)

Publication Number Publication Date
CN105808247A CN105808247A (en) 2016-07-27
CN105808247B true CN105808247B (en) 2019-01-22

Family

ID=56466595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610118456.7A Active CN105808247B (en) 2016-03-02 2016-03-02 The physics CD-ROM drive reorientation method of virtualization product based on linux system

Country Status (1)

Country Link
CN (1) CN105808247B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536515B (en) * 2018-03-02 2021-10-01 武汉噢易云计算股份有限公司 Method and system for playing music CD of client by virtual machine of VDI

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214127A (en) * 2010-11-15 2011-10-12 上海安纵信息科技有限公司 Method for intensively storing and backing up data based on operating system virtualization theory
CN103309720A (en) * 2012-03-07 2013-09-18 上海聚耘信息科技有限公司 Virtual machine management system for maintaining virtual data center
CN104731529A (en) * 2015-03-17 2015-06-24 浪潮集团有限公司 Recognition and configuration application method for iSCSI memorizer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214127A (en) * 2010-11-15 2011-10-12 上海安纵信息科技有限公司 Method for intensively storing and backing up data based on operating system virtualization theory
CN103309720A (en) * 2012-03-07 2013-09-18 上海聚耘信息科技有限公司 Virtual machine management system for maintaining virtual data center
CN104731529A (en) * 2015-03-17 2015-06-24 浪潮集团有限公司 Recognition and configuration application method for iSCSI memorizer

Also Published As

Publication number Publication date
CN105808247A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
US10761949B2 (en) Live partition mobility with I/O migration
US10834086B1 (en) Hybrid cloud-based authentication for flash storage array access
US7743107B2 (en) System and method for using remote module on VIOS to manage backups to remote backup servers
US9300660B1 (en) Providing authorization and authentication in a cloud for a user of a storage array
US7747847B2 (en) Method and system for iSCSI boot in which an iSCSI client loads boot code from a host bus adapter and/or network interface card
US9400671B2 (en) Computer host with a baseboard management controller to manage virtual machines
US20160041839A1 (en) Certificate based connection to cloud virtual machine
JP5826298B2 (en) Technology to protect checked out virtual machines in a virtual desktop infrastructure
US8108498B2 (en) System and method of enabling access to remote information handling systems
US20130085989A1 (en) Cloud information migration systems and methods
WO2016120084A1 (en) Host based non-volatile memory clustering using network mapped storage
US20160378782A1 (en) Virtual desktop infrastructure private cloud
US20190361751A1 (en) Migrating a logical partition with a native logical port
US20150067399A1 (en) Analysis, recovery and repair of devices attached to remote computing systems
CN109672602B (en) Method and equipment for remotely accessing VPN
US8321617B1 (en) Method and apparatus of server I/O migration management
US9690612B2 (en) Dynamically managing a serial port interface of virtualization software on host device wherein execution is performed not during boot sequence
US20170054765A1 (en) Systems and methods for establishing a control channel between a virtualization server and a client device
US10705929B2 (en) Switching servers without interrupting a client command-response queue
US8589472B2 (en) Agent system for reducing server resource usage
CN105808247B (en) The physics CD-ROM drive reorientation method of virtualization product based on linux system
US10176271B2 (en) Command line interface browser
US9059919B1 (en) Systems and methods for preserving network settings for use in a pre-boot environment
US9742725B2 (en) Network address identification
CN116319043A (en) Network authority control system and method based on identity authentication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 214000 Wuxi City, Jiangsu, Tianan Intelligent City, new Wu District, 1-406

Applicant after: Wuxi Chen Yun Polytron Technologies Inc

Address before: 214000 Taihu international science and Technology Park, Wuxi City, Wuxi, Jiangsu Province, C506

Applicant before: Jiangsu Morning Cloud Information Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Dan Kangjie

Inventor after: Ge Chun

Inventor before: Ge Chun

CB03 Change of inventor or designer information
CP03 Change of name, title or address

Address after: Room 1110, 11 / F, block B, Lane 2855, Huqingping highway, Zhaoxiang Town, Qingpu District, Shanghai, 201799

Patentee after: Shanghai kunjingyun Co., Ltd

Address before: 214000 Wuxi City, Jiangsu, Tianan Intelligent City, new Wu District, 1-406

Patentee before: WUXI MORNING CLOUD TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address