Movatterモバイル変換


[0]ホーム

URL:


CN109189741A - The system and method for shared file between a kind of virtual machine - Google Patents

The system and method for shared file between a kind of virtual machine
Download PDF

Info

Publication number
CN109189741A
CN109189741ACN201811056793.3ACN201811056793ACN109189741ACN 109189741 ACN109189741 ACN 109189741ACN 201811056793 ACN201811056793 ACN 201811056793ACN 109189741 ACN109189741 ACN 109189741A
Authority
CN
China
Prior art keywords
server
client
shared file
shared
files
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811056793.3A
Other languages
Chinese (zh)
Inventor
谢永志
赵程程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co LtdfiledCriticalZhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811056793.3ApriorityCriticalpatent/CN109189741A/en
Publication of CN109189741ApublicationCriticalpatent/CN109189741A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提出一种虚拟机间共享文件的系统及方法,其中系统包括:服务端以及能够进行服务端文件访问的客户端;所述服务端包括:展示模块:用于向客户端展示共享文件;处理模块:用于获取客户端选定的共享文件对应的存储区域,并通过资源管理器将所述存储区域分配至客户端;所述客户端包括:选定模块:用于选定服务端提供的共享文件;访问模块:用于访问服务端分配的存储区域中的共享文件。本发明解决了现有技术中虚拟机间文件共享存在的占用虚拟机计算资源,影响虚拟机正常使用的问题,具有良好的技术价值及广阔的应用前景。

The present invention provides a system and method for sharing files between virtual machines, wherein the system includes: a server and a client capable of accessing files on the server; the server includes: a display module for displaying the shared file to the client; Processing module: used to obtain the storage area corresponding to the shared file selected by the client, and allocate the storage area to the client through the resource manager; the client includes: a selection module: used for the selected server to provide The shared file; access module: used to access the shared file in the storage area allocated by the server. The invention solves the problem of occupying the computing resources of the virtual machine and affecting the normal use of the virtual machine, which exists in the file sharing between virtual machines in the prior art, and has good technical value and broad application prospect.

Description

