Commit Graph

2491 Commits

Author SHA1 Message Date
Cole Robinson
103c2e0da1 Convert UI files from glade to gtkbuilder
Glade is long since deprecated, and the 'glade' tool in F15 and up doesn't
even handle glade format files!

This effectively drops support for running virt-manager on a RHEL5 host,
which has a GTK that is too old to support gtkbuilder.

The process here was:
- On RHEL6, open all glade files with glade3, use Edit->Preferences to
  change format to gtk builder. (the gtk-builder-convert tool
  produced all sorts of brokenness, and f16 glade3 can't even open
  old glade files).
- Open these new files in glade on f16 and resave (since glade is
  notorious for reformatting files over new versions, saves churn
  the first time someone goes to patch the UI using a modern glade)
2012-02-02 14:17:50 -05:00
Cole Robinson
bc7f27a468 Prep for release 2012-01-31 20:23:23 -05:00
Cole Robinson
3090b48026 RHEL6 back compat 2012-01-31 20:13:47 -05:00
Cole Robinson
f4aa83e10f Fix pylint detection, and clean up the fallout 2012-01-31 19:07:32 -05:00
Cole Robinson
f42f3afe42 Add some debugging on dialog open/close 2012-01-31 18:16:54 -05:00
Cole Robinson
c3380ca700 Remove deprecated 'Encoding' field from desktop file 2012-01-31 17:52:26 -05:00
Cole Robinson
22307913a6 host: If a storage volume error, just hide it
Instead of breaking the whole pool view
2012-01-29 22:23:45 -05:00
Cole Robinson
ce694fc76e pool: When refreshing, update volume XML
Fixes changing storage format in UI on pool refresh.
2012-01-29 22:15:01 -05:00
Cole Robinson
3a28df0912 details: Disable send key toolbar menu when paused 2012-01-29 21:56:18 -05:00
Cole Robinson
edbd5191c0 console: Watch gconf for grab keys update 2012-01-29 21:51:20 -05:00
Cole Robinson
b7a533a451 create: s/Gb/GB/ for storage units 2012-01-29 21:51:07 -05:00
Cole Robinson
9679c841b8 Remove testing hack that broke serialcon 2012-01-29 21:19:12 -05:00
Cole Robinson
1de788d8c4 Fix some accelerator key issues 2012-01-29 21:14:30 -05:00
Brian J. Murrell
481e24006c createnet: Allow networks smaller than 16 addresses 2012-01-29 19:50:23 -05:00
Cole Robinson
173908d5b0 serialcon: Handle lack of vte module (with an error) 2012-01-29 19:00:45 -05:00
Cole Robinson
e830f91d27 serialcon: Some fixes for fast data transfer
Our glib integration had a defect that could cause stalls when streaming
a lot of data (like doing a cat /var/log/messages)

Also, add some tweaks to make the previously stated situation perform
better anyways.
2012-01-29 18:48:20 -05:00
Cole Robinson
a5cb785c62 Don't show useless PO output in network source mode list
Apparently _("") when running in a non-en locale returns the PO header.
A buglet was sticking the whole header in a combo box!
2012-01-29 16:21:39 -05:00
Cole Robinson
9c23dfa992 cli: Skip gettext setup if setting locale fails
Can happen if user provides a busted locale
2012-01-29 16:09:37 -05:00
Cole Robinson
680f44ec93 domain: Remove <address> when changing device models
Since it is basically like adding and removing a whole piece of
HW, some address elements may no longer be valid.
2012-01-29 15:40:53 -05:00
Cole Robinson
a0dee00678 domain: Only regenerate target if we really need to
Certain different devices like scsi, usb, and sata use the same
target prefix. In those cases, just reuse it.
2012-01-29 15:38:33 -05:00
Cole Robinson
18f68bb581 details: When changing disk bus, generate new target name
Since we are basically changing
2012-01-29 15:32:25 -05:00
Cole Robinson
f2d5ec4977 details: Allow using test driver for exotic disk buses 2012-01-29 15:32:13 -05:00
Cole Robinson
aae4005a0a details: Don't log exception if VM has no arch
Like xen Domain-0. Exception was harmless but not really useful
2012-01-29 13:07:16 -05:00
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