summaryrefslogtreecommitdiffstats
path: root/distribution/virt/import/ishvm
blob: 2ad7d9fabe904c5cbeddfdf09bc54fbe74def527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
#
# script to determine if it's an hvm guest
# returns 0 if it is, non-zero if it is not.
#

if [[ $# != 1 ]]; then 
	echo "Need a guest name as an argument"
	exit 1;
fi

if virsh dumpxml $1 | grep -q '>hvm<'; then 
	exit 0
else
	exit 1
fi