CN110688194B - Disk management method based on cloud desktop, virtual machine and storage medium - Google Patents

Disk management method based on cloud desktop, virtual machine and storage medium Download PDF

Info

Publication number
CN110688194B
CN110688194B CN201810736007.8A CN201810736007A CN110688194B CN 110688194 B CN110688194 B CN 110688194B CN 201810736007 A CN201810736007 A CN 201810736007A CN 110688194 B CN110688194 B CN 110688194B
Authority
CN
China
Prior art keywords
virtual machine
shared
disk
space
shared directory
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
CN201810736007.8A
Other languages
Chinese (zh)
Other versions
CN110688194A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201810736007.8A priority Critical patent/CN110688194B/en
Priority to PCT/CN2019/093224 priority patent/WO2020007226A1/en
Publication of CN110688194A publication Critical patent/CN110688194A/en
Application granted granted Critical
Publication of CN110688194B publication Critical patent/CN110688194B/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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a disk management method based on a cloud desktop, which is applied to a first virtual machine and comprises the following steps: creating a shared space and a shared directory, wherein a first virtual machine has the authority to manage and access the shared directory; when detecting that at least one second virtual machine logs in the shared space, setting the access authority of the second virtual machine to the shared directory; and mapping the disk corresponding to the shared directory according to the access authority. In addition, the invention also provides a virtual machine and a storage medium. By adopting the method and the device, data interaction between the first virtual machine and the second virtual machine can be effectively realized, not only can shared files be effectively managed, but also the experience effect of a user is improved, the risk of full disk space of the virtual machine is avoided, and the I/O consumption is greatly reduced.

Description

