Cloud Computing and Big Data-Virtualization and Container Technology Question Bank

Chapter 2 Virtualization and Container Technology Exercises

2.1 multiple choice questions

1. Typical virtualization architecture does not include (D).

A.Host operating system b. virtual machine

C.virtualization layer d. Virtual Memory

2. The research purposes of virtualization technology include (D).

A.Reduce management costs b. Enhanced portability

C.Improve software development efficiency D. All of the above

3. The crash or failure of a virtual machine on the same physical host will not affect other virtual machines, which is mainly due to the (A) feature of virtualization technology.

A.quarantine b. Package C.hardware independence d. Partition

4. Full virtualization technology, paravirtualization technology and operating system level virtualization technology are classified from the perspective of virtualization (C).

A.Scope of action b. cost c. Realize D.user target audience

5. Which of the following does not belong to paravirtualization technology is (A).

A.AMD-V          B.Hyper-V     C.Xen               D.PowerVM

6. The memory virtualization technology in Linux KVM does not include (C).

A.memory balloon b. Huge pages c. vMotion D.kernel page merge

7. The implementation methods of storage virtualization include (D).

A.Host-based b. Based on the storage device C. web-based d. All of the above

8. Which of the following is not an advantage of desktop virtualization is (B).

A.high efficiency b. high performance c. stability d. safety

9. Which of the following does not belong to the memory information migration method (C).

A.Pre-copy migration B. Post-replication migration C. Dirty page migration D. CR/TR-Motion

10. Which of the following options does not belong to typical virtualization software (   D   ).

A.Xen            B.vSphere        C.KVM                  D.Eureka

11. In the same host machine, containers can access each other, but the cross-host access performance is poor, and the solution does not include (A).

A.NAT B.Weave C.overlay network d. Open vSwitch Network

12. Compared with virtual machines, the following statement about the current container is wrong (B).

A.Containers are generally virtualized at the operating system level     

B.Containers are more secure than virtual machines       

C.Container startup time is faster    

D.Container elastic allocation allocation, resources can be added without closing the container

13. Docker can roll back to the previous version of the current image, which can avoid damage to the entire environment due to the completion of the upgrade of some components. This is the (B) function of Docker.

A.Continuous integration b. version control c. portability d. safety

14. The main functions of CGroup in Docker do not include (C).

A.Limit resource usage b. priority control c. access control d. Billing

15. Compared with Swarm, the advantages of Kubernetes include (D).

A.Advanced design thinking b. O&M is simpler

C.Deployment is more convenient and automated D. All of the above

2.2 Fill in the Blank

1. The core of the virtualization layer is (Hypervisor, virtual machine monitor or VMM).

2. There are two types of server virtualization architectures (host virtualization) and (bare metal virtualization).

3. Employees who want to access the resources of the enterprise internal network at home can use (virtual private network/VPN).

4. Virtual machine migration includes (network information migration), (storage information migration) and (memory information migration).

5. Compared with virtual machines, Docker cancels (Hypervisor layer) and (Guest OS layer), and uses (Docker Engine) for scheduling and isolation.

6. The core components of Docker mainly include (container or Container), (mirror or Images) and (warehouse or Repositories).

7. The largest public warehouse in Docker is (Docker Hub).

8. The commonly used scheduling tools for Docker are (Swarm) and (Kubernetes or K8s).

2.3 Short answer questions

1. Please briefly describe the characteristics and advantages of virtualization technology.

answer:

    Characteristics of virtualization technology include:

  1. partition. Partitioning means that the virtualization layer divides the resources of the physical host for multiple virtual machines, and each virtual machine can run a separate operating system, which can be the same or different. Users can run multiple applications on one physical host, and each operating system can only see the virtual hardware provided by the virtualization layer, and feel that they are running on a dedicated physical host.
  2. isolation. Isolation means that the virtual machines on the same physical host are isolated from each other, and the crash or failure of one virtual machine will not affect other virtual machines on the same physical host; physical resources can also be controlled to provide performance Isolation, users can specify the minimum and maximum usage of physical resources for each virtual machine, to ensure that a virtual machine will not occupy all the physical resources and make other virtual machines in the same system have no physical resources available.
  3. encapsulation. Encapsulation means storing the entire virtual machine, including its memory state, BIOS configuration, CPU state, I/O device state, etc., in the file system. Users only need to copy files to copy, save, and move virtual machines as needed data in the machine.
  4. Hardware independent. Hardware independence means that the virtual machine and the physical host are independent of each other. The virtual machine runs on the virtualization layer and can only access the virtual hardware provided by the virtualization layer. Break down the constraints between operating systems and physical hosts, and applications and operating systems.

Advantages of virtualization technology include:

  1. Efficient use of physical resources. The use of virtualization technology can enable a physical host in the cloud computing data center to run multiple virtual machines to realize multi-tenant sharing of physical resources, thereby improving the utilization of physical hosts and reducing the total cost of hardware.
  2. Better fault tolerance. Virtual machines can be migrated from one node to another for non-stop operation. If a physical host, operating system, or application fails, the virtual machine can be migrated to another physical host to continue running.
  3. Improve usability. When Web services, email services, and database service programs run on the same physical host, there is a possibility that one application may interfere with another, and even cause the system to crash. Utilizing different virtual machines to host different services will reduce mutual interference between applications, thereby improving system availability.
  4. Simplify server creation and management. It only takes a few minutes to create a virtual server for users to use through virtualization technology. In contrast, the cost of purchasing a physical host by the user is obviously much higher, and installing the operating system and applications is very time-consuming. It's also easier to manage dozens of virtual servers than a dozen physical hosts.
  5. Save system energy consumption. Based on virtualization technology, the cloud computing system integrates various resources of the cloud computing data center into a unified virtual resource pool, and deploys virtual machines on different physical hosts to realize effective and unified management and management of large-scale physical resources. use. By properly deploying virtual machines on physical hosts and using virtual machine dynamic migration technology, virtual machines can be aggregated to shut down idle data nodes, so as to meet the current load requirements while minimizing the number of physical hosts required, and reduce While the energy consumption of the cloud computing data center is guaranteed, QoS and service level agreement (Service Level Agreement, SLA) are guaranteed.

2. Please briefly describe the process of pre-copy memory information migration.

answer:

  1. pre-migration. Select a target host as the migration target.
  2. Reserve resources. Send a migration request to the target host and confirm whether the required resources exist in the target host.
  3. pre-copy. Copy all memory pages of the virtual machine from the source host to the target host.
  4. Copy iteratively. Iteratively copy pages that were modified in the previous round and have not been modified so far in the current round to the target host.
  5. Downtime replication. Copy the remaining unsynchronized memory pages of the virtual machine and the running information of the virtual machine system to the target host.
  6. start up. Start the migrated virtual machine on the target host.

3. What problems can vSphere virtualization software solve through VMotion technology?

answer:

vSphere virtualization software uses VMotion technology to dynamically migrate virtual machines to other servers when the server needs maintenance and upgrading, and ensures the external services of each virtual machine through memory replication technology, realizing "stop physical hardware, non-stop applications" . Once a server fails, the virtual machine can be re-enabled on other servers in time to ensure the stability of the virtual machine.

4. Please briefly compare container and virtual machine technologies from the perspectives of principle, resource management, startup time, resource occupation, security, and deployment.

answer:

container

virtual machine

principle

Share the kernel with the host, all containers run on the container engine, the container does not have an independent operating system, all containers share the operating system, and isolate at the process level

Each virtual machine is built on virtual hardware, providing instruction-level virtualization, and each virtual machine has an independent operating system

resource management

Elastic resource allocation, resources can be added without closing the container, and there is no need to reallocate the size of the data volume

The virtual machine needs to be restarted, and the operating system of the virtual machine needs to process newly added resources, such as the disk needs to be repartitioned

Start Time

faster

slower

resource usage

Containers require fewer resources. Containers are virtualized at the operating system level and interact with the kernel with little performance loss. The container is lighter, and the architecture of the container allows it to share a kernel and share the application library, occupying a very small memory. In the same hardware environment, the number of images running in the container is far more than the number of virtual machines, and the utilization rate of the system is very high

The virtual machine is virtualized at the hypervisor layer and the kernel layer, which is equivalent to virtualizing a computer and takes up more resources

safety

Containers are less secure. The user root authority of the container is the same as the root authority of the host machine. Once the user in the container is upgraded from the ordinary user authority to the root authority, it directly has the root authority of the host machine.

The root authority of the virtual machine user and the root authority of the host machine are separated, and the virtual machine uses hardware isolation technology, which can prevent the virtual machine from breaking through the root authority of the host machine and interacting with each other

deploy

The creation of containers is at the second level, and its fast iteration determines that a lot of time can be saved in development, testing and deployment

Virtual machines can achieve consistency in environment delivery through mirroring, but mirroring distribution is difficult to systematize

5. Please briefly describe the benefits that Docker brings to user applications.

answer:

  1. Simplify configuration. Docker simplifies the running deployment configuration, and the same configuration can be applied to different environments, reducing the requirements for hardware and the degree of coupling between application environments.
  2. Code pipeline management. From the developer's device to the final deployment in the production environment, the code needs to go through many different intermediate environments. Docker provides the application with a consistent environment from development to launch, allowing the code to achieve pipeline management.
  3. Consolidate server resources. Docker can effectively integrate server resources, enabling multiple container instances to effectively share idle resources, and has better resource integration performance than virtual machines.
  4. Multi-user support. Docker can create an isolated environment for multiple application layer instances of each user, and use the lightweight of Docker to support the sharing of resources and concurrent operation of multiple user containers on the server.
  5. Rapid deployment. Before virtual machines, it took several days to introduce new hardware resources. Virtualization technology shortened this time to minutes; Docker created a container for the process without starting the operating system, and shortened this time to seconds again.

2.4 Answer questions

1. Please analyze the process of CPU virtualization and CPU hardware-assisted virtualization.

answer:

In the CPU instruction set of the X86 system, 4 CPU permission levels (Ring0, Ring1, Ring2, Ring3) are provided, among which Ring0 is the highest level and Ring3 is the lowest level. For the operating system to directly access hardware and memory, its code needs to run on the highest level Ring0, while the application code runs on the lowest level Ring3. If you want to access hardware and memory, implement device access, file read and write and other operations, you must execute related system calls to switch the CPU's operating level from Ring3 to Ring0, and then switch back after completing the operation. VMM is essentially a Host OS running on Ring0, a guest operating system running on Ring1, and other upper-layer applications running on Ring2 and Ring3.

In order to improve the performance of CPU virtualization, CPU hardware-assisted virtualization introduces a new mode based on the Ring mode, that is, the virtual machine extension (Virtual Machine Extension, VMX) mode. VMX mode includes root operation (VMX Root Operation) mode and non-root operation (VMX Non-Root Operation) mode. Since there are privilege levels from Ring0 to Ring3 in both modes, when describing an application, in addition to describing Which privilege level it belongs to, and also indicate whether it is in root or non-root mode of operation. The advantage of introducing the VMX mode is that the guest operating system runs on Ring0, which means that its core instructions can be directly sent to the hardware layer for execution; while the execution of sensitive instructions such as privileged instructions is directly switched to the VMM for execution by hardware assistance. Performed automatically, the application is unaware, and performance is improved.

2. A video service website provides video services based on a virtualized cloud computing platform. Assuming that when a user is watching a video, the server that provides the video service fails, but for the user, there is no impact, the service will not be interrupted, and the user continues to watch the video smoothly, please analyze the possible reasons.

answer:

As shown in the figure above, the user watches streaming video on virtual machine 1 in server 1 through the network. If there is a problem with server 1 or virtual machine 1, the virtual machine needs to be migrated to convert the virtual machine into a virtualized image file. According to the migration strategy, server 2 is selected as the target host to migrate the virtual machine, and the virtualized image file is copied. During the migration process, the user will not notice service interruption.

3. User A executes four command lines of docker pull, docker run, docker build and docker push successively in Docker, and the downloaded image comes with the old version of Mysql database software; after that, user B wants to use the same development program as user A Environment, please describe the execution process of the command line, the collaboration process of Docker-related components in the process, and the commands that user B should execute.

answer:

docker pull: download the specified image file from a remote warehouse (such as Docker Hub) to the local server;

docker run: Run the image file downloaded from the warehouse and create the corresponding container;

docker build: In the created container, update the Mysql database software and package it into a new image;

docker push: Upload the created image to the warehouse.

User B executes docker pull to download the image file uploaded by user A, and executes docker run to create a container.

Guess you like

Origin blog.csdn.net/m0_63394128/article/details/126567928