原文:https://blog.csdn.net/hzh2007/article/details/7292030
在《Xen Virtualization》中對“Xen domain”作了如下定義:
Xen domain is a specific instance of a Xen virtual machine running on a specific physical piece of hardware.
意思是說domain是運行在物理硬件上的Xen虛擬機的一個實例。通俗點說就是一個Xen虛擬出來的虛擬機實例,不要忘記了Xen是一個可以創(chuàng)建和管理虛擬機的軟件。這里不說“Xen”是虛擬機軟件,就像我們平時說虛擬機就說VMWare。因為虛擬機是Xen虛擬出來的產(chǎn)物,不是Xen本身。
關(guān)于domain,《Xen virtualization》中還說:
Xen supports two basic types of domains with different uses and capabilities.
這說明domain是Xen虛擬的產(chǎn)物,而Domain0是Xen虛擬出的產(chǎn)物中的一個最特殊的一個。其特殊之處在后面會提到。
Xen有能力虛擬出虛擬機,那么有相關(guān)的方法管理這些虛擬機的。
《Xen virtualzation》中說:
Xen manages access to memory and hardware resources through a combination of its hypervisor and a specially privileged Xen-modified kernel that is used to manage,monitor ,and administer all other Xen virtual machines running on a specific piece of hardware.This specially privileged Xen kernel is known as domain0.
上面清楚的說,Xen是借助管理程序(Hypervisor)和Domain0管理內(nèi)存和硬件資源的訪問的。
Hypervisor和Domain都有管理內(nèi)存和硬件資源的訪問的。而需要訪問內(nèi)存和硬件資源的自然就是虛擬機了,所以就達到了管理其他虛擬機的目的了。Domain0的管理功能就是其特殊之處。
那么這兩個東西具體管理著些什么呢?又是怎么分工管理的呢?
繼續(xù),
在《Xen virtualzation》中說:
One of the goals of Xen has always been to separate implementation requirements from policy decisions, leaving administrative and configuration options to the domain0 system rather than hardwiring them into the hypervisor. Loe-level CPU and memory allocation and management is done by the hypervisor because this is a physical requirement for running multiple virtual machines on a single physical system. The hypervisor is responsible for creating , managing ,and deleting the virtual network interfaces and virtual block devices associated with each guest domain.
上面的意思大致是說“Xen把策略的制定和策略的實施分離,把管理和配置工作交給Domain0進行,而不將管理和配置工作交給Hypervisor實施”。翻譯的比較勉強,通俗的說就是 “虛擬機的管理工作分為兩類,一類是確定如何管理,一類是確定管理之后的實施。Domain0進行第一類,Hypervisor進行第二類?!本褪钦f,我們在Domain0中可以設(shè)置對虛擬機的管理參數(shù),Hypervisor按照我們做Domain0中設(shè)置的參數(shù)去設(shè)置虛擬機。
這就是Hypervisor和Domain0的關(guān)系。
總結(jié):Domain0是Xen虛擬化出來管理和配置其他虛擬機的,而Hypervisor則負責(zé)對虛擬機執(zhí)行Domain0設(shè)置的參數(shù)。