Marco Linux notes--vmware Workstation system virtualization

Source: Internet
Author: User


From the point of view of any operating system, it considers itself to be able to use all the hardware, and it is responsible for managing all the hardware. Therefore, the operating system sees the CPU is the full amount of CPU, that is, the entire CPU time slice. For memory, it can see all the contiguous memory space, this memory space must start from 0x0000. In the 32Bit system, about 1MB of space is used for the BIOS, 16MB is used for DMA. If it is a 64bit system, there is 1Gb space needed to give DMA. Although 1GB of space is allocated to DMA, this space is still available. For IO devices, the operating system should be able to see all IO devices, and each IO device should also be associated to one of the interrupt pins and ports on the CPU used by the current kernel.


Then as described above, in terms of the physical address of the hardware, the physical address of the memory space can be divided into two segments, the address of the physical memory is called PA, and each process sees the address we call VA, that is, the linear address is called the virtual address.


With the above premise, let's talk about virtualization technology in Vmwareworkstation. We know that VMware Workstation is installed in our operating system and is a virtual hardware virtualization technology. On top of our operating system, we allow a lot to be done, and the VMware Workstation is one of those processes. What happens when we install the software? We need to run some virtual machines on top of him. VMware Workstation is here on our operating system, simulating a bunch of hardware for us, and none of these hardware devices is a standalone platform. So we can install the operating system on top of these extra hardware. So, the architecture becomes a software that runs on top of our operating system, running some operating systems on top of the software. So the problem comes up? We start by saying that every operating system thinks it has control over all of its hardware and is exclusive. But in our current architecture, our CPU time slices are first of all our own operating systems are assigned to the applications running above, and vmwareworkstation belongs to these applications. Naturally, VMware Workstation is just allocating a bit of CPU time slices. Not to mention the virtual machines running on top of VMware workstation. So not a virtual machine can only get a small portion of the CPU time slice. At the same time, we also know that every operating system when running, are divided into two modes, namely the user state and the kernel state. If the virtual machine above the VMware workstation is turned on, there are three modes in our architecture. First of all, our own operating system has a user mode and kernel mode. In user mode, the virtual machine running VMware Workstation has user mode and kernel mode. So this is kernel mode-kernel mode-user mode. Moreover, each virtual machine uses a continuous linear address space. But VMware workstation the kernel of the above virtual machine is not the real physical address space, but our own operating system provided to the VMware Workstation, from the VMware Workstation virtual address space. As we described earlier, the physical address space 0x0000 is actually in use and is used by its own operating system, and part of it is assigned to the DMA and BIOS, which is left to the kernel for its own use before the rest of the space is used for the process. Therefore, the actual physical address is assigned to the process, the start address is not 0 of the address segment space. So it's obvious that VMware workThe memory address space used by virtual machines on station is unlikely to start with a real 0 address segment space. So on the VMware workstation, the memory address space used by the virtual machine starts at 0, which is the VMware workstation to virtual machines that are spoofed by the VMware Workstation simulation address segment. The virtual machine's real memory data is stored inside the real physical address space store. In fact, the virtual machine to the real physical address space will need to be converted 2 times. So the performance is very poor.


CPU virtualization is allocated and dispatched according to time slices, memory is virtual and real address translation, IO device is analog. So how does the disk of the virtual machine on the VMware Workstation be associated with our local disk, and how to simulate it?


This requires the creation of a local loopback device on the real hard disk, a part of the hard disk space, the creation of a local loopback device, while the device is in the form of a file and associated with the virtual disk of VMware Workstation. When a virtual machine stores data in a virtual disk, VMware Workstation is required to store its data in a local real file. Obviously, the disk performance of the virtual machine is not as good as the local real hard drive, and the intermediate IO needs to be transformed by VMware Workstation. To make the performance better, we can actually use the storage, which can be read and accessed directly on the VMware workstation using the storage mounted LUNs. However, because it is built on top of our operating system, only iSCSI-enabled storage devices are used for mounting.


This article is from "I take fleeting chaos" blog, please be sure to keep this source http://tasnrh.blog.51cto.com/4141731/1729311

Marco Linux notes--vmware Workstation system virtualization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.