def kvm_connect():
try:
conn = libvirt.openReadOnly('qemu:///system')
except:
sys.stderr.write(
"There was an error connecting to the local libvirt daemon using '"
+ uri + "'.")
exit(1)
return conn