【发布时间】:2018-07-28 23:26:07
【问题描述】:
我目前正在尝试获取 mac 地址,但我有点困惑。当我尝试
import libvirt # To connect to the hypervisor
# Connect to your local hypervisor. See https://libvirt.org/uri.html
conn = libvirt.open('qemu+ssh://%s/system' % servidor.ubicacion_ip) # Open the hypervisor in read-only mode
# conn = libvirt.open(None) # Open the default hypervisor in read-write mode (require
if conn == None:
raise Exception('Failed to open connection to the hypervisor')
dom = conn.lookupByName('userid_%s_servidor_%s.qcow2' % (user.id, servidor.id))
但是当我检查来宾python api commands in libvirt 但c api commands 似乎表明它应该有办法获取mac地址?
【问题讨论】: