Chinaunix首页 | 论坛 | 博客
  • 博客访问: 197330
  • 博文数量: 77
  • 博客积分: 1749
  • 博客等级: 上尉
  • 技术积分: 810
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-28 18:27
文章分类
文章存档

2012年(28)

2011年(49)

分类: 虚拟化

2011-12-09 22:50:46

Xenstore is the mechanism by which control-plane activities occur.
These activities include:
• Setting up shared memory regions and event channels for use with the split device drivers.
• Notifying the guest of control events (e.g. balloon driver requests)
• Reporting back status information from the guest (e.g. performance-related statistics, etc).
The store is arranged as a hierarchical collection of key-value pairs. Each domain has a directory hierarchy containing data related to its configuration. Domains are permitted to register for notifications about changes in subtrees of the store, and to apply changes to the store transactionally.

A few principles govern the operation of the store:
• Domains should only modify the contents of their own directories.
• The setup protocol for a device channel should simply consist of entering the configuration data into the store.
• The store should allow device discovery without requiring the relevant device drivers to be loaded: a Xen “bus” should be visible to probing code in the guest.
• The store should be usable for inter-tool communications, allowing the tools themselves to be decomposed into a number of smaller utilities, rather than a single monolithic entity. This also facilitates the development of alternate user interfaces to the same functionality.

Store layout
There are three main paths in XenStore:
/vm stores configuration information about domain
/local/domain stores information about the domain on the local node (domid, etc.)
/tool stores information for the various tools
The /vm path stores configuration information for a domain. This information doesn’t change and is indexed by the domain’s UUID. A /vm entry contains the
following information:
uuid uuid of the domain (somewhat redundant)
on_reboot the action to take on a domain reboot request (destroy or restart)
on_poweroff the action to take on a domain halt request (destroy or restart)
on_crash the action to take on a domain crash (destroy or restart)
vcpus the number of allocated vcpus for the domain
memory the amount of memory (in megabytes) for the domain Note: appears to sometimes be empty for domain-0
vcpu_avail the number of active vcpus for the domain (vcpus - number of disabled vcpus)
name the name of the domain

/vm//image/
The image path is only available for Domain-Us and contains:
ostype identifies the builder type (linux or vmx)
kernel path to kernel on domain-0
cmdline command line to pass to domain-U kernel
ramdisk path to ramdisk on domain-0

/local
The /local path currently only contains one directory, /local/domain that is indexed by domain id. It contains the running domain information.
The reason to have two storage areas is that during migration, the uuid doesn’t change but the domain id does. The /local/domain directory can be created and populated before finalizing the migration enabling localhost to localhost migration.

/local/domain/
This path contains:
cpu time xend start time (this is only around for domain-0)
handle private handle for xend
name see /vm
on reboot see /vm
on poweroff see /vm
on crash see /vm
vm the path to the VM directory for the domain
domid the domain id (somewhat redundant)
running indicates that the domain is currently running
memory the current memory in megabytes for the domain (empty for domain-0?)
maxmem KiB the maximum memory for the domain (in kilobytes)
memory KiB the memory allocated to the domain (in kilobytes)
cpu the current CPU the domain is pinned to (empty for domain-0?)
cpu weight the weight assigned to the domain
vcpu avail a bitmap telling the domain whether it may use a given VCPU
online vcpus how many vcpus are currently online
vcpus the total number of vcpus allocated to the domain
console/ a directory for console information
ring-ref the grant table reference of the console ring queue
port the event channel being used for the console ring queue (local port)
tty the current tty the console data is being exposed of
limit the limit (in bytes) of console data to buffer
backend/ a directory containing all backends the domain hosts
vbd/ a directory containing vbd backends
/ a directory containing vbd’s for domid
/ a directory for a particular virtual-device on
domid
frontend-id domain id of frontend
frontend the path to the frontend domain
physical-device backend device number
sector-size backend sector size
info 0 read/write, 1 read-only (is this right?)
domain name of frontend domain
params parameters for device
type the type of the device
dev the virtual device (as given by the user)
node output from block creation script
vif/ a directory containing vif backends
/ a directory containing vif’s for domid
/ a directory for each vif
frontend-id the domain id of the frontend
frontend the path to the frontend
mac the mac address of the vif
bridge the bridge the vif is connected to
handle the handle of the vif
script the script used to create/stop the vif
domain the name of the frontend
vtpm/ a directory containing vtpm backends
/ a directory containing vtpm’s for domid
/ a directory for each vtpm
frontend-id the domain id of the frontend
frontend the path to the frontend
instance the instance of the virtual TPM that is used
pref instance the instance number as given in the VM configura-
tion file; may be different from instance
domain the name of the domain of the frontend
device/ a directory containing the frontend devices for the domain
vbd/ a directory containing vbd frontend devices for the domain
/ a directory containing the vbd frontend for virtual-
device
virtual-device the device number of the frontend device
backend-id the domain id of the backend
backend the path of the backend in the store (/local/domain path)
ring-ref the grant table reference for the block request ring queue
event-channel the event channel used for the block request ring
queue
vif/ a directory containing vif frontend devices for the domain
/ a directory for vif id frontend device for the domain
backend-id the backend domain id
mac the mac address of the vif
handle the internal vif handle
backend a path to the backend’s store entry
tx-ring-ref the grant table reference for the transmission ring
queue
rx-ring-ref the grant table reference for the receiving ring
queue
event-channel the event channel used for the two ring queues
vtpm/ a directory containing the vtpm frontend device for the domain
a directory for vtpm id frontend device for the domain
backend-id the backend domain id
backend a path to the backend’s store entry
ring-ref the grant table reference for the tx/rx ring
event-channel the event channel used for the ring
device-misc/ miscellaneous information for devices
vif/ miscellaneous information for vif devices
nextDeviceID the next device id to use
security/ access control information for the domain
ssidref security reference identifier used inside the hypervisor
access control/ security label used by management tools
label security label name
policy security policy name
store/ per-domain information for the store
port the event channel used for the store ring queue
ring-ref - the grant table reference used for the store’s communication chan-
nel
image - private xend information






阅读(968) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~