CN103501295B - A kind of remote access method based on virtual machine (vm) migration and equipment - Google Patents
A kind of remote access method based on virtual machine (vm) migration and equipment Download PDFInfo
- Publication number
- CN103501295B CN103501295B CN201310450732.6A CN201310450732A CN103501295B CN 103501295 B CN103501295 B CN 103501295B CN 201310450732 A CN201310450732 A CN 201310450732A CN 103501295 B CN103501295 B CN 103501295B
- Authority
- CN
- China
- Prior art keywords
- vnc
- physical host
- server end
- virtual machine
- address
- 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
Links
Landscapes
- Computer And Data Communications (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a kind of remote access method based on virtual machine (vm) migration and equipment, the method includes:When virtual machine needs to move to purpose physical host from source physical host, VNC client receives the VNC protocol message from a VNC server end, carries the port information of the 2nd VNC server end and the IP address of purpose physical host in the VNC protocol message;The VNC client is determining virtual machine (vm) migration to after purpose physical host, using the port information of the 2nd VNC server end and the IP address of purpose physical host, the connection that sets up between this VNC client and the 2nd VNC server end.In the embodiment of the present invention, can avoid being presented on the virtual desktop of user side or interrupting occurs in remote desktop.
Description
Technical field
The present invention relates to communication technical field, has especially related to a kind of remote access method based on virtual machine (vm) migration
And equipment.
Background technology
With the continuous improvement of hardware speed, server performance is greatly promoted, the use of the part server of data center
Rate has declined, and in order to improve the hardware utilization of server, in recent years, Intel Virtualization Technology is greatly developed.By virtuality
Machine software, can simulate one or multiple stage virtual machine on a physical computer, and these virtual machines are completely just as real
Computer be operated like that, for example, on a virtual machine can with installation operation system, set up applications, access network money
Source etc..
VNC(Virtual Network Computing, Virtual network computer)It is a remote control tool software,
Mainly by VNC client(vncviewer)With VNC server end(vncserver)Constitute, and VNC server end can pass through
The modes such as setting code are improving the security of network access.
Virtual machine (vm) migration referred to the virtual machine (vm) migration on the physical host of source to purpose physical host, and can be in purpose
Normally run on physical host.Wherein, if virtual machine is in running status when migrating, it is referred to as online migration;If migration
When virtual machine be in halted state, then be referred to as offline migration.Further, the dimension of system can by virtual machine (vm) migration, be simplified
Shield and management, realize the load balancing of system, and the fault-tolerant ability of strengthening system, and optimize power supply managing and save energy
Source etc..
In order to the virtualization of desktop is realized, the desktop of remote physical main frame or virtual machine is presented on this by network
End, it usually needs VNC client is directly connected to VNC server end, as shown in figure 1, being directly connected to VNC for VNC client
The schematic diagram of server end.VNC client is in the corresponding VNC server end of the IP address and virtual machine of knowing physical host
After port information, you can be connected to VNC server end, it is connectable on the virtual machine specified then using the virtuality
Machine.
But, when on the virtual machine (vm) migration on the physical host of source to purpose physical host, after virtual machine (vm) migration,
Connection between the source physical host that VNC client and VNC server end are located will be switched off, and VNC client needs to build again
The connection of the purpose physical host after virtual machine (vm) migration is stood, so as to cause to be presented on the virtual desktop of user side(Or be referred to as remote
Journey desktop)Occur interrupting.
Content of the invention
The embodiment of the present invention provides a kind of remote access method based on virtual machine (vm) migration and equipment, to avoid being presented on use
Interrupting occur in the virtual desktop of family side or remote desktop, and improve user's use feeling.
In order to achieve the above object, the embodiment of the present invention provides a kind of remote access method based on virtual machine (vm) migration, should
Method includes:
When virtual machine needs to move to purpose physical host from source physical host, in the virtual machine (vm) migration to the mesh
Physical host before, Virtual network computer VNC client receive right on the source physical host from the virtual machine
The VNC protocol message of the VNC server end that answers;Wherein, the virtual machine is carried in the mesh in the VNC protocol message
Physical host on the port information of corresponding 2nd VNC server end and the IP address of the purpose physical host;
The VNC client perceive itself between a VNC server end connection disconnect when, determine institute
State virtual machine and have migrated to the purpose physical host, and the port information using the 2nd VNC server end and institute
The IP address of purpose physical host is stated, the connection that sets up between this VNC client and the 2nd VNC server end, to log in
The desktop of the virtual machine.
The VNC client was received before the VNC protocol message of a VNC server end, and methods described also includes:
The VNC client receives the notification message from virtual machine management platform, carries VNC clothes in the notification message
The business port information at device end and the IP address of the source physical host, and believed using the port of a VNC server end
Breath and the IP address of the source physical host, the connection that sets up between this VNC client and a VNC server end.
The type of message of the VNC protocol message be VmMigrateInfo, in the VNC protocol message carry ipv4 and
Ipv6 shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host,
The vnc port information field is used for carrying the port information of the 2nd VNC server end.
The embodiment of the present invention proposes a kind of remote access method based on virtual machine (vm) migration, and the method includes:
When virtual machine needs to move to purpose physical host from source physical host, the virtual machine is on the physical host of source
Corresponding first Virtual network computer VNC server end obtains virtual machine corresponding 2nd VNC clothes in purpose physical host
The business port information at device end and the IP address of the purpose physical host;
Before the virtual machine (vm) migration to the purpose physical host, a VNC server end is to the virtuality
The corresponding VNC client of machine sends VNC protocol message, carries the end of the 2nd VNC server end in the VNC protocol message
Message breath and the IP address of the purpose physical host;
By the VNC client perceive itself between a VNC server end connection disconnect when, determine
The virtual machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end and
The IP address of the purpose physical host, the connection that sets up between the VNC client and the 2nd VNC server end, with
Log in the desktop of the virtual machine.
The first VNC server end obtains the port information of the 2nd VNC server end and the purpose physical host
IP address, including:
2nd VNC clothes of libvirt middleware of the first VNC received server-side on the physical host of source
The business port information at device end and the IP address of the purpose physical host;Wherein, the libvirt middleware is used for virtuality
Machine moves to purpose physical host from source physical host, and for by the port information of the 2nd VNC server end and described
When the IP address of purpose physical host and the virtual machine move to the information of the purpose physical host, notify to institute
State a VNC server end.
The type of message of the VNC protocol message be VmMigrateInfo, in the VNC protocol message carry ipv4 and
Ipv6 shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host,
The vnc port information field is used for carrying the port information of the 2nd VNC server end.
The embodiment of the present invention proposes a kind of Virtual network computer VNC client, and the VNC client includes:
Receiver module, for when virtual machine needs to move to purpose physical host from source physical host, in the virtuality
Before machine moves to the purpose physical host, receive from the virtual machine corresponding first on the source physical host
The VNC protocol message of VNC server end;Wherein, the virtual machine is carried in the VNC protocol message in the purpose physics master
The IP address of the port information of corresponding 2nd VNC server end and the purpose physical host on machine;
Processing module, for perceive the connection between VNC client and a VNC server end disconnect when,
Determine that the virtual machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end
And the IP address of the purpose physical host, the connection that sets up between this VNC client and the 2nd VNC server end,
To log in the desktop of the virtual machine.
The receiver module, is additionally operable to receiving before the VNC protocol message of a VNC server end, receives and
The notification message of self virtualizing machine management platform, carry in the notification message port information of a VNC server end with
And the IP address of the source physical host;
The processing module, the port information being additionally operable to using a VNC server end and the IP ground of source physical host
Location, the connection that sets up between this VNC client and a VNC server end.
The type of message of the VNC protocol message be VmMigrateInfo, in the VNC protocol message carry ipv4 and
Ipv6 shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host,
The vnc port information field is used for carrying the port information of the 2nd VNC server end.
The embodiment of the present invention proposes a kind of Virtual network computer VNC server end, as virtual machine in source physical host
Upper corresponding VNC server end, the VNC server end are specifically included:
Acquisition module, for when the virtual machine needs to move to purpose physical host from the source physical host, obtaining
Take the virtual machine port information of corresponding 2nd VNC server end and purpose thing in the purpose physical host
The IP address of reason main frame;
Sending module, for, before the virtual machine (vm) migration to the purpose physical host, corresponding to the virtual machine
VNC client send VNC protocol message, carry the port information of the 2nd VNC server end in the VNC protocol message
And the IP address of the purpose physical host;
By the VNC client perceive itself between a VNC server end connection disconnect when, determine
The virtual machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end and
The IP address of the purpose physical host, the connection that sets up between the VNC client and the 2nd VNC server end, with
Log in the desktop of the virtual machine.
The acquisition module, specifically for receiving the 2nd VNC of the libvirt middleware on the physical host of source
The port information of server end and the IP address of the purpose physical host;Wherein, the libvirt middleware is used for void
Plan machine moves to purpose physical host from source physical host, and for by the port information of the 2nd VNC server end and the mesh
The IP address of physical host and the virtual machine when move to the information of the purpose physical host, notify to described
First VNC server end.
The type of message of the VNC protocol message be VmMigrateInfo, in the VNC protocol message carry ipv4 and
Ipv6 shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host,
The vnc port information field is used for carrying the port information of the 2nd VNC server end.
Compared with prior art, the embodiment of the present invention at least has advantages below:In the embodiment of the present invention, when virtual machine is needed
Will from source physical host move to purpose physical host when, before virtual machine (vm) migration to purpose physical host, by by second
The IP address of the port information of VNC server end and purpose physical host is notified to VNC client so that VNC client exists
Virtual machine (vm) migration is determined to after purpose physical host, can be directly using port information and the mesh of the 2nd VNC server end
Physical host IP address, the connection that sets up between this VNC client and the 2nd VNC server end, so as to avoid being presented on
Interrupting occur in the virtual desktop of user side or remote desktop, and improve user's use feeling.Specifically, in the transition process of virtual machine
In, the uninterrupted operation of virtual desktop or remote desktop can be realized, and virtual desktop is improved during virtual machine (vm) migration
Or the user experience of remote desktop.
Description of the drawings
Fig. 1 is the schematic diagram that VNC client is directly connected to VNC server end in prior art;
Fig. 2 is the system structure diagram of the embodiment of the present invention;
Fig. 3 is the schematic diagram that VNC client is directly connected to VNC server end in the embodiment of the present invention;
Fig. 4 is a kind of remote access method flow chart based on virtual machine (vm) migration provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of VNC client provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of VNC server end provided in an embodiment of the present invention.
Specific embodiment
For problems of the prior art, the embodiment of the present invention provides a kind of remote access based on virtual machine (vm) migration
Method, the method are applied in the system for include virtual machine management platform and multiple physical hosts, and are run on each physical host
There is more than one virtual machine.As shown in Fig. 2 being to include that virtual machine management platform and the system architecture of multiple physical hosts are illustrated
Figure, the system include physical host 1, physical host 2 and physical host 3.Under this application scene, constituted with three physical hosts
System as a example by illustrate, in actual networking the node number of physical host can flexible elastic stretch, here is no longer
Repeat.
Wherein, the KVM based on Linux can be run on each physical host(kernel-based Virtual
Machine, the virtual machine based on kernel)Virtual platform(The KVM is VMM(Virtual Machine Monitor, virtual
Machine)One kind implement), operation libvirt(The function library of virtualization instrument)Deng virtualization middleware.Additionally, each physics
Multiple virtual machines are run on main frame, are separately operable different business on each virtual machine(As DataBase server(Database takes
Business)、web server(Network service), file server(File service), ftp serve(File transfer services)、mail
server(Mail service)Deng).
As shown in figure 3, for the application scenarios schematic diagram of the embodiment of the present invention, in remote access provided in an embodiment of the present invention
In method, corresponding system architecture includes virtual machine management platform(vManager), VNC client, VNC server end, fortune
Row is based on the physical host of the KVM virtualization platform of Linux, the libvirt middleware of increasing income operated on each physical host.Its
In, KVM is the virtual platform on Linux, it is possible to create virtual machine on physical host so that run on each physical host
Multiple virtual machines.
In the embodiment of the present invention, virtual machine management platform passes through SSH(Secure Shell, safety shell protocol)Deng long-range
Instrument managing physical host, realize to run on all physical hosts, all physical hosts virtual machine, virtual switch,
The unified management of storage resource etc..Further, virtual machine management platform can manage each thing by remote tools such as SSH
Reason main frame, such as:(1)Realize the operation such as the increase to physical host, deletion;(2)Tool software is virtualized come real by libvirt
The related operation of all virtual machine life cycles and the pipes such as existing virtual machine creating, deletion, startup, stopping, time-out, migration virtual machine
Reason;(3)After user selects designated virtual machine, button is provided, start VNC client after clicking on, connect the void that specifies
Plan machine, the desktop of remote virtual machine is presented to before user plane.
In the embodiment of the present invention, run on each physical host based on the KVM virtualization platform of Linux, operation libvirt etc.
Virtualization middleware, and each physical host is virtual machine, virtual switch, the carrier of storage.Wherein, also need on each physical host
VNC server end is run, and the virtual machine of each starting state corresponds to a port on VNC server end, and VNC visitor
Family end can be connected to the desktop of the virtual machine by the port, so as to realize remote virtual desktop, operate then the virtual machine.
Specifically, after virtual machine being created on physical host, the virtual machine can be specified by modes such as order lines
Port information on VNC server end etc., and VNC client is in the IP address for knowing the physical host and the virtual machine
After the port information on VNC server end, you can be connected to the VNC server end, be connectable to then the void that specifies
Come on plan machine using the virtual machine.
In the embodiment of the present invention, VNC client and VNC server end are virtual desktop tool software of increasing income.VNC client
Customer side is operated in, user chooses certain virtual machine in virtual machine management platform, and when executing " remote desktop " order, virtual
The information such as port of the machine management platform by the IP address of remote physical main frame and virtual machine on VNC server end are sent to VNC
Client so that VNC client can log in virtual machine desktop.VNC server end is then operated on each physical host, is being created
During virtual machine, port of the virtual machine on VNC server end can be specified by KVM virtualization platform.
Based on above-mentioned virtual machine management platform, physical host, VNC client and VNC server end, as shown in figure 4, the base
Comprise the following steps in the remote access method of virtual machine (vm) migration:
Step 401, user log in virtual machine management platform on the browsers such as IE, create virtual machine on the physical host of source
VM1, that is, specify virtual machine VM1 to set up on the physical host of source.
Step 402, virtual machine management platform obtain virtual machine VM1 corresponding VNC server on the physical host of source
The port information at end and the IP address of source physical host, and send a notification message to VNC client;Wherein, the notification message
In at least carry the port information of a VNC server end and the IP address of source physical host.Further, the port letter
Breath can be port numbers.
Wherein, the IP address of source physical host can be IPV4 address or IPV6 address.
Specifically, when user executes login " remote desktop " button in virtual machine management platform, Virtual Machine Manager is put down
Platform obtains source physical host(The physical host of virtual machine is currently run)IP address(As 192.168.0.188), and pass through
SSH logs on the IP address(As 192.168.0.188), afterwards, virtual machine management platform is by libvirt order of increasing income
Virsh vncdisplay vm1 can get the port information of a VNC server end(That is port numbers).For example, it is based on
Libvirt order virsh vncdisplay vm1, following result illustrate the corresponding VNC server end of virtual machine VM1
Port numbers are 0.
root@cvknode2:~/build#virsh vncdisplay vm1
:0
root@cvknode2:~/build#
Step 403, VNC client receive the notification message from virtual machine management platform, using a VNC server end
Port information and source physical host IP address, the connection that sets up between this VNC client and a VNC server end, with
The remote desktop of virtual machine VM1 is signed in using the connection.
Specifically, virtual machine management platform can start VNC client on the browsers such as the IE of user, and clear in IE etc.
Look on device and the information such as the port information of a VNC server end and the IP address of source physical host is provided(Such as
192.168.0.188:0)So that VNC client is using the port information of a VNC server end and the IP of source physical host
The connection that address is set up between this VNC client and a VNC server end, to sign in virtual machine VM1's using the connection
Remote desktop.
Step 404, when virtual machine VM1 needs to move to purpose physical host from source physical host(Now virtual machine VM1 is also
Purpose physical host is not moved to from source physical host, simply have the demand for moving to purpose physical host from source physical host)
When, a VNC server end obtains the port letter of virtual machine VM1 corresponding 2nd VNC server end in purpose physical host
Breath and the IP address of purpose physical host.
Wherein, the IP address of purpose physical host can be IPV4 address or IPV6 address.
Specifically, when virtual machine VM1 needs to move to purpose physical host from source physical host(Driven based on keeper's operation
The reasons such as dynamic or scheduling of resource LB driving, can cause virtual machine VM1 to move to purpose physical host from source physical host)When, can
Virtual machine is moved to purpose physical host from source physical host by the libvirt middleware on the physical host of source, such as
Libvirt middleware as issued orders for by virtual machine VM1 from main frame host1(Source physical host)Move to main frame host2
(Purpose physical host), time-out time is 300s, i.e., will suspend virtual machine VM1 when transition process is more than 300s, and be further continued for moving
Move.
virsh-c qemu+ssh://host1/system migrate--live--persistent vm1 qemu+
ssh://host2/system--timeout300
Based on this, libvirt middleware is executing the process of virtual machine (vm) migration(Purpose physics is moved to from source physical host
The process of main frame)In, libvirt middleware can get the port information of the 2nd VNC server end(Success after void is such as migrated
The port numbers of VNC server end of the plan machine VM1 on host2)IP address with purpose physical host(The such as IP of host2
Location);Additionally, when virtual machine VM1 completes to move to the process of purpose physical host, libvirt middleware from source physical host
Itself it is also can known.
Libvirt middleware is getting the port information of the 2nd VNC server end and the IP address of purpose physical host
Afterwards, the IP address of the port information of the 2nd VNC server end and purpose physical host is notified to a VNC server end, by
First VNC server end knows the port information of the 2nd VNC server end and the IP address of purpose physical host.Additionally,
When virtual machine is moved to purpose thing when getting virtual machine and when moving to purpose physical host by libvirt middleware
The information of reason main frame notifies, to a VNC server end, to know when virtual machine moves to purpose thing by a VNC server end
Reason main frame.
Step 405, before virtual machine (vm) migration to purpose physical host, a VNC server end is sent to VNC client
VNC protocol message.Wherein, port information and the purpose thing of the 2nd VNC server end are at least carried in the VNC protocol message
The IP address of reason main frame.
Specifically, due to the information when virtual machine can be moved to purpose physical host by libvirt middleware notify to
First VNC server end so that a VNC server end can know when virtual machine moves to purpose physical host, therefore,
2nd VNC can be taken before virtual machine (vm) migration to purpose physical host by the first VNC server end by VNC protocol message
The IP address of the port information at business device end and purpose physical host is notified to VNC client.
Step 406, VNC client receive the VNC protocol message from a VNC server end(Second is wherein carried
The port information of VNC server end and the IP address of purpose physical host), and perceiving this VNC client and a VNC
When connection between server end disconnects, VNC client determines that virtual machine VM1 has migrated to purpose physical host, and utilizes
The port information of the 2nd VNC server end and the IP address of purpose physical host, are set up this VNC client and are taken with the 2nd VNC
Connection between business device end, to log in the desktop of virtual machine VM1.
Specifically, VNC client is being received after the VNC protocol message of a VNC server end, can be got
The port information of the 2nd VNC server end and the IP address of purpose physical host, and preserve the port of the 2nd VNC server end
Information and the IP address of purpose physical host.During afterwards, after virtual machine VM1 moves to purpose physical host,
Connection between VNC client and a VNC server end will be switched off, and VNC client is perceiving this VNC client and the
When connection between one VNC server end disconnects, will determine that virtual machine VM1 has migrated to purpose physical host, now VNC visitor
Family end can be built directly using the port information of the 2nd VNC server end for preserving before and the IP address of purpose physical host
Vertical connection between this VNC client and the 2nd VNC server end, to sign in again the remote desktop of virtual machine VM1, and
Avoid being presented on the virtual desktop of user side or interrupting occurs in remote desktop, so as to improve user's use feeling.
In a kind of preferred embodiment of the embodiment of the present invention, the type of message of VNC protocol message is
Ipv4 and ipv6 shared address texture field, vnc port information field is carried in VmMigrateInfo, VNC protocol message;Its
In, ipv4 and ipv6 shared address texture field is used for carrying the IP address of purpose physical host, and vnc port information field is used for
Carry the port information of the 2nd VNC server end.
Specifically, the VNC protocol message for sending to VNC client for a VNC server end, is disappeared by extending one
Breath type VmMigrateInfo(Data type is the byte of U8, i.e.,), and a free time number is taken after existing message number
(As 211)So that VNC protocol message can carry the port of the IP address of purpose physical host and the 2nd VNC server end
Information.
As follows, it is a kind of concrete message format of VNC protocol message, the VNC protocol message passes through ipv4 and ipv6
Shared address texture field carries the IP address of purpose physical host, and carries the 2nd VNC service by vnc port information field
The port information at device end.
In sum, in the embodiment of the present invention, when virtual machine needs to move to purpose physical host from source physical host,
Before virtual machine (vm) migration to purpose physical host, a VNC server end passes through the port information of the 2nd VNC server end
And the IP address of purpose physical host is notified to VNC client so that VNC client is determining virtual machine (vm) migration to purpose thing
After reason main frame, can set up directly using the port information of the 2nd VNC server end and the IP address of purpose physical host
Connection between this VNC client and the 2nd VNC server end, so as to avoid being presented on the virtual desktop of user side or long-range table
Interrupting occurs in face, and improves user's use feeling.Specifically, in the transition process of virtual machine, virtual desktop or remote can be realized
The uninterrupted operation of journey desktop, and during virtual machine (vm) migration, the user of raising virtual desktop or remote desktop uses body
Test.
Based on the inventive concept same with said method, a kind of Virtual network computer in the embodiment of the present invention, is additionally provided
VNC client, as shown in figure 5, the VNC client includes:
Receiver module 11, for when virtual machine needs to move to purpose physical host from source physical host, in the void
Before plan machine moves to the purpose physical host, receive from the virtual machine corresponding first on the source physical host
The VNC protocol message of VNC server end;Wherein, the virtual machine is carried in the VNC protocol message in the purpose physics master
The IP address of the port information of corresponding 2nd VNC server end and the purpose physical host on machine;
Processing module 12, for perceiving the disconnection of the connection between VNC client and a VNC server end
When, determine that the virtual machine has migrated to the purpose physical host, and believed using the port of the 2nd VNC server end
Breath and the IP address of the purpose physical host, the company set up between this VNC client and the 2nd VNC server end
Connect, to log in the desktop of the virtual machine.
The receiver module 11, is additionally operable to receiving before the VNC protocol message of a VNC server end, receives
The port information of a VNC server end is carried in the notification message of virtual machine management platform, the notification message
And the IP address of the source physical host;
The processing module 12, the port information being additionally operable to using a VNC server end and the IP of source physical host
Address, the connection that sets up between this VNC client and a VNC server end.
In the embodiment of the present invention, the type of message of the VNC protocol message is VmMigrateInfo, and the VNC agreement disappears
Ipv4 and ipv6 shared address texture field, vnc port information field is carried in breath;Wherein, ipv4 the and ipv6 common land
Location texture field is used for carrying the IP address of the purpose physical host, and the vnc port information field is used for carrying described the
The port information of two VNC server ends.
Wherein, the modules of apparatus of the present invention can be integrated in one, it is also possible to be deployed separately.Above-mentioned module can be closed
And be a module, it is also possible to it is further split into multiple submodule.
Based on the inventive concept same with said method, a kind of Virtual network computer in the embodiment of the present invention, is additionally provided
VNC server end, as virtual machine on the physical host of source corresponding VNC server end, as shown in fig. 6, the VNC server
End specifically includes:
Acquisition module 21, for when the virtual machine need move to purpose physical host from the source physical host when,
Obtain the virtual machine port information of corresponding 2nd VNC server end and purpose in the purpose physical host
The IP address of physical host;
Sending module 22, for before the virtual machine (vm) migration to the purpose physical host, to the virtual machine pair
The VNC client that answers sends VNC protocol message, carries the port letter of the 2nd VNC server end in the VNC protocol message
Breath and the IP address of the purpose physical host;
By the VNC client perceive itself between a VNC server end connection disconnect when, determine
The virtual machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end and
The IP address of the purpose physical host, the connection that sets up between the VNC client and the 2nd VNC server end, with
Log in the desktop of the virtual machine.
The acquisition module 21, specifically for receiving described second of the libvirt middleware on the physical host of source
The port information of VNC server end and the IP address of the purpose physical host;Wherein, the libvirt middleware is used for
Virtual machine is moved to purpose physical host from source physical host, and for by the port information of the 2nd VNC server end and institute
State the information when IP address of purpose physical host and the virtual machine move to the purpose physical host, notify to
The first VNC server end.
In the embodiment of the present invention, the type of message of the VNC protocol message is VmMigrateInfo, and the VNC agreement disappears
Ipv4 and ipv6 shared address texture field, vnc port information field is carried in breath;Wherein, ipv4 the and ipv6 common land
Location texture field is used for carrying the IP address of the purpose physical host, and the vnc port information field is used for carrying described the
The port information of two VNC server ends.
Wherein, the modules of apparatus of the present invention can be integrated in one, it is also possible to be deployed separately.Above-mentioned module can be closed
And be a module, it is also possible to it is further split into multiple submodule.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by
Software adds the mode of required general hardware platform to realize, naturally it is also possible to by hardware, but in many cases the former be more
Good embodiment.Based on such understanding, technical scheme is substantially contributed to prior art in other words
Part can be embodied in the form of software product, and the computer software product is stored in a storage medium, if including
Dry instruction is used so that a computer equipment(Can be personal computer, server, or network equipment etc.)Execute this
Method described in each embodiment bright.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or stream
Journey is not necessarily implemented necessary to the present invention.
It will be appreciated by those skilled in the art that module in device in embodiment can be carried out point according to embodiment description
It is distributed in the device of embodiment, it is also possible to carry out respective change and be disposed other than in one or more devices of the present embodiment.On
The module for stating embodiment can merge into a module, it is also possible to be further split into multiple submodule.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
The several specific embodiments for being only the present invention disclosed above, but, the present invention is not limited to this, any ability
What the technical staff in domain can think change should all fall into protection scope of the present invention.
Claims (12)
1. a kind of remote access method based on virtual machine (vm) migration, it is characterised in that the method includes:
When virtual machine needs to move to purpose physical host from source physical host, in the virtual machine (vm) migration to the purpose thing
Before reason main frame, Virtual network computer VNC client receives corresponding on the source physical host from the virtual machine
The VNC protocol message of the first VNC server end;Wherein, the virtual machine is carried in the VNC protocol message in the purpose thing
The port information of corresponding 2nd VNC server end and the IP address of the purpose physical host on reason main frame;
The VNC client perceive itself between a VNC server end connection disconnect when, determine the void
Plan machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end and the mesh
Physical host IP address, the connection that sets up between this VNC client and the 2nd VNC server end, described to log in
The desktop of virtual machine.
2. the method for claim 1, it is characterised in that the VNC client is received from a VNC server end
Before VNC protocol message, methods described also includes:
The VNC client receives the notification message from virtual machine management platform, carries described first in the notification message
The port information of VNC server end and the IP address of the source physical host, and the end using a VNC server end
Message breath and the IP address of the source physical host, the company set up between this VNC client and a VNC server end
Connect.
3. the method for claim 1, it is characterised in that
The type of message of the VNC protocol message is VmMigrateInfo, carries ipv4 and ipv6 in the VNC protocol message
Shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host, described
Vnc port information field is used for carrying the port information of the 2nd VNC server end.
4. a kind of remote access method based on virtual machine (vm) migration, it is characterised in that the method includes:
When virtual machine needs to move to purpose physical host from source physical host, the virtual machine is corresponding on the physical host of source
The first Virtual network computer VNC server end obtain virtual machine corresponding 2nd VNC server in purpose physical host
The port information at end and the IP address of the purpose physical host;
Before the virtual machine (vm) migration to the purpose physical host, a VNC server end is to the virtual machine pair
The VNC client that answers sends VNC protocol message, carries the port letter of the 2nd VNC server end in the VNC protocol message
Breath and the IP address of the purpose physical host;
By the VNC client when perceiving itself and disconnecting with the connection between a VNC server end, determine described
Virtual machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end and described
The IP address of purpose physical host, the connection that sets up between the VNC client and the 2nd VNC server end, to log in
The desktop of the virtual machine.
5. method as claimed in claim 4, it is characterised in that a VNC server end obtains the 2nd VNC server end
Port information and the purpose physical host IP address, including:
The 2nd VNC server of libvirt middleware of the first VNC received server-side on the physical host of source
The port information at end and the IP address of the purpose physical host;Wherein, the libvirt middleware be used for by virtual machine from
Source physical host moves to purpose physical host, and for by the port information of the 2nd VNC server end and the purpose
When the IP address of physical host and the virtual machine move to the information of the purpose physical host, notify to described
One VNC server end.
6. method as claimed in claim 4, it is characterised in that
The type of message of the VNC protocol message is VmMigrateInfo, carries ipv4 and ipv6 in the VNC protocol message
Shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host, described
Vnc port information field is used for carrying the port information of the 2nd VNC server end.
7. a kind of Virtual network computer VNC client, it is characterised in that the VNC client includes:
Receiver module, for when virtual machine needs to move to purpose physical host from source physical host, moving in the virtual machine
Before moving on to the purpose physical host, reception corresponding VNC clothes on the source physical host from the virtual machine
The VNC protocol message at business device end;Wherein, the virtual machine is carried in the purpose physical host in the VNC protocol message
The port information of corresponding 2nd VNC server end and the IP address of the purpose physical host;
Processing module, for when the disconnection of the connection between VNC client and a VNC server end is perceived, determining
The virtual machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end and
The IP address of the purpose physical host, the connection that sets up between this VNC client and the 2nd VNC server end, to step on
Record the desktop of the virtual machine.
8. VNC client as claimed in claim 7, it is characterised in that
The receiver module, is additionally operable to receiving before the VNC protocol message of a VNC server end, receives from void
The notification message of plan machine management platform, carries port information and the institute of a VNC server end in the notification message
State the IP address of source physical host;
The processing module, the port information being additionally operable to using a VNC server end and the IP address of source physical host, build
Vertical connection between this VNC client and a VNC server end.
9. VNC client as claimed in claim 7, it is characterised in that
The type of message of the VNC protocol message is VmMigrateInfo, carries ipv4 and ipv6 in the VNC protocol message
Shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host, described
Vnc port information field is used for carrying the port information of the 2nd VNC server end.
10. a kind of Virtual network computer VNC server end, as virtual machine on the physical host of source corresponding VNC clothes
Business device end, it is characterised in that the VNC server end is specifically included:
Acquisition module, for when the virtual machine needs to move to purpose physical host from the source physical host, obtaining institute
State the virtual machine port information of corresponding 2nd VNC server end and purpose physics master in the purpose physical host
The IP address of machine;
Sending module, for before the virtual machine (vm) migration to the purpose physical host, to the corresponding VNC of the virtual machine
Client send VNC protocol message, carry in the VNC protocol message the 2nd VNC server end port information and
The IP address of the purpose physical host;
By the VNC client when perceiving itself and disconnecting with the connection between a VNC server end, determine described
Virtual machine has migrated to the purpose physical host, and the port information using the 2nd VNC server end and described
The IP address of purpose physical host, the connection that sets up between the VNC client and the 2nd VNC server end, to log in
The desktop of the virtual machine.
11. VNC server ends as claimed in claim 10, it is characterised in that
The acquisition module, specifically for receiving the 2nd VNC service of the libvirt middleware on the physical host of source
The port information at device end and the IP address of the purpose physical host;Wherein, the libvirt middleware is used for virtual machine
Purpose physical host is moved to from source physical host, and for by the port information of the 2nd VNC server end and the purpose thing
When the IP address of reason main frame and the virtual machine move to the information of the purpose physical host, notify to described first
VNC server end.
12. VNC server ends as claimed in claim 10, it is characterised in that
The type of message of the VNC protocol message is VmMigrateInfo, carries ipv4 and ipv6 in the VNC protocol message
Shared address texture field, vnc port information field;
Wherein, ipv4 the and ipv6 shared address texture field is used for carrying the IP address of the purpose physical host, described
Vnc port information field is used for carrying the port information of the 2nd VNC server end.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310450732.6A CN103501295B (en) | 2013-09-27 | 2013-09-27 | A kind of remote access method based on virtual machine (vm) migration and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310450732.6A CN103501295B (en) | 2013-09-27 | 2013-09-27 | A kind of remote access method based on virtual machine (vm) migration and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103501295A CN103501295A (en) | 2014-01-08 |
CN103501295B true CN103501295B (en) | 2017-03-08 |
Family
ID=49866467
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310450732.6A Active CN103501295B (en) | 2013-09-27 | 2013-09-27 | A kind of remote access method based on virtual machine (vm) migration and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103501295B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105389198A (en) * | 2015-10-16 | 2016-03-09 | 浪潮(北京)电子信息产业有限公司 | Automatic reconnection method and device of virtual machine console |
CN105700944A (en) * | 2015-12-31 | 2016-06-22 | 赛尔网络有限公司 | Online migration method and device for virtual machine not in shared storage condition |
CN106254419A (en) * | 2016-07-15 | 2016-12-21 | 北京首都在线科技股份有限公司 | System and method virtual machine operated by control station server |
CN109062665A (en) * | 2018-07-26 | 2018-12-21 | 郑州云海信息技术有限公司 | A kind of virtual machine desktop environment configurations method, apparatus and system |
CN109194742B (en) * | 2018-09-04 | 2021-07-02 | 郑州云海信息技术有限公司 | Virtual machine console connection method and device and storage medium |
CN111327509B (en) * | 2020-01-21 | 2022-07-12 | 新华三信息安全技术有限公司 | Information updating method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102143138A (en) * | 2010-09-15 | 2011-08-03 | 华为技术有限公司 | Method and device for configuring virtual local area network (VLAN) in live migration process of virtual machine |
CN102316001A (en) * | 2011-10-13 | 2012-01-11 | 杭州华三通信技术有限公司 | Virtual network connection configuration realizing method and network equipment |
CN103207801A (en) * | 2012-01-11 | 2013-07-17 | 华为技术有限公司 | Method, device and system for migrating virtual machine and fiber channel switch |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9817695B2 (en) * | 2009-04-01 | 2017-11-14 | Vmware, Inc. | Method and system for migrating processes between virtual machines |
-
2013
- 2013-09-27 CN CN201310450732.6A patent/CN103501295B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102143138A (en) * | 2010-09-15 | 2011-08-03 | 华为技术有限公司 | Method and device for configuring virtual local area network (VLAN) in live migration process of virtual machine |
CN102316001A (en) * | 2011-10-13 | 2012-01-11 | 杭州华三通信技术有限公司 | Virtual network connection configuration realizing method and network equipment |
CN103207801A (en) * | 2012-01-11 | 2013-07-17 | 华为技术有限公司 | Method, device and system for migrating virtual machine and fiber channel switch |
Also Published As
Publication number | Publication date |
---|---|
CN103501295A (en) | 2014-01-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103501295B (en) | A kind of remote access method based on virtual machine (vm) migration and equipment | |
US10698717B2 (en) | Accelerator virtualization method and apparatus, and centralized resource manager | |
US9916175B2 (en) | Multi-session zero client device and network for transporting separated flows to device sessions via virtual nodes | |
US20140188977A1 (en) | Appratus, method for deploying applications in a virtual desktop interface system | |
US11425054B1 (en) | User-configured multi-location service deployment and scaling | |
US12056513B2 (en) | Virtual machine migration using multiple, synchronized streams of state data transferring via file descriptors | |
CN103888485A (en) | Method for distributing cloud computing resource, device thereof and system thereof | |
CN106354559A (en) | Method and device for processing cloud desktop resources | |
US9268588B2 (en) | Optimizing virtual machine migration via identification and treatment of virtual memory swap file | |
CN106790046B (en) | Network attack and defense virtual simulation system based on super-fusion architecture | |
CN103986786A (en) | Remote cloud desktop operation system | |
CN102316043B (en) | Port virtualization method, switch and communication system | |
CN106020929A (en) | System and method for supporting 3D application in virtual environment | |
CN102819449A (en) | Method and system for graphic card redirection | |
CN103685441B (en) | A kind of remote desktop control system based on Loongson terminal | |
CN105391652A (en) | USB equipment network sharing system and method based on USB redirection | |
CN104283959A (en) | Performance-grading-based storage mechanism suitable for cloud platform | |
CN105677342A (en) | Framework and method for achieving composite desktop virtualization of heterogeneous operating system | |
CN111209115A (en) | Cloud desktop vGPU (virtual graphics processing Unit) over-allocation method | |
CN112000437A (en) | Disaster recovery method and device, electronic equipment and storage medium | |
CN104717175B (en) | The processing method and system of virtual desktop | |
CN105681424A (en) | Desktop cloud system | |
CN109462536B (en) | Enterprise cloud platform implementation method with office control based on virtualization | |
CN116319341A (en) | Cloud sharing industrial control network safety shooting range system | |
Wan et al. | Design ideas of mobile internet desktop system based on virtualization technology in cloud computing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |