Commit Graph

2418 Commits

Author SHA1 Message Date
Cole Robinson
ce94126b70 serialcon: Don't open a console with name=None
Can crash libvirt on f16, which is what happens when a user tries to open
dom-0 console
2012-01-29 13:02:13 -05:00
Cole Robinson
006ba306f7 connection: tick() isn't reentrant, lock it
We can get weird keyerrors sometimes, if the global tick thread is
scheduled off while a synchronous tick call is run (like after we create
a vm).

Eventually we will do away with manual tick() invocations but this will
do for now.
2012-01-29 12:07:39 -05:00
Cole Robinson
f1207cef7b inspection: Avoid debug spew in a few cases 2012-01-29 12:05:28 -05:00
Cole Robinson
5bf341052d conn: Don't drop connection for every VM SYSTEM_ERROR
VM getinfo returns a system error if we are polling while the guest
is being shutdown (since qemu monitor connection hangs up). Make sure
the conn really dropped before we raise this error, but doing a connection
getinfo call.
2012-01-29 11:26:24 -05:00
Cole Robinson
64f201eff8 console: Fix spice scaling
Actually scale, not try and resize guest resolution. We will want to add
new UI or smarts to enable that.
2012-01-28 16:38:01 -05:00
Cole Robinson
e863c0554d asyncjob: Some cleanups and simplifications 2012-01-27 21:46:12 -05:00
Cole Robinson
a1689d8873 asyncjob: Try and organize code layout a bit 2012-01-27 21:03:42 -05:00
Cole Robinson
235de4e398 asyncjob: Only register UI timer if we are showing dialog
Also fix some indentation
2012-01-27 20:51:46 -05:00
Cole Robinson
1de4c49f7a asyncjob: Rename run_main parameter to async
More clear what it's generally doing
2012-01-27 20:48:08 -05:00
Cole Robinson
2f10fc668c Give better errors if PolicyKit auth fails
Coupled with a recent libvirt patch, try and give more info about
a couple common policykit failure scenarios, like launching virt-manager
over SSH or VNC.

Do this by checking to see if we have a 'session' with ConsoleKit: the
above culprits don't give the user a local session, which causes
PolicyKit to deny.
2012-01-27 18:31:21 -05:00
Cole Robinson
8a92690a55 Don't show error if user cancelled polkit auth
Requires recent libvirt patch to help us differentiate the error.
2012-01-27 16:00:04 -05:00
Cole Robinson
2e297ab70c inspection: Cache data between connection reconnects 2012-01-25 11:52:45 -05:00
Cole Robinson
5efe079158 Top level windows shouldn't be visible by default
Causes first run of dialogs to fail with a flicker on F16 KDE at least.

Choosecd also was using 'show' instead of 'present', which combined
with the first run fail meant that the dialog couldn't be displayed on
KDE :(

Also, the progress dialog was unconditionally shown, so this should fix
random flicker for quick operations, even in gnome.
2012-01-25 10:38:42 -05:00
Deepak C Shetty
256c2a74e6 virt-manager: Add support for fs write policy
This introduces new attribute wrpolicy with only supported
value as immediate. This helps specify whether to skip the
host page cache.

When wrpolicy is specified, meaning when wrpolicy=immediate
a writeback is explicitly initiated for the dirty pages in
the host page cache as part of the guest file write operation

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
2012-01-23 20:45:38 -05:00
Deepak C Shetty
79908782bb virt-manager: Fix glade file issue for fs readonly
It looks like the previous commit where fs readonly
was introduced caused this to happen. fs readonly
checkbox not appearing as its overlapping with the
target field... this patch fixes that.

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
2012-01-18 08:04:29 -05:00
Cole Robinson
79447707ac manager: Again, don't fetch XML on every tick for <description>
The xml_escaping change reverted this.
2012-01-17 15:31:20 -05:00
Cole Robinson
10d2c245c3 error: Don't print 'None' in validation error dialog 2012-01-17 10:29:16 -05:00
Cole Robinson
1ff601138f Specify all logging string format args as function parameters
As warned about by pylint. Also clean up some pylint false positives
and a few scattered legit warnings.
2012-01-16 22:04:40 -05:00
Cole Robinson
a1d2b1a0f0 pylint: s/addmsg/skipmsg/g 2012-01-16 21:13:41 -05:00
Guido Günther
2140539c64 Improve error message if netcat can't forward Unix domain sockets
Otherwise the information:

  End of file while reading data: nc: invalid option -- 'U'
  nc -h for help: Input/output error

is hidden in the error detail. See Debian bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614291
2012-01-14 19:39:04 -05:00
Li Zhang
e06b277362 details: Add machine type options for non-x86 architecture.
This patch adds the machine type combo callback
funcitons on non-x86 architectures.
For non-x86 architectures, user can select machine
type and the details of overview page are refreeshed,
and the machine type value is set.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>

(crobinso: squashed the two patches)
2012-01-12 20:46:41 -05:00
Deepak C Shetty
708dc74468 virt-manager: Add support for filesystem Driver Type
This patch adds support for the user to select Driver Type
on the addhardware->filesystems page. Currently only 'path'
and 'handle' driver types are supported. When anything but
'path' is selected, the security modes do not apply, hence
they are removed from the page based on user's selected
driver type.

Note: Some changes were needed in libvirt also to ensure
smooth experience while dealing with driver and mode
fields. Related libvirt patches are posted at ...

https://www.redhat.com/archives/libvir-list/2011-December/msg00919.html

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>

(crobinso: small fix to handle if dev.driver is None)
2012-01-12 20:44:25 -05:00
Deepak C Shetty
18e12e7ad9 virt-manager: Add support for fs readonly attribute
Enables exporting filesytem as a readonly mount for guest, by
default read-write access is given (currently only works for
QEMU/KVM driver)

The support for the same in libvirt was added recently at ...
https://www.redhat.com/archives/libvir-list/2011-December/msg00937.html

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
2012-01-12 20:21:35 -05:00
Guido Günther
5e77012c76 storagebrowser: ignore unparseable volumes
This e.g. happens when the volume was moved away but the pool didn't get
refereshed:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1229, in browse_import
    self._browse_file(set_path, is_media=False)
  File "/usr/share/virt-manager/virtManager/create.py", line 2118, in _browse_file
    self.storage_browser.show(self.topwin, self.conn)
  File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 74, in show
    self.reset_state(conn)
  File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 183, in reset_state
    self.pool_selected()
  File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 257, in pool_selected
    self.populate_storage_volumes()
  File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 322, in populate_storage_volumes
    path = vol.get_target_path()
  File "/usr/share/virt-manager/virtManager/storagevol.py", line 49, in get_target_path
    return util.xpath(self.get_xml(), "/volume/target/path")
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 93, in get_xml
    self.refresh_xml()
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 105, in refresh_xml
    self._xml = self._XMLDesc(self._active_xml_flags)
  File "/usr/share/virt-manager/virtManager/storagevol.py", line 35, in _XMLDesc
    return self.vol.XMLDesc(flags)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2002, in XMLDesc
    if ret is None: raise libvirtError ('virStorageVolGetXMLDesc() failed', vol=self)
libvirt.libvirtError: cannot stat file '/var/scratch/vms/squeeze-template.img': No such file or directory

Instead of failing the whole pool simply ignore the one failing volume.
Without this patch selecting "Browse..." when creating a new vm from an
existing disk image won't show the volume dialog if the default pool has
a missing volume.
2012-01-12 20:05:38 -05:00
Deepak C Shetty
a7a0e316cf virt-manager: Fix Mode hotkey problem in FS page
Mode label in FS page should be associated with the
fs-mode-combo, but its erronesouly is associated with
fs-type-combo, fixing that here.

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
2012-01-12 20:03:21 -05:00
Deepak C Shetty
ea4f6f4ed3 virt-manager: Throw appropriate error when fs target string already exists.
In case of qemu for default fs type (mount) target is not
actually a directory, it is merely a arbitrary string tag
that is exported to the guest as a hint for where to mount.

This tag is unique and is exported as a virito-9p-pci
device and hence this patch adds check to ensure the target
string/tag is never entered duplicate by the user when
adding 2 or more filesystem devices.

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
2012-01-12 19:36:38 -05:00
Cole Robinson
f96796dda3 AUTHORS: Clarify that I am really the only active dev/maintainer
Yeah, look at me, I'm sooooo cool.
2011-12-22 13:26:10 -05:00
Cole Robinson
bb59b1b075 AUTHORS: Use sensible indentation 2011-12-22 13:24:05 -05:00
Cole Robinson
28a399cbd7 Add Jim to AUTHORS 2011-12-22 13:21:45 -05:00
Jim Fehlig
42a871984f addhw: Add SATA disk bus option 2011-12-22 13:18:40 -05:00
Cole Robinson
becf776d6a console: Fix hang when reconnecting to remote VNC console
VNC disconnect signals aren't being delivered, meaning we never cleanup
up SSH tunnels for remote VNC connections. This causes a reconnect
attempt to hang, trying to reuse the existing tunnels (which doesn't
work).

The problem is that we are cleaning up the VNC widget too early,
unregistering callbacks before they get a chance to be invoked.

Not cleaning up only causes a small memory leak for every console we
open, so only a minor problem compared to the original issue. A more
involved fix is required to clean up safely.
2011-12-22 12:55:40 -05:00
Lars Sjostrom
9d2119ab3e inspection: exclude cdrom from vm inspection
Can cause inspection to fail if cdrom is the first device
See: https://bugzilla.redhat.com/show_bug.cgi?id=752552

(crobinso: added Lars to AUTHORS, expanded commit msg)
2011-11-10 13:23:06 -05:00
Cole Robinson
a712a7b32e details: Always show toolbar in customize dialog
Make sure it isn't accidentally hidden
2011-10-30 13:28:18 -04:00
Cole Robinson
930a321f8e console: Fix crashes when deleting vm on F16
The toolbar cleanup order was causing crashed on f16 at app shutdown or
VM delete (when a console window is fully uninstantiated)
2011-10-28 12:20:31 -04:00
Cole Robinson
392cb8075f connection: Don't have tick edit object lists in place
Since 'tick' isn't really thread safe, and we sometimes call a manual tick
to refresh resources (say immediately after creating a guest), we
can't depend on lists staying consistent.
2011-10-13 16:59:15 -04:00
Cole Robinson
bca1552306 migrate: Better attempt at generating a remote URI for localhost
If doing p2p migration from a remote host to localhost, we need to
generate a remote libvirt URI for qemu:///system. Try and use the remote
auth credentials of source connection.
2011-10-13 16:13:36 -04:00
Cole Robinson
03435db779 Fix some pylint 2011-10-06 14:06:40 -04:00
Marc-André Lureau
e69977f82f virt-manager: allow switching between USB1/piix3 and USB2/ich9 controller
crobinso: Fix some small pylint
2011-10-06 14:05:46 -04:00
Cole Robinson
5a84a3a627 create: Make 'browse local image' chooser allow entering a new path 2011-09-26 20:44:40 -04:00
Cole Robinson
b2c9a0eb8e create: Warn about unapplied changes for customize dialog
Also make virtinst domains report signals synchronously to avoid customize
dialog tracebacks in the logs.
2011-09-26 20:14:12 -04:00
Cole Robinson
731fd74bf0 cli: Log uncaught exceptions at debug level
Logging at exception level expects a stack trace, which we don't see
since we are in the exception handler.
2011-09-26 19:22:52 -04:00
Cole Robinson
f0e963e356 createvol: Hook up configure switch to hide unsupported RHEL6 formats 2011-09-26 18:53:00 -04:00
Cole Robinson
e37b67b59a create: RHEL6 supports SPICE, hardcode it 2011-09-26 17:10:05 -04:00
Cole Robinson
1e386dbf8f console: Properly handle mnemonics on spice focus change 2011-09-26 16:32:37 -04:00
Cole Robinson
ee434cb66a addhw: Hide unsupported RHEL6 serial device types 2011-09-26 11:34:21 -04:00
Cole Robinson
8b0be3ee2a configure: Make summary output match command line names for rhel6 opts 2011-09-26 11:33:03 -04:00
Cole Robinson
0a7640c593 manager: Properly show vm desc in tooltip w/ special xml characters 2011-09-26 11:07:52 -04:00
Cole Robinson
3d3ac635e1 host: Don't use text entries for fields that aren't editable
Also make some interface labels selectable.
2011-09-22 10:45:09 -04:00
Cole Robinson
1f87e18dbf Add back .pot file 2011-09-20 10:08:35 -04:00
Cole Robinson
1bcc39005d Update translations 2011-09-19 10:53:56 -04:00