CN103984589A - Virtual machine-based lab practice environment establishment method for realizing computer experiment teaching - Google Patents
Virtual machine-based lab practice environment establishment method for realizing computer experiment teaching Download PDFInfo
- Publication number
- CN103984589A CN103984589A CN201410171400.9A CN201410171400A CN103984589A CN 103984589 A CN103984589 A CN 103984589A CN 201410171400 A CN201410171400 A CN 201410171400A CN 103984589 A CN103984589 A CN 103984589A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- course
- template
- image
- information
- 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
Links
- 238000002474 experimental method Methods 0.000 title claims abstract description 28
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000002452 interceptive effect Effects 0.000 claims abstract description 8
- 235000013599 spices Nutrition 0.000 claims description 2
- 230000008878 coupling Effects 0.000 claims 1
- 238000010168 coupling process Methods 0.000 claims 1
- 238000005859 coupling reaction Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 10
- 238000007726 management method Methods 0.000 description 57
- 238000012544 monitoring process Methods 0.000 description 13
- 238000013461 design Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 239000008186 active pharmaceutical agent Substances 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000796 flavoring agent Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种基于虚拟机实现计算机实验教学的上机环境建立方法。本方法为:1)学生在系统Web服务主页上完成认证登陆,然后选择当前课程;其中,课程主镜像文件已被部署到各物理节点上;2)通过交互界面查看与管理虚拟机状态;3)通过系统Web服务页面获取虚拟机桌面;然后在浏览器中使用虚拟机。与现有技术相比,本发明通过虚拟化技术能帮助屏蔽底层物理硬件差异,为上层用户提供多样化的执行环境,且虚拟机之间相互隔离,因此用户可使用私有虚拟机作为上机平台,自由地安装个性化软件,用户数据存储在虚拟机镜像中,能保证数据安全。
The invention discloses a computer environment establishment method for realizing computer experiment teaching based on a virtual machine. This method is as follows: 1) Students complete authentication and login on the system web service home page, and then select the current course; wherein, the main image file of the course has been deployed on each physical node; 2) Check and manage the status of the virtual machine through the interactive interface; 3 ) Obtain the desktop of the virtual machine through the system Web service page; then use the virtual machine in the browser. Compared with the prior art, the present invention can help to shield the underlying physical hardware differences through virtualization technology, and provide diversified execution environments for upper-layer users, and the virtual machines are isolated from each other, so users can use private virtual machines as the computer platform , Freely install personalized software, user data is stored in the virtual machine image, which can ensure data security.
Description
技术领域technical field
本发明涉及一种基于虚拟机实现计算机实验教学的上机环境建立方法,属于虚拟机技术领域。The invention relates to a method for establishing a computer environment for realizing computer experiment teaching based on a virtual machine, and belongs to the technical field of virtual machines.
背景技术Background technique
计算机实验教学中心是实施实验教学的重要场所。它应为学生提供良好的上机服务,便于教师参与教学实践,便于管理员参与监控管理。随着教育模式的发展,传统实验教学中心的不足日益凸显。首先,在传统实验教学中心开展实验教学活动时常面临安全问题:公共实验环境中用户共享存储,私有文件数据可被随意删改造成损失;为保证系统安全,学生通常没有权限安装软件,不仅牺牲了学生用户体验,也给管理员增加了管理负担;硬件故障也易造成严重后果。其次,传统实验教学环境的资源利用率不高:实验教学中心的软硬件资源通常都不能被用户充分利用。最后,传统实验教学中心的管理活动主要由管理员参与,缺少教师的有力参与,且管理员缺乏便捷高效的实验教学中心管理机制。The computer experiment teaching center is an important place to implement experiment teaching. It should provide students with good computer services, facilitate teachers to participate in teaching practice, and facilitate administrators to participate in monitoring and management. With the development of the education model, the shortcomings of the traditional experimental teaching center have become increasingly prominent. First of all, when carrying out experimental teaching activities in traditional experimental teaching centers, we often face security problems: in the public experimental environment, users share storage, and private file data can be deleted and altered at will, resulting in loss; in order to ensure system security, students usually do not have permission to install software, which not only sacrifices students User experience also increases the management burden for administrators; hardware failures can also easily cause serious consequences. Secondly, the resource utilization rate of the traditional experimental teaching environment is not high: the hardware and software resources of the experimental teaching center are usually not fully utilized by users. Finally, the management activities of traditional experimental teaching centers are mainly participated by administrators, lacking the effective participation of teachers, and administrators lack a convenient and efficient experimental teaching center management mechanism.
发明内容Contents of the invention
基于上述需求,本文提出了利用虚拟化技术来解决上述问题。虚拟化技术能帮助屏蔽底层物理硬件差异,为上层用户提供多样化的执行环境,且虚拟机之间相互隔离,因此用户可使用私有虚拟机作为上机平台,自由地安装个性化软件,用户数据存储在虚拟机镜像中,能保证数据安全;发生硬件故障时迁移虚拟机或转移镜像文件,即可快速地恢复使用原始的操作系统和应用软件;同时,随着多核技术普及,一台物理机运行多台虚拟机也不会影响用户体验,因此利用虚拟化技术有助于提升资源利用率,缓解硬件紧缺的现状。Based on the above requirements, this paper proposes to use virtualization technology to solve the above problems. Virtualization technology can help shield the underlying physical hardware differences, provide a variety of execution environments for upper-level users, and isolate virtual machines from each other, so users can use private virtual machines as a platform to freely install personalized software and user data Stored in the virtual machine image, which can ensure data security; when a hardware failure occurs, migrate the virtual machine or transfer the image file, and the original operating system and application software can be quickly restored; at the same time, with the popularization of multi-core technology, a physical machine Running multiple virtual machines will not affect the user experience, so the use of virtualization technology can help improve resource utilization and alleviate the current situation of hardware shortage.
本文提出了一种基于虚拟机来支持计算机实验教学的个性化上机环境这一概念,旨在为计算机实验教学提供一套完整的教学管理软件模块,能够方便的为机房管理员,教师以及学生提供高效的实验教学服务。This paper proposes the concept of a personalized computer environment based on virtual machines to support computer experiment teaching, aiming to provide a complete set of teaching management software modules for computer experiment teaching, which can be convenient for computer room administrators, teachers and students Provide efficient experimental teaching services.
1.设计目标1. Design goals
1.1需求设计1.1 Demand Design
首先,计算机实验教学的个性化上机环境所提供服务的对象有三类:学生用户,教师用户,机房管理员用户。通过对这三种用户的需求分析,我们分别提出了相应的功能设计概念。First of all, there are three types of service objects provided by the personalized computer environment of computer experiment teaching: student users, teacher users, and computer room administrator users. Through the analysis of the needs of these three kinds of users, we put forward corresponding functional design concepts respectively.
针对学生用户,主要是为学生提供可自由操作的私有虚拟机,支持学生提出更灵活的关于个性化操作系统、应用软件、计算资源配置等方面的需求,并提供方便的交互接口让学生控制和使用其个性化虚拟机(如通过客户端、浏览器访问各自的虚拟机)。具体来说,有以下功能需求,如图1所示。For student users, it mainly provides students with free-to-operate private virtual machines, supports students to put forward more flexible demands on personalized operating systems, application software, computing resource configuration, etc., and provides convenient interactive interfaces for students to control and Use its personalized virtual machine (such as accessing its own virtual machine through a client or browser). Specifically, there are the following functional requirements, as shown in Figure 1.
使学生能够方便携带实验教学中心中使用的操作系统、应用软件,并能在其它平台上恢复使用该虚拟机环境。支持学生在实验教学中心之外远程地访问其个性化的虚拟机,并提供多样化的访问方式,远程用户与内部用户共享计算资源,学生能关闭、保存、备份、恢复个性化虚拟机以实现课程相关个性化虚拟机的管理。It enables students to conveniently carry the operating system and application software used in the experimental teaching center, and restore the use of the virtual machine environment on other platforms. Support students to remotely access their personalized virtual machines outside the experimental teaching center, and provide a variety of access methods. Remote users share computing resources with internal users. Students can close, save, backup, and restore personalized virtual machines to achieve Courses related to the administration of personalized virtual machines.
针对教师用户,为教师用户提供便捷的面向课程教学实验的管理平台。虚拟化实验教学中心,也需面向课程,为课程实验提供多样化的上机环境(如计算概论课程要求windows,Microsoft office,vc++6.0等,而编译实习课程要求GCC,Java等)。系统中提供一套完善的管理接口让教师用户管理课程相关信息,并能够方便地创建、部署和管理课程实验的虚拟机。虚拟化技术实现了底层硬件资源对上层虚拟机用户透明的机制,因此可以在虚拟化实验中心构建出特殊的实验平台,拓展教学实验模式。以北京大学计算机系操作系统实习和计算机网络概论这两门课程为例:为保护软硬件不被破坏,操作系统实习没有让学生在实验中窥探真实的操作系统(如调试Linux内核);受硬件资源限制,网络概论实验课程也不能为每个学生组建出各自独立的私有局域网来辅助网络实验探索。而利用虚拟化技术,学生可以调试VM内核代码、组建虚拟局域网络等,提供统一的机制管理用户信息和个性化虚拟机等。从教师用户的功能需求如图2所示。For teacher users, provide a convenient management platform for course teaching experiments for teacher users. The virtualization experiment teaching center also needs to be oriented to courses, and provide a variety of computer environments for course experiments (for example, the introduction to computing course requires windows, Microsoft office, vc++6.0, etc., while the compilation practice course requires GCC, Java, etc.). The system provides a complete set of management interfaces to allow teachers and users to manage course-related information, and can easily create, deploy and manage virtual machines for course experiments. The virtualization technology realizes the mechanism that the underlying hardware resources are transparent to the upper-level virtual machine users, so a special experimental platform can be built in the virtualization experiment center to expand the teaching experiment mode. Take the two courses of Operating System Internship and Introduction to Computer Networks of the Computer Department of Peking University as an example: In order to protect the software and hardware from being damaged, the operating system internship did not allow students to spy on the real operating system (such as debugging the Linux kernel); Due to resource constraints, the experimental course of network theory cannot set up an independent private local area network for each student to assist network experiment exploration. Using virtualization technology, students can debug VM kernel code, build a virtual local area network, etc., and provide a unified mechanism to manage user information and personalize virtual machines. The functional requirements from teacher users are shown in Figure 2.
针对管理员用户,旨在提供一套全面的部署、监控和管理维护的系统平台。系统能够为管理员用户生成各类用户的相关使用数据以及计算资源概览图,并提供监控管理的交互功能,如管理学生参与课程并使用个性化虚拟机;管理教师部署课程实验平台,监测整个教学实验中心中虚拟机的实时状况。管理员用户的功能需求如图3所示。For administrator users, it aims to provide a comprehensive system platform for deployment, monitoring, management and maintenance. The system can generate relevant usage data of various users and an overview of computing resources for administrator users, and provide interactive functions for monitoring and management, such as managing students to participate in courses and using personalized virtual machines; managing teachers to deploy course experiment platforms to monitor the entire teaching Real-time status of virtual machines in the lab center. The functional requirements of the administrator user are shown in Figure 3.
1.2功能设计1.2 Functional Design
针对传统实验环境中存在的不足,我们在该系统中提出了以下设计概念和目标:In view of the deficiencies in the traditional experimental environment, we put forward the following design concepts and goals in this system:
●个性化:在实验教学中心为学生提供可自由操作的个性化虚拟机。虚拟化技术可支持学生更灵活地配置出其需要的实验环境,包括操作系统、应用软件、计算资源等(如学生使用Windows7操作系统,4GB内存)。提供方便的交互接口让学生控制和使用其虚拟机(如通过客户端、浏览器访问各自的虚拟机)。●Personalization: Provide students with freely operable personalized virtual machines in the experimental teaching center. Virtualization technology can support students to more flexibly configure the experimental environment they need, including operating system, application software, computing resources, etc. (for example, students use Windows7 operating system, 4GB memory). Provide a convenient interactive interface for students to control and use their virtual machines (such as accessing their own virtual machines through clients and browsers).
●面向课程:面向多样化的课程教学需求,提供多样化的上机环境,利用虚拟化技术,教师可突破现有实验环境的限制,开设各具特色的实验课程。提供一套完善的操作接口让教师管理课程信息,方便创建、部署及管理。可以用来拓展实验教学模式:如开展系统安全课程实验时为学生提供可自由修改的操作系统;开展网络课程实验时为其提供若干台虚拟机组建局域网。●Curriculum-oriented: To meet the needs of diversified course teaching, it provides a variety of computer environments. Using virtualization technology, teachers can break through the limitations of the existing experimental environment and set up unique experimental courses. Provide a complete set of operation interface for teachers to manage course information, which is convenient for creation, deployment and management. It can be used to expand the experimental teaching mode: for example, to provide students with an operating system that can be freely modified when carrying out system security course experiments; to provide students with several virtual machines to form a local area network when carrying out network course experiments.
●便携:学生使用USB等设备,能携带其在计算机实验教学中心中使用的个性化实验环境,并在其它平台上恢复运行使用。●Portable: Students use USB and other devices to carry their personalized experiment environment used in the computer experiment teaching center, and resume operation on other platforms.
●远程访问:提供多样化的虚拟机访问方式。如支持学生远程地访问其个性化的虚拟机。远程用户能够和本地用户共享计算资源,并为管理人员提供统一的机制管理所有的用户信息和个性化虚拟机等。●Remote access: Provides a variety of virtual machine access methods. Such as supporting students to remotely access their personalized virtual machines. Remote users can share computing resources with local users, and provide managers with a unified mechanism to manage all user information and personalized virtual machines.
●监控管理:为保证实验教学中心的良好运行,应为管理员生成各类计算资源概览图,提供监控管理的交互接口:如管理学生参与课程并使用个性化虚拟机;管理教师部署课程实验平台,监测整个教学实验中心中虚拟机的实时状况。●Monitoring management: In order to ensure the good operation of the experimental teaching center, an overview map of various computing resources should be generated for the administrator, and an interactive interface for monitoring management should be provided: such as managing students to participate in courses and using personalized virtual machines; managing teachers to deploy course experiment platforms , to monitor the real-time status of the virtual machines in the entire teaching experiment center.
1.3系统架构设计1.3 System Architecture Design
为实现上述目标,我们提出图4所示的架构设计。学生用户参与课程实验时能选择任一台部署Xen/KVM虚拟化平台的节点使用其个性化虚拟机。虚拟机安装了满足课程实验需求的操作系统和应用软件。启动个性化虚拟机需要主镜像和子镜像两部分,其中主镜像文件包含课程实验要求的系统和软件,子镜像文件则存储学生个性化的数据(包括个性化软件和用户数据等)。各节点都存储各门课程的主镜像,子镜像则以镜像资源池的方式保存在存储服务器上。主镜像与子镜像分离存储,使得学生使用虚拟机服务时可灵活选择计算节点。由于子镜像文件通常较小,用户也可把它拷贝到U盘以备份、恢复使用其个性化环境。为提升实验教学中心的资源利用率,在节点中也运行远程用户的个性化虚拟机,我们提供接口支持用户从外部访问服务,并为教师和管理员提供管理课程、学生、计算资源等的接口。系统部署在服务器集群上,包含镜像管理模块、虚拟机管理模块和元数据管理模块。To achieve the above goals, we propose the architecture design shown in Figure 4. When student users participate in course experiments, they can choose any node that deploys the Xen/KVM virtualization platform to use their personalized virtual machines. The virtual machine is installed with the operating system and application software that meet the needs of the course experiment. Starting a personalized virtual machine requires two parts, the main image and the sub-image. The main image file contains the system and software required by the course experiment, and the sub-image file stores the student's personalized data (including personalized software and user data, etc.). Each node stores the main image of each course, and the sub-image is stored on the storage server in the form of a mirror resource pool. The main image and sub-image are stored separately, so that students can flexibly choose computing nodes when using virtual machine services. Since the sub-mirror file is usually small, the user can also copy it to a USB flash drive for backup and recovery to use its personalized environment. In order to improve the resource utilization rate of the experimental teaching center, the personalized virtual machines of remote users are also run in the nodes. We provide interfaces to support users to access services from the outside, and provide interfaces for teachers and administrators to manage courses, students, computing resources, etc. . The system is deployed on a server cluster and includes a mirror image management module, a virtual machine management module and a metadata management module.
镜像管理模块管理各节点上本地镜像文件库的主镜像的组织和存储服务器中子镜像文件库和子镜像池中子镜像的部署。它还管理虚拟机镜像的文件系统。The mirror management module manages the organization of the primary mirror of the local mirror file repository on each node and the deployment of the sub-mirror file repository in the storage server and the sub-mirror pool. It also manages the file system of the virtual machine image.
虚拟机管理模块管理各节点上运行的虚拟机。如管理虚拟机运行,创建虚拟机快照,迁移虚拟机,并为本地和远程用户提供统一的虚拟机管理接口。The virtual machine management module manages the virtual machines running on each node. Such as managing virtual machine operation, creating virtual machine snapshots, migrating virtual machines, and providing a unified virtual machine management interface for local and remote users.
元数据管理模块管理着数据库服务器中存储的各对象信息(如学生,教师,节点,虚拟机)及对象间的关系(如选课,学生个性化镜像与课程主镜像的关系等)。The metadata management module manages the object information stored in the database server (such as students, teachers, nodes, virtual machines) and the relationship between objects (such as course selection, the relationship between the student's personalized image and the main image of the course, etc.).
各管理模块间相互协作为用户使用管理接口提供服务:镜像管理模块为虚拟机管理模块提供主镜像和子镜像;元数据管理模块维护镜像管理模块所管理的课程主镜像及个性化子镜像间的映射关系;元数据管理模块也维护虚拟机管理模块所管理的学生个性化虚拟机及其相关镜像文件间的关系。The management modules cooperate with each other to provide services for users to use the management interface: the image management module provides the main image and sub-image for the virtual machine management module; the metadata management module maintains the mapping between the course main image and personalized sub-image managed by the image management module relationship; the metadata management module also maintains the relationship between the student's personalized virtual machine and its related image files managed by the virtual machine management module.
系统根据学生、教师和管理员不同的需求提供三类用户访问接口。学生主要关注虚拟机使用,教师则主要关注课程主镜像的配置、部署,而管理员则需要管理整个实验环境的运行状况。The system provides three types of user access interfaces according to the different needs of students, teachers and administrators. Students mainly focus on the use of virtual machines, teachers mainly focus on the configuration and deployment of the main image of the course, and administrators need to manage the operation status of the entire experimental environment.
与现有技术相比,本发明的积极效果为:Compared with prior art, positive effect of the present invention is:
本发明通过虚拟化技术能帮助屏蔽底层物理硬件差异,为上层用户提供多样化的执行环境,且虚拟机之间相互隔离,因此用户可使用私有虚拟机作为上机平台,自由地安装个性化软件,用户数据存储在虚拟机镜像中,能保证数据安全。The present invention can help to shield the underlying physical hardware differences through virtualization technology, and provide diversified execution environments for upper-level users, and the virtual machines are isolated from each other, so users can use private virtual machines as the upper-machine platform to freely install personalized software , user data is stored in the virtual machine image, which can ensure data security.
附图说明Description of drawings
图1为学生功能需求示意图;Figure 1 is a schematic diagram of students' functional requirements;
图2为教师功能需求示意图;Figure 2 is a schematic diagram of the teacher's functional requirements;
图3为管理员功能需求示意图;Figure 3 is a schematic diagram of administrator functional requirements;
图4为系统架构示意图;Figure 4 is a schematic diagram of the system architecture;
图5为镜像模板树结构图;Fig. 5 is a mirror image template tree structure diagram;
图6为学生使用虚拟机示意图;Fig. 6 is a schematic diagram of students using virtual machines;
图7为类图概览;Figure 7 is an overview of the class diagram;
图8为数据处理流程图;Fig. 8 is a flow chart of data processing;
图9为选课流程图。Figure 9 is a flow chart of course selection.
具体实施方式Detailed ways
根据设计需求,系统的各模块分别如下:课程镜像管理模块,学生个性化上机模块,管理员监控管理模块。According to the design requirements, the modules of the system are as follows: course image management module, student personalized computer module, administrator monitoring management module.
课程镜像管理模块Course Mirroring Management Module
管理员用户主要参与课程和主镜像的创建与管理。我们称安装有课程要求操作系统和应用软件的主镜像为课程镜像模板。管理员用户的基本使用流程为:认证登陆、管理课程基本信息、管理课程主镜像模板。其中最为关键的问题是准备课程主镜像模板。Administrator users are mainly involved in the creation and management of courses and master images. We call the master image installed with the operating system and application software required by the course the course image template. The basic usage process of the administrator user is: authentication login, management of basic course information, and management of the main image template of the course. The most critical issue is to prepare the master image template of the course.
为高效地制备课程主镜像模板,我们提出了镜像模板树的概念。图5所示为系统的镜像模板树,其中根节点为空白镜像文件;深度为1的节点为仅安装了各类常见的发行版操作系统的镜像模板;当节点深度k>=1时,其深度为k+1的儿子节点是基于它安装额外软件所派生出的镜像模板,父节点所包含软件集是子节点软件集的真子集。我们基于镜像模板树的概念构建和组织课程主镜像的模板库。In order to efficiently prepare the main image template of the course, we propose the concept of image template tree. Figure 5 shows the image template tree of the system, wherein the root node is a blank image file; the node with a depth of 1 is an image template with only various common distribution operating systems installed; when the node depth k>=1, its The child node with a depth of k+1 is based on the image template derived from installing additional software on it, and the software set contained in the parent node is a proper subset of the child node software set. We build and organize the template repository for the course master image based on the concept of an image template tree.
管理员用户制备镜像模板的流程将围绕模板树进行。通过调研往年课程开设情况,系统预先制备了一些镜像模板。首先由教师用户提交课程模板配置以指明实验要求的操作系统和软件集等信息,随后管理员根据教师用户需求去查询镜像模板树。查询过程通常能在系统预先所部署的模板库中找到满足其课程要求的镜像模板。如匹配失败,则返回所需镜像模板的最大真子集模板。与此同时,系统还支持教师用户自行制备镜像模板,教师用户可选择以下两种方式制备模板:The process for an administrator user to prepare a mirror image template will be carried out around the template tree. The system pre-prepared some mirror templates by investigating the course offerings in previous years. First, the teacher user submits the course template configuration to specify the operating system and software set required by the experiment, and then the administrator queries the mirror template tree according to the teacher user's needs. The query process can usually find mirror templates that meet the course requirements in the template library pre-deployed by the system. If the match fails, return the maximum proper subset template of the desired mirror template. At the same time, the system also supports teacher users to prepare mirror image templates by themselves. Teacher users can choose the following two ways to prepare templates:
第一种方式为教师在线配置镜像模板。根据上述查询结果,教师能利用该返回模板启动虚拟机,只需再安装少量软件就能完成镜像模板的制备,从而提高制备模板的效率。The first way is to configure mirror templates online for teachers. According to the above query results, the teacher can use the returned template to start the virtual machine, and only need to install a small amount of software to complete the preparation of the image template, thereby improving the efficiency of template preparation.
第二种方式是教师独立制备镜像模板,然后上传到镜像库,经过镜像管理模块转换格式加入到模板库。支持上传的镜像格式有RAW,IMG,VMDK,QCOW2等。The second way is that the teacher prepares the image template independently, then uploads it to the image library, and adds it to the template library after the image management module converts the format. The image formats supported for uploading include RAW, IMG, VMDK, QCOW2, etc.
当课程镜像模板制备完成,系统会将其分发到各节点的本地镜像文件库,根据其所属教师和课程,将其存储为/localTemps/teacherID/courseID/templateName.img,由元数据管理模块维护课程镜像模板与教师,课程等之间的关系。When the course image template is prepared, the system will distribute it to the local image file library of each node, store it as /localTemps/teacherID/courseID/templateName.img according to the teacher and course it belongs to, and maintain the course by the metadata management module Mirror the relationship between templates and teachers, courses, etc.
学生个性化上机模块Personalized hands-on modules for students
系统为学生提供使用和管理虚拟机的功能,运行虚拟机需要课程主镜像模板和个性化子镜像。当确定课程参与学生名单后,系统会基于课程主镜像为每一学生创建QCOW2类型的子镜像。如图6所示,学生有两种使用个性化虚拟机的方式:客户端和浏览器。The system provides students with the function of using and managing virtual machines. Running a virtual machine requires a course master image template and a personalized sub-image. After determining the list of students participating in the course, the system will create a QCOW2-type sub-image for each student based on the main image of the course. As shown in Figure 6, students have two ways to use personalized virtual machines: client and browser.
学生通过客户端使用个性化虚拟机的基本流程是:1)认证登陆,2)选择当前课程,3)通过交互界面查看与管理虚拟机状态,4)通过Spice客户端或VNCViewer等连接到虚拟机桌面进行课程实验。The basic process for students to use the personalized virtual machine through the client is: 1) authenticate and log in, 2) select the current course, 3) view and manage the status of the virtual machine through the interactive interface, 4) connect to the virtual machine through the Spice client or VNCViewer, etc. Desktop for course experiments.
学生也可通过浏览器使用其个性化虚拟机:A)在系统Web服务主页上完成认证登陆,B)选择当前课程,C)查看及管理个性化虚拟机,D)在系统Web服务页面获取虚拟机桌面,E)在浏览器中使用虚拟机。Students can also use their personalized virtual machines through a browser: A) complete the authentication login on the system web service home page, B) select the current course, C) view and manage the personalized virtual machine, D) obtain the virtual machine on the system web service page machine desktop, E) use the virtual machine in the browser.
学生使用个性化虚拟机的流程主要涉及三个关键问题:管理虚拟机QCOW2镜像、控制虚拟机以及连接虚拟机桌面。The process for students to use a personalized virtual machine mainly involves three key issues: managing the virtual machine QCOW2 image, controlling the virtual machine, and connecting to the virtual machine desktop.
管理QCOW2镜像,一方面需管理QCOW2镜像文件系统,系统的镜像管理模块基于libguestfs API(libguestfs是一组访问和修改虚拟机镜像文件的API)和qemu-img等工具管理QCOW2文件,支持查看与编辑镜像中的文件、监测镜像文件系统的空闲状况等。另一方面需维护学生QCOW2镜像与课程镜像模板间的关系。根据学生、课程信息将个性化子镜像存储为/gluster/studentID/courseID/QCOW2Name.QCOW2,并由元数据管理模块维护镜像、学生和课程间的关系。To manage QCOW2 images, on the one hand, it is necessary to manage the QCOW2 image file system. The image management module of the system is based on libguestfs API (libguestfs is a set of APIs for accessing and modifying virtual machine image files) and tools such as qemu-img to manage QCOW2 files, and supports viewing and editing Files in the mirror, monitoring the idle status of the mirror file system, etc. On the other hand, the relationship between the student QCOW2 image and the course image template needs to be maintained. According to the student and course information, the personalized sub-mirror is stored as /gluster/studentID/courseID/QCOW2Name.QCOW2, and the relationship between mirror, student and course is maintained by the metadata management module.
虚拟机控制包含虚拟机电源管理,虚拟机镜像快照管理,虚拟机迁移等方面。pVCE虚拟机管理模块通过libvirt API实现了对虚拟机的控制,能支持Xen/KVM等多种虚拟化平台。Virtual machine control includes virtual machine power management, virtual machine image snapshot management, virtual machine migration, etc. The pVCE virtual machine management module realizes the control of the virtual machine through the libvirt API, and can support various virtualization platforms such as Xen/KVM.
连接虚拟机桌面。学生通过客户端使用时可通过各节点上已安装有Spicec、VNCViewer等的pVCE客户端连接虚拟机桌面,或者采用ssh方式使用虚拟机,也可以通过其他远程桌面访问工具(如Windows远程桌面)连接虚拟机桌面。对于Web访问方式,我们集成了noVNC,spice-html5等工具支持学生不用安装任何软件,仅通过浏览器便可直接使用虚拟机。Connect to the virtual machine desktop. When using the client, students can connect to the virtual machine desktop through the pVCE client installed on each node such as Spicec and VNCViewer, or use the virtual machine in ssh mode, or connect through other remote desktop access tools (such as Windows Remote Desktop) Virtual machine desktop. For web access, we have integrated noVNC, spice-html5 and other tools to support students to use the virtual machine directly through a browser without installing any software.
管理员监控管理模块Administrator Monitoring Management Module
管理员在该系统中主要参与以下三方面的工作:The administrator mainly participates in the following three aspects of work in the system:
(1)维护镜像模板库。通过调研以往课程实验环境对操作系统和软件的需求,管理员将预先制备一部分镜像模板来初始化系统的镜像模板库。(1) Maintain the mirror template library. By investigating the requirements of the operating system and software in the experimental environment of previous courses, the administrator will pre-prepare a part of the image template to initialize the system's image template library.
(2)管理系统中所有对象及对象间的关系,并控制对象的生命周期。图7的类图描述了系统的主要类,展示了类之间的关系。管理员通过交互界面,利用元数据管理模块对系统进行管理。(2) Manage all objects in the system and the relationship between objects, and control the life cycle of objects. The class diagram in Figure 7 describes the main classes of the system and shows the relationships between the classes. The administrator uses the metadata management module to manage the system through the interactive interface.
(3)监控系统。虚拟机管理模块和镜像管理模块负责记录系统信息(如节点负载状况,虚拟机运行状态和镜像模板库的容量状况等),以帮助系统开发人员、管理员优化系统运行。如系统中能够图形化地展示出各节点的负载情况,方便管理员迁移某些虚拟机以平衡系统负载。(3) Monitoring system. The virtual machine management module and the image management module are responsible for recording system information (such as node load status, virtual machine running status and capacity status of the mirror template library, etc.) to help system developers and administrators optimize system operation. For example, the system can graphically display the load status of each node, which is convenient for the administrator to migrate some virtual machines to balance the system load.
元数据管理设计实现Design and implementation of metadata management
概述overview
系统中的对象包括:课程信息、学生用户信息、教师信息、选课信息、课程主镜像文件信息、学生个性化镜像信息、物理节点信息、虚拟机运行实例信息等,这些存储在数据库表中的信息都被统称为系统中的元数据信息。元数据库管理模块不仅要管理如上所述的各类对象,还需要管理对象之间的关系,以支持虚拟机管理模块和镜像文件管理模块的正确运行。能够为前端的管理员用户接口提供较为完整的系统监控与管理机制,如系统资源状态监控,存储服务器容量监控以及网络流量监控等。The objects in the system include: course information, student user information, teacher information, course selection information, course master image file information, student personalized image information, physical node information, virtual machine running instance information, etc., which are stored in the database table are collectively referred to as metadata information in the system. The metabase management module not only manages the various objects mentioned above, but also needs to manage the relationship between objects, so as to support the correct operation of the virtual machine management module and the image file management module. It can provide a relatively complete system monitoring and management mechanism for the front-end administrator user interface, such as system resource status monitoring, storage server capacity monitoring, and network traffic monitoring.
数据库设计Database Design
系统中的表汇总如表1:The tables in the system are summarized in Table 1:
表2为学生用户表Table 2 is the student user table
表3为教师用户表Table 3 is the teacher user table
表4为物理节点表Table 4 is the physical node table
表5为开设课程表Table 5 is the curriculum schedule
表6为配置表Table 6 is the configuration table
表7为选课关系表Table 7 is the course selection relationship table
数据处理流程Data processing flow
学生、教师、课程students, teachers, courses
如图8所示,关于学生、教师以及课程的元数据,初始时都是由管理员完成的,后续在学生及教师的使用流程中,他们可以修改各自的信息,例如邮箱、登陆密码等。元数据库中所指示的课程主镜像名所对应的镜像文件实体是由教师或管理员组织到某个特定的文件路径下去的,命名的规则是按照教师ID/课程ID/镜像名字来组织的。As shown in Figure 8, the metadata about students, teachers, and courses are initially completed by administrators, and later in the use process of students and teachers, they can modify their own information, such as email addresses, login passwords, etc. The image file entity corresponding to the main image name of the course indicated in the metadata database is organized by the teacher or administrator to a specific file path, and the naming rules are organized according to the teacher ID/course ID/image name.
选课管理Course selection management
如图9所示,选课关系的维护是在学生、教师用户及课程记录被创建出来之后才开始维护的,即在创建课程时,需要保证课程主镜像文件已被部署到各物理节点上,同时保证在系统中存在某个教师用户,作为开设该门课程的主讲教师。系统为了方便管理员和教师的管理,开发了导入学生选课名单的功能,为某门课程提交学生选课名册即可一键式生成选课关系,生成选课关系还有最重要的一步即是为参与这门课程的学生,每个学生都具备基于该课程虚拟机基本镜像文件基础上生成的个性化增量镜像文件,并且将增量镜像文件按一定的规则组织起来,我们在系统中采取的命名规则为:学生ID/课程ID/学生增量镜像文件名。As shown in Figure 9, the maintenance of the course selection relationship starts after the student, teacher user, and course records are created. That is, when creating a course, it is necessary to ensure that the course master image file has been deployed on each physical node, and Make sure that there is a teacher user in the system as the main teacher who opens the course. In order to facilitate the management of administrators and teachers, the system has developed the function of importing student course selection list. Submitting the student course selection list for a certain course can generate course selection relationship with one click. The most important step in generating course selection relationship is to participate in this course. Each student has a personalized incremental image file based on the basic image file of the virtual machine of the course, and organizes the incremental image file according to certain rules. The naming rules we adopt in the system It is: student ID/course ID/student incremental image file name.
镜像元数据管理Image Metadata Management
镜像元数据的管理,这部分关系到学生在登陆认证后使用系统数据库中的记录来获取本人的课程虚拟机所涉及到的两个镜像文件的过程。The management of image metadata is related to the process that students use the records in the system database to obtain the two image files involved in their course virtual machines after login authentication.
基本镜像跟课程相关,虽然在创建课程时指定了基本镜像文件名,但实际上该镜像是否在每个物理节点上,我们是需要进行确认的。The basic image is related to the course. Although the basic image file name is specified when creating the course, we need to confirm whether the image is actually on each physical node.
同时生成增量镜像的过程,也是基于选课关系数据库表中的记录来生成的,也必须确保镜像文件是能与课程主镜像匹配并能支持虚拟机启动的。At the same time, the process of generating incremental mirroring is also based on the records in the course selection relational database table. It is also necessary to ensure that the mirroring file can match the main mirroring of the course and can support the startup of the virtual machine.
虚拟机元数据管理Virtual Machine Metadata Management
系统中关于节点的管理主要分为两类:一类是物理节点,管理员在初始化系统时,会将系统中所有的物理节点的ip进行配置,然后将其输入到物理节点的数据表中;第二类是对虚拟机节点的管理,虚拟机在运行时,依托于物理节点,因此可以根据libvirt等虚拟机管理接口,去发现在某个物理节点上都运行了哪些用户的什么虚拟机。为了便于管理系统中的运行时资源,本系统会跟踪和记录虚拟机的运行状态。The management of nodes in the system is mainly divided into two categories: one is physical nodes. When the administrator initializes the system, he will configure the ip of all physical nodes in the system, and then input them into the data table of the physical nodes; The second category is the management of virtual machine nodes. When a virtual machine is running, it depends on the physical node. Therefore, it is possible to discover which virtual machines of which users are running on a certain physical node according to the virtual machine management interface such as libvirt. In order to facilitate the management of runtime resources in the system, the system will track and record the running status of the virtual machine.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410171400.9A CN103984589A (en) | 2014-04-25 | 2014-04-25 | Virtual machine-based lab practice environment establishment method for realizing computer experiment teaching |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410171400.9A CN103984589A (en) | 2014-04-25 | 2014-04-25 | Virtual machine-based lab practice environment establishment method for realizing computer experiment teaching |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN103984589A true CN103984589A (en) | 2014-08-13 |
Family
ID=51276581
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410171400.9A Pending CN103984589A (en) | 2014-04-25 | 2014-04-25 | Virtual machine-based lab practice environment establishment method for realizing computer experiment teaching |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103984589A (en) |
Cited By (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104298559A (en) * | 2014-09-30 | 2015-01-21 | 深圳市深信服电子科技有限公司 | Method and device for virtualizing physical host system |
| CN104702624A (en) * | 2015-03-27 | 2015-06-10 | 深圳市研唐科技有限公司 | Method and system for logging virtual machine based on Cloud Stack platform |
| CN104932939A (en) * | 2015-07-03 | 2015-09-23 | 成都怡云科技有限公司 | Cloud desktop system supporting system migration |
| CN106599409A (en) * | 2016-11-29 | 2017-04-26 | 辽宁科技大学 | A Virtual Industrial Control Experiment System |
| CN106652041A (en) * | 2016-12-21 | 2017-05-10 | 武汉大学 | HTML5-based three-dimensional virtual wiring method |
| CN107195211A (en) * | 2017-06-15 | 2017-09-22 | 北京大生在线科技有限公司 | Online prison class system based on bypass |
| CN107341745A (en) * | 2017-06-16 | 2017-11-10 | 浙江网新恒天软件有限公司 | A kind of colleges and universities' Experimental Establishment intelligent cloud management system based on cloud computing |
| CN107408064A (en) * | 2015-03-20 | 2017-11-28 | 亚马逊技术股份有限公司 | Execute commands inside a virtual machine instance |
| CN108898903A (en) * | 2018-06-07 | 2018-11-27 | 广州大学 | A kind of general CTF network security talent training system and setting a question based on this system and do topic method at method |
| CN109062654A (en) * | 2018-09-04 | 2018-12-21 | 广东小天才科技有限公司 | Interactive learning method and system |
| CN109408077A (en) * | 2018-10-23 | 2019-03-01 | 嘉兴南洋职业技术学院 | A kind of colleges and universities' real training software quick deployment method based on virtual machine |
| CN109636691A (en) * | 2018-12-18 | 2019-04-16 | 南京邮电大学 | An online experimental teaching platform and implementation method based on docker |
| CN110737506A (en) * | 2019-09-10 | 2020-01-31 | 江苏中云科技有限公司 | virtual machine image version management method |
| CN111045787A (en) * | 2019-12-03 | 2020-04-21 | 广州西麦科技股份有限公司 | Rapid continuous experiment method and system |
| CN112558998A (en) * | 2020-12-28 | 2021-03-26 | 慧科教育科技集团有限公司 | Experiment content research and development platform |
| CN112767207A (en) * | 2021-01-29 | 2021-05-07 | 江苏省徐州财经高等职业技术学校 | Software defined network experiment teaching system and teaching method based on container |
| CN113053185A (en) * | 2021-03-24 | 2021-06-29 | 重庆电子工程职业学院 | Software teaching model based on digital media |
| CN114531451A (en) * | 2021-12-30 | 2022-05-24 | 北京大学 | double-IP management method for computer of computer room |
| CN115002075A (en) * | 2021-12-30 | 2022-09-02 | 北京大学 | Multi-machine room on-duty teaching management method under system double-IP network environment |
| CN118227596A (en) * | 2024-05-24 | 2024-06-21 | 山西能源学院 | Machine room laboratory supervision control method and device, electronic equipment and medium |
-
2014
- 2014-04-25 CN CN201410171400.9A patent/CN103984589A/en active Pending
Cited By (30)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104298559A (en) * | 2014-09-30 | 2015-01-21 | 深圳市深信服电子科技有限公司 | Method and device for virtualizing physical host system |
| CN104298559B (en) * | 2014-09-30 | 2018-03-02 | 深信服科技股份有限公司 | The method and device of physical host system virtualization |
| US10768955B1 (en) | 2015-03-20 | 2020-09-08 | Amazon Technologies, Inc. | Executing commands within virtual machine instances |
| CN107408064A (en) * | 2015-03-20 | 2017-11-28 | 亚马逊技术股份有限公司 | Execute commands inside a virtual machine instance |
| CN107408064B (en) * | 2015-03-20 | 2020-10-30 | 亚马逊技术股份有限公司 | A method of executing a command within a virtual machine instance and a system for implementing the method |
| CN104702624A (en) * | 2015-03-27 | 2015-06-10 | 深圳市研唐科技有限公司 | Method and system for logging virtual machine based on Cloud Stack platform |
| CN104932939A (en) * | 2015-07-03 | 2015-09-23 | 成都怡云科技有限公司 | Cloud desktop system supporting system migration |
| CN106599409A (en) * | 2016-11-29 | 2017-04-26 | 辽宁科技大学 | A Virtual Industrial Control Experiment System |
| CN106599409B (en) * | 2016-11-29 | 2019-10-29 | 辽宁科技大学 | Virtual industrial control experiment system |
| CN106652041A (en) * | 2016-12-21 | 2017-05-10 | 武汉大学 | HTML5-based three-dimensional virtual wiring method |
| CN107195211A (en) * | 2017-06-15 | 2017-09-22 | 北京大生在线科技有限公司 | Online prison class system based on bypass |
| CN107341745A (en) * | 2017-06-16 | 2017-11-10 | 浙江网新恒天软件有限公司 | A kind of colleges and universities' Experimental Establishment intelligent cloud management system based on cloud computing |
| CN108898903A (en) * | 2018-06-07 | 2018-11-27 | 广州大学 | A kind of general CTF network security talent training system and setting a question based on this system and do topic method at method |
| CN109062654A (en) * | 2018-09-04 | 2018-12-21 | 广东小天才科技有限公司 | Interactive learning method and system |
| CN109408077B (en) * | 2018-10-23 | 2022-04-22 | 嘉兴南洋职业技术学院 | A rapid deployment method of college training software based on virtual machine |
| CN109408077A (en) * | 2018-10-23 | 2019-03-01 | 嘉兴南洋职业技术学院 | A kind of colleges and universities' real training software quick deployment method based on virtual machine |
| CN109636691B (en) * | 2018-12-18 | 2022-08-16 | 南京邮电大学 | Docker-based online experiment teaching platform and implementation method |
| CN109636691A (en) * | 2018-12-18 | 2019-04-16 | 南京邮电大学 | An online experimental teaching platform and implementation method based on docker |
| CN110737506A (en) * | 2019-09-10 | 2020-01-31 | 江苏中云科技有限公司 | virtual machine image version management method |
| CN111045787A (en) * | 2019-12-03 | 2020-04-21 | 广州西麦科技股份有限公司 | Rapid continuous experiment method and system |
| CN111045787B (en) * | 2019-12-03 | 2023-10-13 | 广州西麦科技股份有限公司 | Rapid continuous experiment method and system |
| CN112558998A (en) * | 2020-12-28 | 2021-03-26 | 慧科教育科技集团有限公司 | Experiment content research and development platform |
| CN112767207A (en) * | 2021-01-29 | 2021-05-07 | 江苏省徐州财经高等职业技术学校 | Software defined network experiment teaching system and teaching method based on container |
| CN113053185A (en) * | 2021-03-24 | 2021-06-29 | 重庆电子工程职业学院 | Software teaching model based on digital media |
| CN113053185B (en) * | 2021-03-24 | 2022-07-19 | 重庆电子工程职业学院 | Software teaching model based on digital media |
| CN115002075A (en) * | 2021-12-30 | 2022-09-02 | 北京大学 | Multi-machine room on-duty teaching management method under system double-IP network environment |
| CN114531451A (en) * | 2021-12-30 | 2022-05-24 | 北京大学 | double-IP management method for computer of computer room |
| CN114531451B (en) * | 2021-12-30 | 2023-12-05 | 北京大学 | A method for dual IP management of computer rooms |
| CN118227596A (en) * | 2024-05-24 | 2024-06-21 | 山西能源学院 | Machine room laboratory supervision control method and device, electronic equipment and medium |
| CN118227596B (en) * | 2024-05-24 | 2024-07-23 | 山西能源学院 | Machine room laboratory supervision control method and device, electronic equipment and medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103984589A (en) | Virtual machine-based lab practice environment establishment method for realizing computer experiment teaching | |
| US20220261419A1 (en) | Provisioning and managing replicated data instances | |
| CN104580519B (en) | A kind of method of rapid deployment openstack cloud computing platforms | |
| Avetisyan et al. | Open cirrus: A global cloud computing testbed | |
| CN103019802B (en) | A kind of virtual machine management method and platform | |
| Fifield et al. | OpenStack Operations Guide: Set up and manage your openstack cloud | |
| CN105809058A (en) | Teaching resource library management system | |
| Eadline | Hadoop 2 Quick-Start Guide: Learn the Essentials of Big Data Computing in the Apache Hadoop 2 Ecosystem | |
| CN109150964B (en) | Migratable data management method and service migration method | |
| CN206149327U (en) | An information cloud management platform and enterprise information system | |
| CN115757467A (en) | Django-based multi-terminal docking service system and basic environment construction method thereof | |
| CN113312128B (en) | A desktop cloud system that integrates microservices and IDV architecture | |
| Xu | Digital English teaching resource sharing system based on logical database | |
| Abuzaghleh et al. | Implementing an affordable high-performance computing for teaching-oriented computer science curriculum | |
| CN110007932B (en) | A method for automatic deployment of big data processing system based on local area network | |
| Ahmed | Mastering Proxmox | |
| Coulter et al. | Implementation of simple XSEDE-like clusters: Science enabled and lessons learned | |
| CN115643249A (en) | Construction method of AI teaching practical training programming platform based on Web page | |
| Mistry et al. | Microsoft SQL Server 2012 Management and Administration | |
| CN105681453B (en) | Cloud computing-based server virtualization cluster method, device and system | |
| Quintero et al. | Implementing an IBM InfoSphere BigInsights Cluster using Linux on Power | |
| SPS | Sap hana master guide | |
| Moretti et al. | A Simple and Resource‐efficient Setup for the Computer‐aided Drug Design Laboratory | |
| Chao | Virtualization and Private Cloud with VMware Cloud Suite | |
| Ventresco | Implementing VMware Horizon 7 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140813 |