Disk management method based on cloud desktop, virtual machine and storage medium
Technical Field
The invention relates to the technical field of computer networks, in particular to a disk management method based on a cloud desktop, a virtual machine and a storage medium.
Background
In recent years, cloud desktops have been widely used in teaching systems and the like. By converting the virtual machine into a template, the rapid configuration of a similar System on a server or a resource pool can be completed, and in addition, by adopting local or Network File System (NFS) File storage, a brand-new virtual machine can be cloned in batches within a few seconds. Although virtual machines have many advantages, there are certain drawbacks, in that, on one hand, the disk space of a virtual machine usually uses a super-partition mechanism, i.e., the actual occupied space is likely to exceed the allocated disk size. Taking a cloud desktop teaching system as an example, when a teacher copies and distributes a large amount of learning materials such as classroom work and the like, the magnetic disk space of the teacher or a student virtual machine is easily filled; on the other hand, there is a risk of using Input/Output (I/O) ports, because when performing high concurrent operations, the I/O performance will have a great influence on the response speed of the server, so when a teacher distributes a large-volume file to tens of students in a classroom at the same time, the I/O of the virtual machine where the teacher locates is very easy to be flushed, which causes the virtual machine to be stuck, and affects normal teaching.
Disclosure of Invention
The invention mainly aims to provide a disk management method, a virtual machine and a storage medium based on a cloud desktop, and aims to solve the problems that the disk space of the virtual machine in a cloud desktop system exceeds the distributed size, and the input and output ports are high, so that the virtual machine is blocked.
In order to achieve the above object, the present invention provides a disk management method based on a cloud desktop, which is applied to a first virtual machine, and the method includes the steps of:
creating a shared space and a shared directory, wherein the first virtual machine has the authority of managing and accessing the shared directory;
when detecting that at least one second virtual machine logs in the shared space, setting the access authority of the second virtual machine to the shared directory;
and mapping the disk corresponding to the shared directory according to the access authority.
In addition, in order to achieve the above object, the present invention further provides a disk management method based on a cloud desktop, which is applied to a second virtual machine, and the method includes the steps of:
logging in a shared space created by a first virtual machine;
receiving a first login account multicast by the first virtual machine in the shared space;
and establishing a folder corresponding to the second virtual machine in the shared directory, and mapping a disk corresponding to the folder, wherein the first virtual machine has an access right to the folder.
In addition, in order to achieve the above object, the present invention further provides a virtual machine, where the virtual machine includes a processor and a memory;
the processor is used for executing the disk management program based on the cloud desktop stored in the memory so as to realize the method.
In addition, to achieve the above object, the present invention also provides a storage medium storing one or more programs, which are executable by one or more processors to implement the above method.
According to the disk management method based on the cloud desktop, the virtual machine and the storage medium, the shared space and the shared directory are created, when at least one second virtual machine is detected to log in the shared space, the access authority of the second virtual machine to the shared directory is set, and the disk corresponding to the shared directory is mapped according to the access authority. By adopting the method and the device, data interaction between the first virtual machine and the second virtual machine can be effectively realized, not only can shared files be effectively managed, but also the experience effect of a user is improved, the risk of full disk space of the virtual machine is avoided, and the I/O consumption is greatly reduced.
Drawings
Fig. 1 is a schematic structural diagram of a disk mapping system according to a first embodiment of the present invention;
FIG. 2 is a diagram of a display interface of an example of a disk map in various embodiments of the invention;
fig. 3 is a schematic flowchart of a disk management method based on a cloud desktop according to a second embodiment of the present invention;
fig. 4 is another schematic flow chart of a cloud desktop-based disk management method according to a second embodiment of the present invention;
fig. 5 is a sub-flow diagram of a disk management method based on a cloud desktop according to a second embodiment of the present invention;
fig. 6 is another schematic flow chart of a cloud desktop-based disk management method according to a second embodiment of the present invention;
fig. 7 is another schematic flow chart of a cloud desktop-based disk management method according to a second embodiment of the present invention;
fig. 8 is a schematic flowchart of a disk management method based on a cloud desktop according to a third embodiment of the present invention;
fig. 9 is another schematic flowchart of a cloud desktop-based disk management method according to a third embodiment of the present invention;
fig. 10 is a schematic diagram of a terminal hardware architecture according to a fourth embodiment of the present invention;
FIG. 11 is a block diagram of the cloud desktop based disk manager of FIG. 10;
fig. 12 is a schematic diagram of a hardware architecture of a terminal according to a fifth embodiment of the present invention;
fig. 13 is a module diagram of the disk manager based on the cloud desktop in fig. 12.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
First embodiment
A first embodiment of the present invention provides a disk mapping system. As shown in FIG. 1, the disk mapping system includes: a first terminal 10, a first virtual machine 20, a second terminal 30, and a second virtual machine 40. A first User logs in to the first virtual machine 20 through a first login account at the first terminal 10, a second User logs in to the second virtual machine 40 through a second login account at the second terminal 30, and data interaction is performed between the first virtual machine 20 and the second virtual machine 40 through User Datagram Protocol (UDP) multicast.
The disk mapping system of this embodiment establishes a space server in which the Samba service is deployed based on the Samba shared service, a Representational State Transfer (REST) interface, a Secure Shell (SSH) protocol, and a Multicast communication technology.
Samba is software for implementing information service Block (SMB) protocol in Linux and UNIX systems, and is composed of a Server and a client program. The SMB communication protocol enables sharing of resources such as files and printers among different computers in a local area network. The SMB protocol is a client/server type protocol with which clients can access shared file systems, printers, and other resources on the server. In addition, through setting NetBIOS over TCP/IP, samba can share resources with local area network hosts and computers all over the world.
The REST Interface belongs to HyperText Transfer Protocol (HTTP), and is used to provide a specification for an application to perform data interaction with an Application Programming Interface (API) provider at an HTTP layer. The REST describes a data interaction rule between a client and a server in the HTTP layer, and the client sends an HTTP(s) request to the server and receives a response of the server to complete HTTP interaction. In the interactive process, the REST architecture stipulates two important aspects, namely the linking of the HTTP request and the method adopted by the request.
The SSH protocol is a protocol that enables secure telnet and other secure web services over insecure networks, and has two incompatible versions 1.x and 2.x. The SSH protocol encrypts and compresses transmitted data to make up for vulnerabilities in the network and increase transmission speed. The SSH protocol belongs to a client/server type protocol and works on the principle: the SSH local client sends a connection request to the remote server, the server checks the applied packet and IP address and sends the key to the client, and the local client sends the key back to the server, so as to establish connection. The SSH client is suitable for various platforms such as Linux, UNIX, windows NT and the like. The SSH protocol is mainly composed of a transport layer protocol (SSH _ TRANS), a user authentication protocol (SSH _ usernauth), and a connection protocol (SSH _ CONNECT). By using the SSH protocol, login of a remote console, execution of a remote command, and the like can be realized.
Multicast technology is one of three ways of data transmission in IP networks, and multicast transmission is to implement point-to-multipoint network connection between a sender and a receiver. The multicast communication technology improves the efficiency of data transmission and reduces the possibility of congestion of a backbone network.
The first virtual machine 20 selects a channel number to create a shared space (e.g., classroom, conference room, etc.), summons one or more second virtual machines 40 to join the shared space, creates a shared directory and sets access rights of the second virtual machines 40, and multicasts the first login account number and the IP address of the space server to the one or more second virtual machines 40 to map the shared directory to a local disk.
Specifically, the first virtual machine 20 acquires an Internet Protocol (IP) address and a root password interconnected between networks of the space server through the REST interface, connects to the space server through the acquired IP address, the obtained root password, a known port number and a known root name, and uses an SSH technique, and creates a shared directory and sets an access right in the space server. In the present embodiment, the first virtual machine 20 has the authority to manage and access the shared directory. The first virtual machine 20 stores data in the shared directory for retrieval by the second virtual machine 40. When each second virtual machine 40 logs in the shared space and updates the data of the corresponding shared directory, the first virtual machine 20 can acquire the data of all the second virtual machines 40 in the shared directory.
Optionally, after the first virtual machine 20 completes the disk mapping, the name of the shared directory may be modified according to actual usage needs, for example: "shared disk", "job disk", and the like.
Alternatively, the folder names in the shared directory may be named in a combination of the login account number and the channel number. The shared directory may be set as a folder including a shared main folder and a shared folder, specifically, the shared main folder may be set as a right for the first virtual machine 20 to access and manage, and set as a right for the second virtual machine 40 to access only, the shared folder may be set as a designated shared subfolder in the second virtual machine 40, the second virtual machine 40 has a right for accessing and managing the shared subfolder, and the first virtual machine 20 has a right for accessing all the shared subfolders.
And the second virtual machine 40 is configured to log in the shared space, receive the first login account and the IP address of the space server sent by the first virtual machine 20, and complete the establishment of the shared subfolder. And the second virtual machine 40 manages the mapped disk according to the set access authority.
Optionally, the first virtual machine 20 and the second virtual machine 40 periodically detect whether to connect the corresponding terminal, if yes, continue to connect the disk mapping, and if no, disconnect the disk mapping.
In an actual application scenario, the application of a cloud desktop in a teaching system is taken as an example. The first virtual machine corresponds to a teacher end, and the second virtual machine corresponds to a student end. The teacher side obtains the IP address and the root password of the job space server through the REST interface, connects to the job space server through the obtained information and the SSH technology, and sets the creation of the shared folder and the access right of the corresponding user, as shown in fig. 2, the sharing directory can be mapped to the local disk form on the virtual machines where the teacher side and the student side are located by the names of the shared disk and the job disk respectively. The teacher can put teaching file in the shared disk, makes things convenient for the student to acquire as required at any time, and correspondingly, the student also can put files such as the homework of making in "homework dish", supplies the teacher to check and accept. According to the set access authority, when the teacher opens the 'job disk', all folders of the student sides joining the classroom are displayed, all operation authority is provided for the 'shared disk', and the 'job disk' is read-only. The student end opens the homework tray, only the folder where the self login account is located is displayed, all operation permissions are provided for the homework tray, and read-only permissions are provided for the shared tray.
Those skilled in the art will understand that the disk mapping system of the present embodiment can also be applied to other scenarios, for example: cloud desktop conferencing systems, and the like.
According to the disk mapping system provided by the embodiment, the operation space is established through the technology, a mode similar to Windows file management is provided, the operation is simple and easy to implement, a teacher and a student can perform good file interaction such as operation, the class files are effectively managed, and the experience effect of a user is improved. More importantly, the mode can effectively avoid the risk of full disk space of a teacher or a student virtual machine, greatly reduces I/O consumption and provides better classroom experience.
Second embodiment
Fig. 3 is a schematic flow chart of a cloud desktop-based disk management method according to a second embodiment of the present invention. In a second embodiment, the cloud desktop-based disk management method is applied to a first virtual machine, and the method includes the steps of:
at step 310, a shared space and a shared directory are created.
Specifically, the first virtual machine creates a shared space with a preset channel number, and creates a shared directory, where folder names in the shared directory may be named in a manner of combining a login account number and a channel number. In this embodiment, the first virtual machine is set to have the authority to manage and access the shared directory.
Optionally, the number of the shared directories established by the first virtual machine in the space server is one, and each second virtual machine establishes a corresponding shared subfolder in the space server. When the shared directory is mapped, the first virtual machine and the second virtual machine are both mapped to the folder of the shared directory, and the second virtual machine can access the shared directory; in mapping the shared subfolders of the second virtual machines, the first virtual machine mapping can access all the shared subfolders corresponding to the second virtual machines, and each second virtual machine can only access and manage the shared subfolders of the second virtual machines.
Step 320, when it is detected that at least one second virtual machine logs in the shared space, setting the access authority of the second virtual machine to the shared directory.
Specifically, when it is detected that the second virtual machine logs in the shared space with a preset login account, the access authority of the different second virtual machine to the shared directory is set. For example, it may be set that the second virtual machine has a right to access only the shared directory, and the second virtual machine has a right to access and manage the shared subfolder.
And step 330, mapping the disk corresponding to the shared directory according to the access authority.
Specifically, after the shared directory is created, the shared directory is mapped on the first virtual machine by using a Windows API function.
Optionally, for the convenience of the user, the name of the shared directory may be modified, for example: "shared disk", "job disk", and the like.
Optionally, as shown in fig. 4, before creating the shared directory in step 310, the cloud desktop-based disk management method of this embodiment further includes:
step 410, connecting a space server;
step 420, uploading a script file to the space server to execute the creating of the shared directory.
Specifically, when the space server is successfully connected, a script file, for example, a Shell script file, is uploaded to the space server, and the script is used to create a shared directory of the corresponding first virtual machine and the corresponding second virtual machine in the preset channel and set a corresponding access right.
Specifically, as shown in fig. 5, step 410 includes:
step 510, acquiring an IP address and a root password of a space server with the Samba service;
and step 520, connecting with the space server through an SSH protocol according to the IP address and the root password.
More specifically, an IP address and a root password of the space server are obtained through the REST interface, and the space server is connected to the space server through the obtained IP address, the obtained root password, known port numbers and known root names by using an SSH technology. And if the information acquisition fails, retransmitting the request for acquisition.
Optionally, as shown in fig. 6, after step 320, the cloud desktop-based disk management method according to this embodiment further includes:
step 610, broadcasting the first login account and the IP address of the space server to all the second virtual machines;
step 620, creating a folder of the second virtual machine in the shared directory.
Specifically, after the script is executed successfully, a login account of a second virtual machine added into the shared space is detected at regular time, if the login account of the second virtual machine is detected, an instruction containing a first login account is sent for executing the script to create a shared directory of the first virtual machine, and when the instruction containing a second login account is sent, a folder of the second virtual machine, and a shared subfolder named in a mode of combining the login account and a channel number of each second virtual machine are created, and access authority of the shared folder is set. If the login account of the second virtual machine is not detected, the instruction for executing the script is not sent.
Optionally, the first virtual machine multicasts the first login account and the IP address of the space server to the second virtual machine, so that the second virtual machine performs mapping, and the first virtual machine performs mapping based on the first login account and the IP address of the space server.
And displaying the corresponding mapping result on the first virtual machine or the second virtual machine when the first virtual machine or the second virtual machine operates the shared directory each time.
Optionally, as shown in fig. 7, after step 330, the cloud desktop-based disk management method of this embodiment further includes:
step 710, detecting whether a first terminal corresponding to the first virtual machine is connected or not at preset time intervals; if yes, go to step 720, otherwise go to step 730;
step 720, continuing to connect the disk mapping;
step 730, the disk map is broken.
Specifically, whether the first terminal corresponding to the first virtual machine is connected or not is detected at regular time. If yes, continuing to connect the disk map, and if not, disconnecting the disk map.
In the disk management method based on the cloud desktop provided by this embodiment, by creating the shared space and the shared directory, when it is detected that at least one second virtual machine logs in the shared space, the access right of the second virtual machine to the shared directory is set, and a disk corresponding to the shared directory is mapped according to the access right. By adopting the method and the device, data interaction between the first virtual machine and the second virtual machine can be effectively realized, not only can shared files be effectively managed, but also the experience effect of a user is improved, the risk of full disk space of the virtual machine is avoided, and the I/O consumption is greatly reduced.
Third embodiment
Fig. 8 is a schematic flow chart of a cloud desktop-based disk management method according to a third embodiment of the present invention. In a third embodiment, the cloud desktop-based disk management method is applied to a second virtual machine, and the method includes the steps of:
step 810, logging in a shared space created by a first virtual machine;
step 820, receiving a first login account multicast by a first virtual machine in the shared space;
step 830, establishing a folder corresponding to the second virtual machine in the shared directory, and mapping a disk corresponding to the folder, where the first virtual machine has an access right to the folder.
Specifically, when joining the shared space, the IP address of the space server and the first login account are received through a multicast technology. In this embodiment, the first login account is a login account of a first terminal, and the second login account is a login account of a second terminal.
And after the multicast information is received, acquiring a shared directory according to the IP address, the first login account, the second login account and the channel number of the shared space so as to complete disk mapping of the second virtual machine.
Optionally, the shared directory may be set as a folder including a shared main folder and a shared folder, and the permission to access the shared main folder and manage the shared folder may be set according to the setting of the first virtual machine. In other embodiments, the shared directory may also be set to operate with other permissions, and the present invention is not limited in this respect.
Optionally, as shown in fig. 9, after step 850, the cloud desktop-based disk management method according to this embodiment further includes:
step 910, detecting whether a second terminal corresponding to the second virtual machine is connected or not at preset time intervals; if yes, go to step 920, otherwise go to step 930;
step 920, continuing to connect the disk mapping;
at step 930, the disk map is disconnected.
Specifically, whether the second terminal corresponding to the second virtual machine is connected or not is detected at regular time, if yes, the disk mapping is continuously connected, and if not, the disk mapping is disconnected.
Optionally, the corresponding mapping result is displayed in the first virtual machine or the second virtual machine.
According to the disk management method based on the cloud desktop, a first login account multicast by a first virtual machine is received in a shared space through logging in the shared space, and a folder corresponding to a second login account is established in a shared directory. By adopting the method and the device, data interaction between the first virtual machine and the second virtual machine can be effectively realized, not only can shared files be effectively managed, but also the experience effect of a user is improved, the risk of full disk space of the virtual machine is avoided, and the I/O consumption is greatly reduced.
Fourth embodiment
Fig. 10 is a schematic diagram of a hardware architecture of a virtual machine according to a fourth embodiment of the present invention. In fig. 10, the virtual machine includes: a memory 1010, a processor 1020, and a cloud desktop-based disk manager 1030 stored on the memory 1010 and operable on the processor 1020. In this embodiment, the cloud desktop-based disk manager 1030 includes a series of computer program instructions stored in the memory 1010, and when the computer program instructions are executed by the processor 1020, the disk mapping operation according to the embodiments of the present invention can be implemented. In some embodiments, the cloud desktop-based disk manager 1030 may be partitioned into one or more modules based on the particular operations implemented by the portions of the computer program instructions. As shown in fig. 11, the cloud desktop-based disk management program 1030 includes: the device comprises a connection module 1110, an uploading module 1120, a creation module 1130, a setting module 1140, a disk mapping module 1150, a multicast module 1160, a display module 1170, a judgment module 1080 and a mapping disconnection module 1090. Wherein,
a connection module 1110 for connecting a space server;
an upload module 1120, configured to upload a script file to the space server to execute the creating of the shared directory.
Specifically, when the connection module 1110 successfully connects to the space server, the upload module 1120 uploads a script file, such as a Shell script file, to the space server, where the script is used to create a shared directory of the corresponding first virtual machine and the second virtual machine under a preset channel and set a corresponding access right.
The connection module 1110 is specifically configured to:
acquiring an IP address and a root password of a space server with a Samba service;
and connecting with the space server through an SSH protocol according to the IP address and the root password.
More specifically, the connection module 1110 acquires an IP address and a root password of the space server through the REST interface, and connects to the space server through the acquired IP address, the root password, and known port numbers and root names by using SSH technology. And if the information acquisition fails, retransmitting the request for acquisition.
A creation module 1130 for creating a shared space and a shared directory.
Specifically, the first virtual machine creates a shared space according to a preset channel number, and the creating module 1130 creates a shared directory, where folder names in the shared directory may be named in a manner of combining a login account number and a channel number. In this embodiment, the first virtual machine is set to have the authority to manage and access the shared directory.
Optionally, the number of the shared directories established by the first virtual machine in the space server is one, and each second virtual machine establishes a corresponding shared subfolder in the space server. When the shared directory is mapped, the first virtual machine and the second virtual machine are both mapped to the folder of the shared directory, and the second virtual machine can access the shared directory; in mapping the shared subfolders of the second virtual machines, the first virtual machine mapping can access all the shared subfolders corresponding to the second virtual machines, and each second virtual machine can only access and manage the shared subfolders of the second virtual machine.
A setting module 1140, configured to set an access right of the second virtual machine to the shared directory when it is detected that at least one second virtual machine logs in the shared space.
Specifically, when it is detected that the second virtual machine logs in the shared space with the preset login account, the setting module 1140 sets the access right of the different second virtual machine to the shared directory. For example, it may be set that the second virtual machine has a right to access only the shared directory, and the second virtual machine has a right to access and manage the shared subfolder.
And a disk mapping module 1150, configured to map a disk corresponding to the shared directory according to the access right.
Specifically, after the shared directory is created, the disk mapping module 1150 uses a windows api function to map the shared directory on the first virtual machine.
Optionally, for the convenience of the user, the name of the shared directory may be modified, for example: "shared disk", "job disk", and the like.
The multicast module 1160 is configured to multicast the first login account to all the second virtual machine groups;
a creating module 1130, further configured to create a folder of the second virtual machine in the shared directory;
and the display module 1170 is configured to display the operation result of each second virtual machine on the folder.
Specifically, after the script is successfully executed, the login account of the second virtual machine that joins the shared space is detected at regular time, if the login account of the second virtual machine is detected, the multicast module 1160 sends an instruction including the first login account for executing the script, the creation module 1130 creates the shared directory of the first virtual machine, and when the instruction including the second login account is sent, the folder of the second virtual machine and the shared subfolder named in a manner of combining the login account and the channel number of each second virtual machine are created, and the access authority of the shared folder is set. If the login account of the second virtual machine is not detected, the instruction for executing the script is not sent.
Optionally, the first virtual machine multicasts the first login account and the IP address of the space server to the second virtual machine, so that the second virtual machine performs mapping, and the first virtual machine performs mapping based on the first login account and the IP address of the space server.
When the first virtual machine or the second virtual machine operates the shared directory each time, the display module 1170 displays a corresponding mapping result on the first virtual machine or the second virtual machine.
A determining module 1080, configured to detect, every preset time, whether a first terminal corresponding to the first virtual machine is connected; if yes, the disk mapping module 1150 continues to connect to the disk mapping; if not, the mapping disconnection module 1090 disconnects the disk mapping.
Specifically, the determining module 1080 detects whether to connect to the first terminal corresponding to the first virtual machine at regular time. If so, the disk mapping module 1150 continues to connect the disk map, and if not, the map disconnect module 1090 disconnects the disk map.
In the terminal provided in this embodiment, the creating module 1130 creates a shared space and a shared directory, when it is detected that at least one second virtual machine login account logs in the shared space, the setting module 1140 sets an access right of the second virtual machine to the shared directory, and according to the access right, the disk mapping module 1150 maps a disk corresponding to the shared directory. By adopting the method and the device, data interaction between the first virtual machine and the second virtual machine can be effectively realized, not only can shared files be effectively managed, but also the experience effect of a user is improved, the risk of full disk space of the virtual machine is avoided, and the I/O consumption is greatly reduced.
Fifth embodiment
Fig. 12 is a schematic diagram of a hardware architecture of a virtual machine according to a fifth embodiment of the present invention. In fig. 12, the virtual machine includes: a memory 1210, a processor 1220, and a cloud desktop based disk manager 1230 stored on the memory 1210 and operable on the processor 1220. In this embodiment, the cloud desktop-based disk management program 1230 includes a series of computer program instructions stored in the memory 1210, and when the computer program instructions are executed by the processor 1220, the disk mapping operation according to the embodiments of the present invention can be implemented. In some embodiments, the cloud desktop-based disk manager 1230 may be divided into one or more modules based on the particular operations that the computer program instructions implement. As shown in fig. 13, the cloud desktop-based disk manager 1230 includes: a login module 1310, a receiving module 1320, a disk mapping module 1330, a determination module 1340, and a mapping disconnection module 1350. Wherein,
a login module 1310 configured to log in a shared space created by the first virtual machine;
a receiving module 1320, configured to receive, in the shared space, a first login account multicast by a first virtual machine;
a disk mapping module 1330, configured to establish a folder corresponding to the second virtual machine in the shared directory, and map a disk corresponding to the folder, where the first virtual machine has an access right to the folder.
Specifically, when the login module 1310 joins the shared space, the receiving module 1320 receives the IP address of the space server and the first login account through the multicast technology. In this embodiment, the first login account is a login account of a first terminal, and the second login account is a login account of a second terminal.
After receiving the multicast information, the shared directory is obtained according to the IP address, the first login account, the second login account, and the channel number of the shared space, and the disk mapping module 1330 completes disk mapping of the second virtual machine.
Optionally, the shared directory may be set as a folder including a shared main folder and a shared folder, and the permission to access the shared main folder and manage the shared folder may be set according to the setting of the first virtual machine. In other embodiments, the shared directory may also be set to operate under other rights, and the present invention is not limited in detail herein.
The determining module 1340 is configured to detect whether a second terminal corresponding to the second virtual machine is connected every preset time; if yes, continuing to connect the disk mapping, and if not, disconnecting the disk mapping.
Specifically, whether the connection with the second terminal corresponding to the second virtual machine is performed is detected at regular time, if yes, the disk mapping module 1330 continues to connect the disk mapping, and if not, the mapping disconnection module 1350 disconnects the disk mapping.
Optionally, the corresponding mapping result is displayed in the first virtual machine or the second virtual machine.
In the terminal of this embodiment, the login module 1310 logs in the shared space, the receiving module 1320 receives the first login account multicast by the first virtual machine in the shared space, and the disk mapping module 1330 maps the folder corresponding to the second login account in the shared directory. By adopting the method and the device, data interaction between the first virtual machine and the second virtual machine can be effectively realized, not only can shared files be effectively managed, but also the experience effect of a user is improved, the risk of full disk space of the virtual machine is avoided, and the I/O consumption is greatly reduced.
Sixth embodiment
The embodiment of the invention also provides a storage medium. The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above. When one or more programs in the storage medium are executable by one or more processors, to implement the cloud desktop-based disk management method provided in the second embodiment or the third embodiment.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (7)