The system and method for shared file between a kind of virtual machine
Technical field
The present invention relates to virtual machine technique fields, and in particular to the system and method for shared file between a kind of virtual machine.
Background technique
Virtual machine is the core of virtualization system, is the performance most concentrated to server resource virtualization applications.By physicsThe resources such as server are abstracted into more virtual machines in system, are upper to realize the virtual fusion and efficiently management of physical resourceLayer service provides powerful core calculations ability, and simultaneous retractable is that upper-layer service provides continual reliable guarantee.
In the prior art, between virtual machine usually by way of disk access shared file, the mode of this kind of shared fileThe biggish computing resource of virtual machine is generally taken up, the normal use of virtual machine is influenced.In view of the above-mentioned problems, the present invention proposes one kindThe system and method for shared file between virtual machine.
Summary of the invention
It is an object of the present invention to a kind of system and method for shared file between virtual machine be proposed, to solve above-mentioned technologyProblem.
In a first aspect, the system that the present invention proposes shared file between a kind of virtual machine, comprising: server-side and be able to carry outThe client of server-side file access;
The server-side includes:
Display module: for showing shared file to client;
Processing module: for obtaining the selected corresponding storage region of shared file of client, and pass through resource managerThe storage region is distributed to client;
The client includes:
Chosen module: for selecting the shared file of server-side offer;
Access modules: the shared file in storage region for accessing server-side distribution.
Further, the server-side further include:
Judgment module: for determining the shared attribute of the selected shared file of client;
When the shared attribute of the shared file, which is, allows shared, into processing module;
When the shared attribute of the shared file is to forbid shared, server-side forbids providing the shared text to clientPart.
Further, pass through NFS communication for service between server-side and client;The file of server-side is configured to assign power.
Further, the display module is specifically used for:
System file in scanning storage generates shared file directory entry, the corresponding index of the shared file directory entryNodal information uniquely determines the storage region of shared file;
Shared file is shown to client by shared file directory entry.
Second aspect, the method that the present invention proposes shared file between a kind of virtual machine characterized by comprising
SS1, server-side show shared file to client;
SS2, client select the shared file that server-side provides;
SS3, server-side obtain the selected corresponding storage region of shared file of client, and pass through resource manager for instituteStorage region is stated to distribute to client;
The shared file in storage region that SS4, client access server-side are distributed.
Further, between step SS2 and step SS3 further include:
Server-side determines the shared attribute of the selected shared file of client:
When the shared attribute of the shared file, which is, allows shared, step SS3 is executed;
When the shared attribute of the shared file is to forbid shared, stop executing step SS3, server-side is forbidden to clientEnd provides the shared file.
Further, before step SS1 further include:
Configuration server-side and the client for being able to carry out server-side file access, specifically include:
The NFS service between server-side and client is configured, and the file for configuring server-side assigns power.
Further, step SS1 is specifically included:
System file in scanning storage generates shared file directory entry, the corresponding index of the shared file directory entryNodal information uniquely determines the storage region of shared file;
Shared file is shown to client by shared file directory entry.
A kind of system configuring virtual machine shared file proposed by the present invention, passes through the file between client and server-sideAccess solves between virtual machine in the prior art through disk visit and by way of resource manager storage region is distributedThe form shared file bring asked occupies virtual machine computing resource, influences the problem of virtual machine normal use, substantially increasesThe use space and computational efficiency of virtual machine.Meanwhile the form that shared attribute determines is carried out to shared file in the present invention, so thatVirtual machine realizes effective control to storage file, avoid virtual machine arbitrarily the control of difficulty or ease caused by shared file andOther problems.The present invention also provides the sides for server-side virtual machine and client configure and then being carried out file accessMethod enables virtual-machine client to carry out file access to server-side, increases the service flexibility of virtual machine product, so thatVirtual machine more adapts to the demand of enterprise-class tools.
The beneficial effect of the method for shared file is as described above, be not repeated to go to live in the household of one's in-laws on getting married between a kind of virtual machine proposed by the present inventionIt states.
Detailed description of the invention
Illustrate the embodiment of the present invention in order to clearer, attached drawing needed in the embodiment is done into simple Jie belowIt continues, it is clear that, drawings in the following description are only some embodiments of the invention, for those of ordinary skill in the artFor, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the systematic schematic diagram of shared file between virtual machine disclosed in the embodiment of the present invention.
Fig. 2 is the method flow diagram of shared file between virtual machine disclosed in the embodiment of the present invention.
Specific embodiment
With reference to the attached drawing in the embodiment of the present invention, clear and complete retouch is carried out to the technical solution in inventive embodimentsIt states, it is clear that described embodiment is only a part of the embodiments of the present invention, rather than whole embodiments.Based on the present inventionIn embodiment, those of ordinary skill in the art without making creative work, every other implementation obtainedExample, belongs to the scope of the present invention.
In order to make those skilled in the art better understand the present invention program, with reference to the accompanying drawings and detailed descriptionThe present invention is described in further detail.
Embodiment 1
The present embodiment provides a kind of system of shared file between virtual machine, as shown in Figure 1, comprising: server-side 2 and energyEnough carry out the client 1 of 2 file access of server-side;
The server-side includes:
Display module 201: for showing shared file to client 1;
Processing module 202: for obtaining the selected corresponding storage region of shared file of client 1, and pass through resource pipeReason device distributes the storage region to client 1;
The client 11 includes:
Chosen module 101: for selecting the shared file of the offer of server-side 2;
Access modules 102: the shared file in storage region for accessing the distribution of server-side 2.
This implementation also provides a kind of method of shared file between virtual machine, as shown in Figure 2, comprising:
SS1, server-side 2 show shared file to client 1;
SS2, client 1 select the shared file of the offer of server-side 2;
SS3, server-side 2 obtain the selected corresponding storage region of shared file of client 1, and will by resource managerThe storage region is distributed to client 1;
SS4, client 1 access the shared file in the storage region that server-side 2 is distributed.
Embodiment 2
The present embodiment provides a kind of systems of shared file between virtual machine, comprising: server-side 2 and is able to carry out server-sideThe client 1 of 2 file accesss;
The server-side 2 includes:
Display module 201: for showing shared file to client 1;
Judgment module: for determining the shared attribute of the selected shared file of client 1;
When the shared attribute of the shared file, which is, allows shared, into processing module 202;
When the shared attribute of the shared file is to forbid shared, server-side 2 forbids providing the shared text to client 1Part;
Processing module 202: for obtaining the selected corresponding storage region of shared file of client 1, and pass through resource pipeReason device distributes the storage region to client 1;
The client 1 includes:
Chosen module 101: for selecting the shared file of the offer of server-side 2;
Access modules 102: the shared file in storage region for accessing the distribution of server-side 2.
In the present embodiment, above-mentioned display module 201 is specifically used for:
System file in scanning storage generates shared file directory entry, the corresponding index of the shared file directory entryNodal information uniquely determines the storage region of shared file;
Shared file is shown to client 1 by shared file directory entry.
In the present embodiment, pass through NFS communication for service between server-side 2 and client 1;The file of server-side 2 is configured to assignPower.For configuring server-side 2 in InCloud Sphere system and be able to carry out the client 1 of 2 file access of server-side,Concrete operations are as follows:
1) virtual machine environment is configured, is specifically included:
Add licensing;
Increase host;
Creation storage, including it is locally stored and shares storage.
2) virtual machine service end 2 and client 1 are configured, is specifically included:
Respectively server-side 2 and client 1 configure centOS operating system, and distribute 4 core CPU, 4G memories, and 40G is hardDisk;
Server-side 2 and visitor is respectively configured by/etc/sysconfig/network-scripts/ifcfg-eth0 orderFamily end 1IP, and systemctl restart network is executed, so that configuration of IP is come into force.
3) the NFS service between server-side 2 and client 1 is configured, and the file for configuring server-side 2 assigns power, specifically includes:
Server-side 2:
It executes yum install nfs-utils order and configures NFS server-side 2;
Vi/etc/exports order is executed, configuration allows to access the IP of virtual machine, configuration file format are as follows: the mesh of sharingRecord+access virtual machine IP+ permission;
NFS service is enabled, and is registered to rpcbind, specific instructions are as follows:
Enable service:
/etc/init.d/rpcbind start
/etc/init.d/nfs start
It is registered to rpcbind:
exportfs-arv
It executes showmount-e localhost order and checks carry;
It executes chmod 777/mnt/file order and modifies path permission;
It executes systemctl disable firewalld order and closes firewall.
Client 1:
It executes yum install nfs-utils order and configures NFS client 1;
Determine mount directory;
It executes mount-t nfs 100.2.100.201:/mnt/file/mnt/nfs order and realizes carry;
The shared file of server-side 2 is checked after the completion of carry.
This implementation also provides a kind of method of shared file between virtual machine, comprising:
SS1, configuration server-side 2 and the client 1 for being able to carry out 2 file access of server-side, specifically include:
The NFS service between server-side 2 and client 1 is configured, and the file for configuring server-side 2 assigns power.
SS2, server-side 2 show shared file to client 1;
SS3, client 1 select the shared file of the offer of server-side 2;
SS4, server-side 2 determine the shared attribute of the selected shared file of client 1:
When the shared attribute of the shared file, which is, allows shared, step SS5 is executed;
When the shared attribute of the shared file is to forbid shared, stop executing step SS5, server-side 2 is forbidden to visitorFamily end 1 provides the shared file.
SS5, server-side 2 obtain the selected corresponding storage region of shared file of client 1, and will by resource managerThe storage region is distributed to client 1;
SS6, client 1 access the shared file in the storage region that server-side 2 is distributed.
In the present embodiment, step SS2 is specifically included:
System file in scanning storage generates shared file directory entry, the corresponding index of the shared file directory entryNodal information uniquely determines the storage region of shared file;
Shared file is shown to client 1 by shared file directory entry.
The system and method for shared file a kind of virtual machine disclosed by the invention is described in detail above.ExplanationEach embodiment is described in a progressive manner in book, the highlights of each of the examples are it is different from other embodiments itPlace, the same or similar parts in each embodiment may refer to each other.For the system disclosed in the embodiment, due to itself and realityIt applies that method disclosed in example is corresponding, therefore describes relatively simple, correlation can go out referring to method part illustration.It is described aboveIt is only the preferred embodiment of the present invention, it should be pointed out that: for those skilled in the art, do not departing from thisUnder the premise of inventive principle, several improvements and modifications can also be made, these improvements and modifications also should be regarded as protection of the inventionRange.

Claims (8)

Translated fromChinese
1.一种虚拟机间共享文件的系统,其特征在于,包括:服务端以及能够进行服务端文件访问的客户端;1. A system for sharing files between virtual machines, comprising: a server and a client capable of accessing files on the server;所述服务端包括:The server includes:展示模块:用于向客户端展示共享文件;Display module: used to display shared files to the client;处理模块:用于获取客户端选定的共享文件对应的存储区域,并通过资源管理器将所述存储区域分配至客户端;Processing module: used to obtain the storage area corresponding to the shared file selected by the client, and allocate the storage area to the client through the resource manager;所述客户端包括:The client includes:选定模块:用于选定服务端提供的共享文件;Selected module: used to select shared files provided by the server;访问模块:用于访问服务端分配的存储区域中的共享文件。Access module: used to access shared files in the storage area allocated by the server.2.根据权利要求1所述的虚拟机间共享文件的系统,其特征在于,所述服务端还包括:2. The system for sharing files between virtual machines according to claim 1, wherein the server further comprises:判断模块:用于确定客户端选定的共享文件的共享属性;Judgment module: used to determine the shared attribute of the shared file selected by the client;当所述共享文件的共享属性为允许共享时,进入处理模块;When the shared attribute of the shared file is to allow sharing, enter the processing module;当所述共享文件的共享属性为禁止共享时,服务端禁止向客户端提供该共享文件。When the sharing attribute of the shared file is sharing prohibited, the server prohibits providing the shared file to the client.3.根据权利要求1所述的虚拟机间共享文件的系统,其特征在于,服务端与客户端之间通过NFS服务通信;3. The system for sharing files between virtual machines according to claim 1, wherein the server communicates with the client through NFS service;服务端的文件被配置赋权。The server-side files are configured and empowered.4.根据权利要求1所述的虚拟机间共享文件的系统,其特征在于,所述展示模块具体用于:4. The system for sharing files between virtual machines according to claim 1, wherein the display module is specifically used for:扫描存储内的系统文件,生成共享文件目录项,所述共享文件目录项对应的索引节点信息唯一确定共享文件的存储区域;Scan the system files in the storage to generate a shared file directory entry, where the inode information corresponding to the shared file directory entry uniquely determines the storage area of the shared file;通过共享文件目录项向客户端展示共享文件。Show shared files to clients through shared file directory entries.5.一种虚拟机间共享文件的方法,其特征在于,包括:5. A method for sharing files between virtual machines, comprising:SS1、服务端向客户端展示共享文件;SS1, the server displays the shared file to the client;SS2、客户端选定服务端提供的共享文件;SS2. The client selects the shared file provided by the server;SS3、服务端获取客户端选定的共享文件对应的存储区域,并通过资源管理器将所述存储区域分配至客户端;SS3, the server obtains the storage area corresponding to the shared file selected by the client, and allocates the storage area to the client through the resource manager;SS4、客户端访问服务端分配的存储区域中的共享文件。SS4. The client accesses the shared files in the storage area allocated by the server.6.根据权利要求5所述的虚拟机间共享文件的方法,其特征在于,步骤SS2与步骤SS3之间还包括:6. The method for sharing files between virtual machines according to claim 5, characterized in that, between step SS2 and step SS3, further comprising:服务端确定客户端选定的共享文件的共享属性:The server determines the sharing properties of the shared file selected by the client:当所述共享文件的共享属性为允许共享时,执行步骤SS3;When the sharing attribute of the shared file is to allow sharing, perform step SS3;当所述共享文件的共享属性为禁止共享时,停止执行步骤SS3,服务端禁止向客户端提供该共享文件。When the sharing attribute of the shared file is sharing prohibited, the execution of step SS3 is stopped, and the server prohibits providing the shared file to the client.7.根据权利要求5所述的虚拟机间共享文件的方法,其特征在于,步骤SS1之前还包括:7. The method for sharing files between virtual machines according to claim 5, wherein before step SS1, the method further comprises:配置服务端以及能够进行服务端文件访问的客户端,具体包括:Configure the server and clients that can access files on the server, including:配置服务端及客户端之间的NFS服务,并配置服务端的文件赋权。Configure the NFS service between the server and the client, and configure the file authorization on the server.8.根据权利要求5所述的虚拟机间共享文件的方法,其特征在于,步骤SS1具体包括:8. The method for sharing files between virtual machines according to claim 5, wherein step SS1 specifically comprises:扫描存储内的系统文件,生成共享文件目录项,所述共享文件目录项对应的索引节点信息唯一确定共享文件的存储区域;Scan the system files in the storage to generate a shared file directory entry, where the inode information corresponding to the shared file directory entry uniquely determines the storage area of the shared file;通过共享文件目录项向客户端展示共享文件。Show shared files to clients through shared file directory entries.
CN201811056793.3A2018-09-112018-09-11The system and method for shared file between a kind of virtual machinePendingCN109189741A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201811056793.3ACN109189741A (en)2018-09-112018-09-11The system and method for shared file between a kind of virtual machine

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811056793.3ACN109189741A (en)2018-09-112018-09-11The system and method for shared file between a kind of virtual machine

Publications (1)

Publication NumberPublication Date
CN109189741Atrue CN109189741A (en)2019-01-11

Family

ID=64910456

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811056793.3APendingCN109189741A (en)2018-09-112018-09-11The system and method for shared file between a kind of virtual machine

Country Status (1)

CountryLink
CN (1)CN109189741A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090150879A1 (en)*2006-01-092009-06-11International Business Machines CorporationSharing files among different virtual machine images
CN102289513A (en)*2011-09-052011-12-21盛乐信息技术(上海)有限公司Method and system for obtaining internal files of virtual machine
US8316364B2 (en)*2007-02-282012-11-20Red Hat, Inc.Peer-to-peer software update distribution network
CN103491193A (en)*2013-09-302014-01-01华为技术有限公司Method and device for sharing file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090150879A1 (en)*2006-01-092009-06-11International Business Machines CorporationSharing files among different virtual machine images
US8316364B2 (en)*2007-02-282012-11-20Red Hat, Inc.Peer-to-peer software update distribution network
CN102289513A (en)*2011-09-052011-12-21盛乐信息技术(上海)有限公司Method and system for obtaining internal files of virtual machine
CN103491193A (en)*2013-09-302014-01-01华为技术有限公司Method and device for sharing file

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
冯迅: "《嵌入式系统开发实验教程》", 31 August 2018*
刘振宇等: "《Linux服务器搭建与管理案例教程》", 31 August 2016*

