virtinst: add virtio device model and accel3d attribute

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2016-03-04 12:31:52 +01:00 committed by Cole Robinson
parent f912f28e97
commit 8ba48f5299
4 changed files with 7 additions and 3 deletions

View File

@ -1339,7 +1339,7 @@ Use --console=? to see a list of all available sub options. Complete details at
Specify what video device model will be attached to the guest. Valid values Specify what video device model will be attached to the guest. Valid values
for VIDEO are hypervisor specific, but some options for recent kvm are for VIDEO are hypervisor specific, but some options for recent kvm are
cirrus, vga, qxl, or vmvga (vmware). cirrus, vga, qxl, virtio, or vmvga (vmware).
Use --video=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsVideo> Use --video=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsVideo>

View File

@ -30,7 +30,9 @@
<model type="vmvga" heads="5"/> <model type="vmvga" heads="5"/>
</video> </video>
<video> <video>
<model type="qxl" vgamem="8192" ram="100"/> <model type="qxl" vgamem="8192" ram="100">
<acceleration accel3d="yes"/>
</model>
</video> </video>
</devices> </devices>
</domain> </domain>

View File

@ -674,6 +674,7 @@ class XMLParseTest(unittest.TestCase):
check("model", "cirrus", "cirrus", "qxl") check("model", "cirrus", "cirrus", "qxl")
check("ram", None, 100) check("ram", None, 100)
check("vgamem", None, 8192) check("vgamem", None, 8192)
check("accel3d", None, True)
self._alter_compare(guest.get_xml_config(), outfile) self._alter_compare(guest.get_xml_config(), outfile)

View File

@ -27,7 +27,7 @@ class VirtualVideoDevice(VirtualDevice):
# Default models list # Default models list
MODEL_DEFAULT = "default" MODEL_DEFAULT = "default"
MODELS = ["cirrus", "vga", "vmvga", "xen", "qxl"] MODELS = ["cirrus", "vga", "vmvga", "xen", "qxl", "virtio"]
@staticmethod @staticmethod
def pretty_model(model): def pretty_model(model):
@ -43,6 +43,7 @@ class VirtualVideoDevice(VirtualDevice):
ram = XMLProperty("./model/@ram", is_int=True) ram = XMLProperty("./model/@ram", is_int=True)
heads = XMLProperty("./model/@heads", is_int=True) heads = XMLProperty("./model/@heads", is_int=True)
vgamem = XMLProperty("./model/@vgamem", is_int=True) vgamem = XMLProperty("./model/@vgamem", is_int=True)
accel3d = XMLProperty("./model/acceleration/@accel3d", is_yesno=True)
VirtualVideoDevice.register_type() VirtualVideoDevice.register_type()