1. A disk management method based on a cloud desktop is applied to a first virtual machine in a first terminal, and is characterized by comprising the following steps:
creating a shared space and a shared directory, wherein the first virtual machine has the authority of managing and accessing the shared directory;
when at least one second virtual machine is detected to log in the shared space, setting the access authority of the second virtual machine to the shared directory;
mapping a disk corresponding to the shared directory according to the access authority;
prior to creating the shared directory, the method further comprises:
connecting a space server;
uploading a script file to the space server to execute the creation of the shared directory, wherein the script file is used for setting the access authority of the first virtual machine or/and the second virtual machine;
after setting the access right of the second virtual machine to the shared directory, the method further comprises:
multicasting a first login account and the IP address of the space server to all second virtual machines, so that the second virtual machines create folders of the second virtual machines in the shared directory according to the first login account and the IP address, wherein the first login account is used for logging in the first virtual machine at the first terminal.
2. The cloud desktop based disk management method of claim 1, wherein the connection space server comprises:
acquiring a protocol IP address and a system authority root password which are interconnected between networks of a space server with a Samba service;
and according to the IP address and the root password, connecting with the space server through a secure shell protocol (SSH).
3. The cloud desktop based disk management method of claim 1, wherein after mapping disks corresponding to the shared directory, the method further comprises:
detecting whether a first terminal corresponding to the first virtual machine is connected or not at preset time intervals;
if yes, continuing to connect the disk mapping;
and if not, disconnecting the disk mapping.
4. A disk management method based on a cloud desktop is applied to a second virtual machine in a second terminal, and is characterized by comprising the following steps:
logging in a shared space created by a first virtual machine in a first terminal, wherein the first virtual machine also creates a shared directory;
receiving a first login account multicast by the first virtual machine and an IP address of a space server in the shared space, wherein the first login account is used for logging in the first virtual machine at the first terminal;
according to the first login account and the IP address, a folder corresponding to the second virtual machine is established in the shared directory, and a disk corresponding to the folder is mapped, wherein the first virtual machine has access authority to the folder, and the access authority is set in the following way:
the first virtual machine is connected with the space server;
and the first virtual machine uploads a script file to the space server to create the shared space, wherein the script file is used for setting the access authority of the first virtual machine or/and the second virtual machine.
5. The cloud desktop-based disk management method of claim 4, further comprising:
detecting whether a second terminal corresponding to the second virtual machine is connected or not at preset time intervals;
if yes, continuing to connect the disk mapping;
and if not, disconnecting the disk mapping.
6. A virtual machine, comprising a processor and a memory;
the processor is configured to execute a cloud desktop-based disk management program stored in the memory to implement the method of any one of claims 1-3 or claims 4-5.
7. A storage medium, characterized in that the storage medium stores one or more programs executable by one or more processors to implement the method of any one of claims 1-3 or claims 4-5.
CN201810736007.8A 2018-07-06 2018-07-06 Disk management method based on cloud desktop, virtual machine and storage medium Active CN110688194B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810736007.8A CN110688194B (en) 2018-07-06 2018-07-06 Disk management method based on cloud desktop, virtual machine and storage medium
PCT/CN2019/093224 WO2020007226A1 (en) 2018-07-06 2019-06-27 Cloud desktop-based disc management method, virtual machines and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810736007.8A CN110688194B (en) 2018-07-06 2018-07-06 Disk management method based on cloud desktop, virtual machine and storage medium

