libvirt-check-trim: commit two remaining code chunks
This commit is contained in:
parent
aae7d24732
commit
d620a51082
1 changed files with 2 additions and 0 deletions
|
@ -26,6 +26,7 @@ for domain in conn.listAllDomains():
|
||||||
xml = domain.XMLDesc()
|
xml = domain.XMLDesc()
|
||||||
tree = objectify.fromstring(xml)
|
tree = objectify.fromstring(xml)
|
||||||
|
|
||||||
|
# machine type version should be >= 2.1 if i440fx
|
||||||
machine = tree.os.type.get('machine')
|
machine = tree.os.type.get('machine')
|
||||||
matches = re.match('^pc-(?:i440fx-)?([0-9.]*)', machine)
|
matches = re.match('^pc-(?:i440fx-)?([0-9.]*)', machine)
|
||||||
if matches:
|
if matches:
|
||||||
|
@ -35,6 +36,7 @@ for domain in conn.listAllDomains():
|
||||||
# Might want to check "qemu-system-x86_64 -M help" for supported
|
# Might want to check "qemu-system-x86_64 -M help" for supported
|
||||||
# machines.
|
# machines.
|
||||||
|
|
||||||
|
# no disks, no need to check
|
||||||
if not hasattr(tree.devices, 'disk'):
|
if not hasattr(tree.devices, 'disk'):
|
||||||
print('(has no disks)')
|
print('(has no disks)')
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue