Bug 787367

Summary: Traceback trying to add Spice graphics device to LXC container
Product: [Fedora] Fedora Reporter: Robin Green <greenrd>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: berrange, crobinso, dougsland, dpierce, hbrock, jforbes, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-06 21:46:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Robin Green 2012-02-04 14:17:16 UTC
Description of problem:
See summary

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-7.fc16.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create new LXC guest
2. Restart virt-manager
3. Stop the LXC guest
4. Attempt to add graphics device to LXC guest, type Spice, leave all options at default values
  
Actual results:
Error adding device: internal error cannot determine default video type

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1048, in add_device
    self.vm.add_device(self._dev)
  File "/usr/share/virt-manager/virtManager/domain.py", line 397, in add_device
    self.redefine_cached()
  File "/usr/share/virt-manager/virtManager/domain.py", line 326, in redefine_cached
    self._redefine_xml(xml)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 147, in _redefine_xml
    return self._redefine_helper(origxml, newxml)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 137, in _redefine_helper
    self._define(newxml)
  File "/usr/share/virt-manager/virtManager/domain.py", line 762, in _define
    self.conn.define_domain(newxml)
  File "/usr/share/virt-manager/virtManager/connection.py", line 805, in define_domain
    return self.vmm.defineXML(xml)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2110, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirtError: internal error cannot determine default video type

Expected results:
Either "Error: Spice not supported for LXC guests" or success.

Comment 1 Cole Robinson 2012-02-06 21:46:18 UTC
The only sustainable way for us to actually report an error like that is for libvirt to tell us what each driver supports, then we can disable pieces of the UI as appropriate, to avoid the user ever erroring here.

*** This bug has been marked as a duplicate of bug 570902 ***