Similar Documents

PublicationPublication DateTitle
US12003571B2 (en)Client-directed placement of remotely-configured service instances
US8850429B2 (en)Load balancing in multi-server virtual workplace environments
US10394475B2 (en)Method and system for memory allocation in a disaggregated memory architecture
US8769531B2 (en)Optimizing the configuration of virtual machine instances in a networked computing environment
US9871851B2 (en)Migrating private infrastructure services to a cloud
US9674275B1 (en)Providing a file system interface to network-accessible computing resources
US11716406B2 (en)Data caching for cloud services
US20140214922A1 (en)Method of providing virtual machine and service gateway for real-time virtual desktop service
CA2988457A1 (en)Controlling user access to command execution
US20120239810A1 (en)System, method and computer program product for clustered computer environment partition resolution
US11003658B2 (en)Selectively retrieving data from remote share nothing computer clusters
US20170134339A1 (en)Management of clustered and replicated systems in dynamic computing environments
US20160203014A1 (en)Managing virtual machines using globally unique persistent virtual machine identifiers
CN111835820A (en)System and method for realizing cloud management
CN105095103A (en)Storage device management method and device used for cloud environment
DE112022002736T5 (en) TRANSFERRING TASK DATA BETWEEN EDGE UNITS IN EDGE COMPUTING
CN206149327U (en) An information cloud management platform and enterprise information system
US10439897B1 (en)Method and apparatus for enabling customized control to applications and users using smart tags
US20180123999A1 (en)Tracking client location using buckets
Pourqasem et al.Comparison of cloud and grid computing
KR20040075307A (en)System and method for policy quorum grid resource management
CN109189741A (en)The system and method for shared file between a kind of virtual machine
US12333316B2 (en)Self-managed configuration of information technology assets in an information technology environment
US11288291B2 (en)Method and system for relation discovery from operation data
CN101977227A (en)Multi-user network storage system and construction method thereof

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20190111


[8]ページ先頭

©2009-2025 Movatter.jp