Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Virtualization Guide
  1. Preface
  2. I Introduction
    1. 1 Virtualization technology
    2. 2 Virtualization scenarios
    3. 3 Introduction to Xen virtualization
    4. 4 Introduction to KVM virtualization
    5. 5 Virtualization tools
    6. 6 Installation of virtualization components
  3. II Managing virtual machines with libvirt
    1. 7 libvirt daemons
    2. 8 Preparing the VM Host Server
    3. 9 Guest installation
    4. 10 Basic VM Guest management
    5. 11 Connecting and authorizing
    6. 12 Advanced storage topics
    7. 13 Configuring virtual machines with Virtual Machine Manager
    8. 14 Configuring virtual machines with virsh
    9. 15 Xen to KVM migration guide
  4. III Hypervisor-independent features
    1. 16 Disk cache modes
    2. 17 VM Guest clock settings
    3. 18 libguestfs
    4. 19 QEMU guest agent
    5. 20 Software TPM emulator
    6. 21 Creating crash dumps of a VM Guest
  5. IV Managing virtual machines with Xen
    1. 22 Setting up a virtual machine host
    2. 23 Virtual networking
    3. 24 Managing a virtualization environment
    4. 25 Block devices in Xen
    5. 26 Virtualization: configuration options and settings
    6. 27 Administrative tasks
    7. 28 XenStore: configuration database shared between domains
    8. 29 Xen as a high-availability virtualization host
    9. 30 Xen: converting a paravirtual (PV) guest into a fully virtual (FV/HVM) guest
  6. V Managing virtual machines with QEMU
    1. 31 QEMU overview
    2. 32 Setting up a KVM VM Host Server
    3. 33 Guest installation
    4. 34 Running virtual machines with qemu-system-ARCH
    5. 35 Virtual machine administration using QEMU monitor
  7. VI Troubleshooting
    1. 36 Integrated help and package documentation
    2. 37 Gathering system information and logs
  8. Glossary
  9. A Configuring GPU Pass-Through for NVIDIA cards
  10. B GNU licenses
Applies to openSUSE Leap 15.5

28 XenStore: configuration database shared between domains Edit source

This section introduces basic information about XenStore, its role in the Xen environment, the directory structure of files used by XenStore, and the description of XenStore's commands.

28.1 Introduction Edit source

XenStore is a database of configuration and status information shared between VM Guests and the management tools running in Dom0. VM Guests and the management tools read and write to XenStore to convey configuration information, status updates, and state changes. The XenStore database is managed by Dom0 and supports simple operations, such as reading and writing a key. VM Guests and management tools can be notified of any changes in XenStore by watching entries of interest. The xenstored daemon is managed by the xencommons service.

XenStore is located on Dom0 in a single database file /var/lib/xenstored/tdb (tdb represents tree database).

28.2 File system interface Edit source

XenStore database content is represented by a virtual file system similar to /proc (for more information on /proc, see Book “System Analysis and Tuning Guide”, Chapter 2 “System monitoring utilities”, Section 2.6 “The /proc file system”). The tree has three main paths: /vm, /local/domain, and /tool.

  • /vm - stores information about the VM Guest configuration.

  • /local/domain - stores information about VM Guest on the local node.

  • /tool - stores general information about multiple tools.


Each VM Guest has two different ID numbers. The universal unique identifier (UUID) remains the same even if the VM Guest is migrated to another machine. The domain identifier (DOMID) is an identification number that represents a particular running instance. It typically changes when the VM Guest is migrated to another machine.

28.2.1 XenStore commands Edit source

The file system structure of the XenStore database can be operated with the following commands:


Displays the full dump of the XenStore database.


Displays the value of the specified XenStore entry.


Reports whether the specified XenStore path exists.


Displays all the children entries of the specified XenStore path.


Updates the value of the specified XenStore entry.


Removes the specified XenStore entry or directory.


Updates the read/write permission on the specified XenStore path.


Sends a command to the xenstored back-end, such as triggering an integrity check.

28.2.2 /vm Edit source

The /vm path is indexed by the UUID of each VM Guest, and stores configuration information such as the number of virtual CPUs and the amount of allocated memory. There is a /vm/<uuid> directory for each VM Guest. To list the directory content, use xenstore-list.

> sudo xenstore-list /vm

The first line of the output belongs to Dom0, and the second one to a running VM Guest. The following command lists all the entries related to the VM Guest:

> sudo xenstore-list /vm/9b30841b-43bc-2af9-2ed3-5a649f466d79-1

To read a value of an entry, for example, the number of virtual CPUs dedicated to the VM Guest, use xenstore-read:

> sudo xenstore-read /vm/9b30841b-43bc-2af9-2ed3-5a649f466d79-1/vcpus

A list of selected /vm/<uuid> entries follows:


UUID of the VM Guest. It does not change during the migration process.


Specifies whether to destroy or restart the VM Guest in response to a reboot request.


Specifies whether to destroy or restart the VM Guest in response to a halt request.


Specifies whether to destroy or restart the VM Guest in response to a crash.


Number of virtual CPUs allocated to the VM Guest.


Bitmask of active virtual CPUs for the VM Guest. The bitmask has several bits equal to the value of vcpus, with a bit set for each online virtual CPU.


The name of the VM Guest.

Regular VM Guests (not Dom0) use the /vm/<uuid>/image path:

> sudo xenstore-list /vm/9b30841b-43bc-2af9-2ed3-5a649f466d79-1/image

An explanation of the used entries follows:


The OS type of the VM Guest.


The path on Dom0 to the kernel for the VM Guest.


The kernel command line for the VM Guest used when booting.


The path on Dom0 to the RAM disk for the VM Guest.


Shows arguments passed to the QEMU process. If you look at the QEMU process with ps, you should see the same arguments as in /vm/<uuid>/image/dmargs.

28.2.3 /local/domain/<domid> Edit source

This path is indexed by the running domain (VM Guest) ID, and contains information about the running VM Guest. Remember that the domain ID changes during VM Guest migration. The following entries are available:


The path of the /vm directory for this VM Guest.

on_reboot, on_poweroff, on_crash, name

See identical options in Section 28.2.2, “/vm


Domain identifier for the VM Guest.


The current CPU to which the VM Guest is pinned.


The weight assigned to the VM Guest for scheduling purposes. Higher weights use the physical CPUs more often.

Apart from the individual entries described above, there are also several subdirectories under /local/domain/<domid>, containing specific entries. To see all entries available, refer to XenStore Reference.


Contains memory information. /local/domain/<domid>/memory/target contains target memory size for the VM Guest (in kilobytes).


Contains information about a console used by the VM Guest.


Contains information about all back-end devices used by the VM Guest. The path has subdirectories of its own.


Contains information about the front-end devices for the VM Guest.


Contains miscellaneous information about devices.


Contains information about the VM Guest's store.

Print this page