Publications (2)

Publication Number Publication Date
CN110688194A CN110688194A (en) 2020-01-14
CN110688194B true CN110688194B (en) 2023-03-17

Family

ID=69060071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810736007.8A Active CN110688194B (en) 2018-07-06 2018-07-06 Disk management method based on cloud desktop, virtual machine and storage medium

Country Status (2)

Country Link
CN (1) CN110688194B (en)
WO (1) WO2020007226A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111831376A (en) * 2020-06-23 2020-10-27 上海上实龙创智能科技股份有限公司 Cloud desktop-based data non-landing realization method, equipment and storage medium
CN112596861B (en) * 2020-12-28 2024-01-30 江苏欧帝电子科技有限公司 Data sharing method, system and storage medium based on intelligent blackboard
CN114629897B (en) * 2022-03-08 2024-07-23 阿里巴巴(中国)有限公司 Data processing method and system
CN115296883A (en) * 2022-08-01 2022-11-04 杭州虎符网络有限公司 Method and device for data security access and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162443A (en) * 2006-10-10 2008-04-16 株式会社瑞萨科技 Data processor
CN103491193A (en) * 2013-09-30 2014-01-01 华为技术有限公司 Method and device for sharing file
US8656386B1 (en) * 2007-03-13 2014-02-18 Parallels IP Holdings GmbH Method to share identical files in a common area for virtual machines having the same operating system version and using a copy on write to place a copy of the shared identical file in a private area of the corresponding virtual machine when a virtual machine attempts to modify the shared identical file
CN104052776A (en) * 2013-03-14 2014-09-17 华为技术有限公司 VM boot method, VMM, shared storage system, VDI system and physical host
CN106446159A (en) * 2016-09-23 2017-02-22 华为技术有限公司 Method for storing files, first virtual machine and name node
CN106559392A (en) * 2015-09-28 2017-04-05 北京神州泰岳软件股份有限公司 A kind of file sharing method, device and system
CN107959701A (en) * 2016-10-17 2018-04-24 中兴通讯股份有限公司 Data sharing method, cloud terminal, cloud desktop virtual machine and pass-through proxy server
US20200007612A1 (en) * 2016-11-30 2020-01-02 Zte Corporation Resource sharing method, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239122B (en) * 2014-09-04 2018-05-11 华为技术有限公司 A kind of virtual machine migration method and device
CN104331375B (en) * 2014-10-29 2018-08-07 中国建设银行股份有限公司 Shared virtual resource management method under shared virtualization resource pool environment and device
CN106790477B (en) * 2016-12-12 2020-05-15 广州杰赛科技股份有限公司 System and method for realizing cloud classroom cluster
CN106940874A (en) * 2017-04-21 2017-07-11 江苏学正教育科技有限公司 A kind of hybrid cloud educational system precisely imparted knowledge to students of multitask

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162443A (en) * 2006-10-10 2008-04-16 株式会社瑞萨科技 Data processor
US8656386B1 (en) * 2007-03-13 2014-02-18 Parallels IP Holdings GmbH Method to share identical files in a common area for virtual machines having the same operating system version and using a copy on write to place a copy of the shared identical file in a private area of the corresponding virtual machine when a virtual machine attempts to modify the shared identical file
CN104052776A (en) * 2013-03-14 2014-09-17 华为技术有限公司 VM boot method, VMM, shared storage system, VDI system and physical host
CN103491193A (en) * 2013-09-30 2014-01-01 华为技术有限公司 Method and device for sharing file
CN106559392A (en) * 2015-09-28 2017-04-05 北京神州泰岳软件股份有限公司 A kind of file sharing method, device and system
CN106446159A (en) * 2016-09-23 2017-02-22 华为技术有限公司 Method for storing files, first virtual machine and name node
CN107959701A (en) * 2016-10-17 2018-04-24 中兴通讯股份有限公司 Data sharing method, cloud terminal, cloud desktop virtual machine and pass-through proxy server
US20200007612A1 (en) * 2016-11-30 2020-01-02 Zte Corporation Resource sharing method, device and system

Also Published As

Publication number Publication date
WO2020007226A1 (en) 2020-01-09
CN110688194A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN110688194B (en) Disk management method based on cloud desktop, virtual machine and storage medium
US11463442B2 (en) Method and apparatus for information exchange over a web based environment
US20170123608A1 (en) Method and Apparatus For Information exchange Over a Web Based Environment
RU2580097C2 (en) Method and system for reliable protocol tunnelling over http
US7792924B2 (en) Using a mobile phone to remotely control a computer via an overlay network
US8131828B2 (en) Selectively joining clients to meeting servers
US20130262686A1 (en) Method for organizing a collaborative event and system employing same
US20140188802A1 (en) Pull and paste
WO2017024842A1 (en) Internet access authentication method, client, computer storage medium
US9253129B2 (en) Instant messaging with browser collaboration
EP2262185A1 (en) Method and system for forwarding data among private networks
CN103780700A (en) Application system and method for achieving compatibility and sharing among multi-source heterogeneous systems
CN103475682A (en) File transfer method and file transfer equipment
CN103067257A (en) Method and server and system for achieving data mutual communication in social networking service
US9350701B2 (en) Method and apparatus for extending remote network visibility of the push functionality
CN106648670B (en) Same-screen common control system and method for cloud classrooms
EP3720090B1 (en) Remote desktop system and method for sharing image data
CN105681055A (en) Access method, device and system of shared file server
US20140201262A1 (en) User device, communication server and control method thereof
CN102932470B (en) Handheld device controls the method and system of computer terminal
CN102571817B (en) Method and device for accessing application server
CN113383515A (en) Device enhancements for real-time communication
KR20030088253A (en) Remote computer connection and management system by using a personal terminal based on peer to peer protocol and the method thereof
US10218650B2 (en) Information processing system
CN113206821A (en) Cloud desktop single sign-on method, network equipment and storage medium

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