[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Learning DomU memory usage from Dom0



On Tue, 2014-12-02 at 07:23 -0800, UÄurcan ErgÃn wrote:
> Hello,
> 
> I have been trying to learn domU memory usage from dom0. I have tried 
> to achieve that by reading to read memory usage via xentop. Xentop only
> shows allocated memory data. 
> 
> I have also tried to send it from domU to dom0 via xenstore. I had some
> trouble with xenstore permissions.
> For example i had two domU's 27 and 31.
> I created a /tool/ramusage/27 path from dom0
> And used xenstore-chmod /tool/ramusage/27 w27 so domU 27 can write to it.
> But domU 31 could also write to it. Could it a bug or am i missing something
> about xenstore permissions.

There's a subtle gotcha in the syntax, see
http://wiki.xen.org/wiki/XenBus#Permissions and xenstore-chmod(1)[0].

In particular the first "permission" which you give to chmod is actually
the owner plus the default permissions *for everyone else*. Any domain
can read from or write to a node which it owns.

IOW "chmod w27" makes the node owned by dom27 (who can therefore read or
write it) and allows everyone else to write too.

You probably want r27, i.e. dom27 owns and everyone else can read

Or perhaps "n27 r31" i.e. dom27 owns, noone can read or write by default
by dom31 can read.

You could also leave the node owned by domain 0 and give dom27 and dom31
the permissions they need explicitly.

Ian.

[0] http://xenbits.xen.org/docs/unstable/man/xenstore-chmod.1.html


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.