output="$(./virt-what --test-root=$root 2>&1)"
expected="xen
output="$(./virt-what --test-root=$root 2>&1)"
expected="xen
if [ "$output" != "$expected" ]; then
echo "$0: test failed because output did not match expected"
if [ "$output" != "$expected" ]; then
echo "$0: test failed because output did not match expected"
if [ -d $root/sys/bus/xen -a ! -d $root/sys/bus/xen-backend ]; then
# PV-on-HVM drivers installed in a Xen guest.
echo xen
if [ -d $root/sys/bus/xen -a ! -d $root/sys/bus/xen-backend ]; then
# PV-on-HVM drivers installed in a Xen guest.
echo xen
else
# There is no virt leaf on IA64 HVM. This is a last-ditch
# attempt to detect something is virtualized by using a
else
# There is no virt leaf on IA64 HVM. This is a last-ditch
# attempt to detect something is virtualized by using a