[virt-tools-list] Small virt-what Patch

Richard W.M. Jones rjones at redhat.com
Wed Mar 21 19:17:18 UTC 2012


On Wed, Mar 21, 2012 at 02:03:28PM -0500, Pedram Amini wrote:
> Detection of Xen on Linode VPS is failing due to /proc/xen containing no files:
> 
> /proc/xen# ls
> <nothing>
> 
> Perhaps add a check on the existence of the xen directory itself?
> Another alternative place to look:
> 
> /sys/hypervisor# ls
> compilation  properties  type  uuid  version
> 
> /sys/hypervisor# cat type
> xen

Are you using the latest virt-what?  In the current version the tests
look like this:

  elif [ -f $root/proc/xen/capabilities ]; then
      #...
  elif [ -f $root/sys/hypervisor/type ] &&
      grep -q "xen" $root/sys/hypervisor/type; then
      echo xen

which ought to work given what you've described.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the virt-tools-list mailing list