Error: xenstore-read: xs_open: No such file or directory on DomU [Solved]

Updated on September 3, 2017

Question: Hi, I have installed Xen Hypervisor version 3.1 on RHEL machine, which runs two CentOS VMs on Dom0. I would like to use xenstore to write some information in Dom0 (for instance, I want to store/write hostname of Dom0) and read that store in DomU. After reading out some forums, I understood that I have to use below commands on Dom0 to store the hostname.

# xenstore-write /tool/hostname $(uname -n);
# xenstore-chmod /tool/hostname r

and run ‘xenstore-read /tool/hostname‘ on any of the DomU to get the hostname of Dom0. But I get this error “xenstore-read: xs_open: No such file or directory on DomU” when ‘xenstore-read /tool/hostname‘ is executed on DomU. Any ideas? – Sri

tech forum

Solution:

Sri, the ‘xenstore‘ command will store information of configurations & status, which is finally shared between two domains. If you use xenstore-write on Dom0, then it can be read using xenstore-read on DomU, only if they share the file system. To do that, you have to mount xenfs on DomU.

On DomU

# vi /etc/fstab

and add the below line:

xenfs /proc/xen xenfs defaults 0 0

Reload the fstab to create a mount point.

# mount -a

Now, use xenstore-read on DomU as below:

# xenstore-read /tool/hostname

It should work.

Was this article helpful?

Related Articles

Comments Leave a Comment

Leave a Comment