Commit Graph

1462 Commits

Author SHA1 Message Date
Pavel Hrdina b327191a20 maint: fix pylint warnings wrong-import-order
standard import "import logging" comes before "from gi.repository import GLib"

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 17:37:06 +02:00
Pavel Hrdina efd1d2dd07 cpu: config: replace host-cpu-model by host-model-only
Commit f5c32063 replaced host-cpu-model by host-model-only but forget those two
places.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 09:06:13 +02:00
Pavel Hrdina 2d554aca7b ui: remove "Restore Saved Machine..." from File menu of Connection Details
Commit 839ce682 removed deprecated support of save/restore which was replaced by
managedsave feature.  This is a leftover that wasn't removed together with that
commit.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1340356

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-31 13:09:48 +02:00
Pavel Hrdina 4506d49ff5 addhardware: don't remove QXL if VNC graphics are configured
Commit 1a6e803a introduced a fix for bogus behavior of QXL+VNC where
there was no cursor visible by disabling this configuration in
virt-manager.  We should enable it again because this is a supported
configuration and the bug was actually in QEMU.

This is now fixed in qemu-2.6.0 [1] so revert commits 1a6e803a and
67ca0a9f.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1326544

[1] http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg00507.html

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-20 18:10:24 +02:00
Pavel Hrdina bf99c0ce82 virt-manager: fix --show-domain-creator to not depend on manager window
Commit a0c2fdf4 fixed a bug that there was no way how to close the app.

The original issue isn't present anymore but reverting that commit isn't
enough.  We need to increment/decrement window count while
showing/closing the create window in order to not exit right after
the create window is opened.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1331707

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-20 12:02:03 -04:00
Cole Robinson 0891fc9ee1 manager: Clean up new conn/vm handling 2016-05-20 11:44:18 -04:00
Cole Robinson c65e9d1e16 manager: fix --show-domain * manager conn populating
We need to register the conn internally before connecting
vm-added, otherwise the VMs don't end up in the UI
2016-05-20 11:44:18 -04:00
Cole Robinson eea9b27696 console: Fix and simplify 'Resize to VM' action
We need to resize the window and not try to play crazy games with
the scroll window size. Wish I realized this years ago...
2016-05-20 11:44:18 -04:00
Cole Robinson 8c2adb83ae console: Error for more non-working graphical configs
- If connecting remotely but graphics has no listen address,
    like the spice GL case.
- Trying to connect to a TLS using VM over an ssh tunnel, it doesn't
    seem to work: https://bugzilla.redhat.com/show_bug.cgi?id=1320331
2016-05-18 16:57:38 -04:00
Cole Robinson 0f88ebbc0b console: Enforce text wrapping on 'unavailable' page 2016-05-18 16:32:07 -04:00
Cole Robinson 01d4203933 viewers: spice: fix password auth 2016-05-18 16:14:51 -04:00
Cole Robinson ed666b21db sshtunnels: Drop 'ext' URI handling
Never really seen it used in practice, so drop this support. Would
probably take more work to make it actually work anyways
2016-05-18 16:06:04 -04:00
Cole Robinson 7b0f916886 baseclass: Undo workaround for old pygobject
Basically reverting this commit:

    commit 1c8bf88db7
    Author: Cole Robinson <crobinso@redhat.com>
    Date:   Tue Jun 18 08:46:24 2013 -0400

    baseclass: Add unregister wrappers for idle and timeout

    If an idle handler raises an exception, it isn't unregistered and loops
    forever. This is a regression from previous pygobject and pygtk:

    https://bugzilla.gnome.org/show_bug.cgi?id=702552

    Work around this for now with our own wrappers.
2016-05-17 17:49:56 -04:00
Cole Robinson 3aa941571a uiutil: Drop check for old pygobject row handling
Once upon a time it couldn't handle setting a row value to None,
but we've bumped the dep now
2016-05-17 17:49:56 -04:00
Cole Robinson cb4909dffb console: Fix fullscreen keycombo menu placement
Some pygobject update must have fixed the callback signature,
so handle both versions
2016-05-17 17:49:55 -04:00
Cole Robinson dc05600324 console: Convert from autodrawer to native Gtk widgets
Gtk 3.10 has a GtkOverlay and GtkRevealer widget which we can
use to more sustainably implement the autodrawer functionality.
2016-05-17 17:49:55 -04:00
Cole Robinson 3221b56ac3 viewers: Show spice error message in the UI on disconnect 2016-05-16 16:28:55 -04:00
Cole Robinson 0bd73da4bb sshtunnels: Remove duplicate error strings
spice can open multiple tunnels, and in certain cases we may get
multiple duplicate errors from each tunnel. Try to strip them out
2016-05-16 16:22:35 -04:00
Cole Robinson adef60211f viewers: Pass SSH error output via gobject signal
Rather than have the console fetch it. Just streamlines things a bit
2016-05-16 16:16:13 -04:00
Cole Robinson bc03ca5caa console: Tweak console window message when VM is inactive 2016-05-16 16:06:04 -04:00
Cole Robinson 8719acbbd3 viewers: Log spice message on error state 2016-05-16 15:47:37 -04:00
Cole Robinson 6a3b2a68c3 viewers: skip OpenGraphics for local TLS connection
It makes spice loop endlessly requesting an fd:
https://bugzilla.redhat.com/show_bug.cgi?id=1334071
2016-05-16 15:39:46 -04:00
Cole Robinson 6d69b1b98e viewers: Fix VNC auth-rejected error message 2016-05-16 15:31:05 -04:00
Cole Robinson 28540b3854 sshtunnels: Clarify tunnel vs direct connect host/port 2016-05-16 14:55:45 -04:00
Pavel Hrdina f628c3e266 create: skip continue-install restart if user destroys VM
Commit 159e4af1 fixed a case where VM was started if user destroyed VM
while installing it.  This moves the code before we check whether we
need to restart the VM in order to continue in installation (windows
requires that).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1235238

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-13 17:38:26 +02:00
Cole Robinson 8b6c404305 serialcon: Add logging about what VTE version we are using 2016-05-07 20:44:22 -04:00
Cole Robinson 9902a7c77f viewers: spice: clarify debug message
This isn't always a 'tunnel' anymore
2016-05-07 20:31:23 -04:00
Cole Robinson e30671b53d viewers: Only use openGraphics if supported 2016-05-07 19:12:33 -04:00
Cole Robinson 7cc6141618 viewer: move vm from ConnectionInfo to Viewer
I don't really like the VM in Viewer either, since it will encourage
layering violations, but it's a better fit than in ConnectionInfo
2016-05-07 18:09:24 -04:00
Cole Robinson bd725d6cfe viewers: Centralize viewer FD opening
Put all the logic into _get_fd_for_open. May help centralize future
improvements, like catching lack of openGraphicsFD support
2016-05-07 17:53:10 -04:00
Cole Robinson 7e34b022af sshtunnels: Remove column indent alignment 2016-05-07 17:44:34 -04:00
Cole Robinson 0a1d22f395 console: Remove console_active check
This is largely left over from the old days when a xen VM could
start up but still take a bit of time for the allocated VNC port
to be reflected in the XML.

This may still be an issue with old old xen, but I suspect it's
not relevant for anything modern, and it causes some issues with
listen=none behavior that spice supports. Just drop it and see if
anyone complains
2016-05-02 17:19:27 -04:00
Chen Hanxiao c4f62ff028 chardev: use pretty type of virtio
We shoud use VirtIO instead of virtio.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2016-05-02 17:11:41 -04:00
Cole Robinson f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Mikhail Feoktistov 32cccaa170 virt-manager: Fix VNC connection on hypervisor without GraphicsFD
Function virDomainOpenGraphicsFD() from libvirt can return -1
But in this case libvirt-python will raise an exception.
We should handle this case and return -1 as invalid FD.
In commit 5c451b64 Viewer._open() there is a code to open
graphics console in case of invalid GraphicsFD.

(crobinso: also log the error message)
2016-04-07 16:31:38 -04:00
Guido Günther a1383faff3 Make SpiceClientGtk optional
Not all architectures supported by Debian have it. This will allow to
make VNC work nevertheless.
2016-04-07 16:12:06 -04:00
Pavel Hrdina 4c3e7969c6 virt-install: concatenate all extra-args argument
So far we used only the last --extra-args argument from virt-install
command line, but it makes more sense to use all occurrences of
--extra-args and pass them to kernel.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-03-18 03:28:17 +01:00
Marc-André Lureau 5c451b6401 virt-manager: connect with openGraphicsFD
This allows to connect to VM without any display listening socket, the
fd passing is done through libvirt connection.

Furthermore, since it uses unix socket, spice can use virgl locally
with texture sharing. This effectively enables spice-gtk to display
local virgl rendering.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-03-09 20:25:37 -05:00
Vladimir Panteleev dcf57af699 details: Ask to apply changes before powering on VMs 2016-02-21 21:08:02 +00:00
Cole Robinson 94e24ab797 viewers: open_host debugging tweaks 2016-02-15 12:54:46 -05:00
Pavel Hrdina c39592ae7b localization: mark several strings as translatable
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-02-06 16:25:08 +01:00
Cole Robinson f454798b33 details: Fix screenshot on F24 rawhide (bz 1297988) 2016-01-15 15:07:58 -05:00
Cole Robinson a0a34e4fed asyncjob: Fix pylint 2016-01-12 12:49:30 -05:00
Cole Robinson 400b668da3 asyncjob: Always hide the X button 2016-01-11 14:48:49 -05:00
Cole Robinson 9747cd5473 asyncjob: Only show X button if dialog is cancellable (bz 1295418) 2016-01-10 18:04:36 -05:00
Pavel Hrdina 89c3638b63 connection: fix detection that libvirtd is stopped
In case that libvirtd is stopped, we could receive another type of error
from libvirt "libvirtError: internal error: client socket is closed".
This one is usually reported from local connection.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-01-08 10:21:42 +01:00
Cole Robinson 0d223e7008 serialcon: Drop the Vte version check
We can work with both the 2.90 and 2.91 APIs no problem, so drop the version
check. The pylint error seems to have disappeared anyways :/
2015-12-24 12:26:08 -05:00
Pavel Fedin ecf4b3ad40 Prohibit adding PCI host devices to container
libvirt does not allow this and attempt to do so causes error during domain
startup. Prevent this in the beginning instead with correct explanation.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
2015-12-24 11:37:59 -05:00
Cole Robinson f10bbfe5b3 storagelist: Fix error message for vol delete 2015-12-08 12:44:59 -05:00
Cole Robinson 2b7a119457 engine: Drop handling for old asyncjob nested main loops
Hasn't been needed for a long time
2015-12-06 15:41:49 -05:00
Cole Robinson f7ae826f0a Fix some gi version errors from pylint 2015-12-06 15:41:49 -05:00
Cole Robinson febe0abdd2 virt-manager: Drop manual dbusapi, use GtkApplication
So I was confused here and completely missed that GtkApplication is
meant to handle the common case of invoking actions in an existing
app instance. So drop the manual dbus server and use the simpler
Gtk support.

Fix a bunch of other errors in this area too
2015-12-06 15:41:49 -05:00
Cole Robinson 739e31e9b0 console: Fix traceback when switching to fullscreen
Traceback (most recent call last):
  File "/home/crobinso/src/virt-manager/virtManager/details.py", line 1257, in switch_page
    self.console.details_refresh_can_fullscreen()
  File "/home/crobinso/src/virt-manager/virtManager/console.py", line 965, in details_refresh_can_fullscreen
    return self._refresh_can_fullscreen()
  File "/home/crobinso/src/virt-manager/virtManager/console.py", line 464, in _refresh_can_fullscreen
    self.widget("control-fullscreen").set_sensitive(allow_fullscreen)
TypeError: Argument 1 does not allow None as a value
2015-11-24 18:23:36 -05:00
Cole Robinson a9bc56add3 virt-manager: revive cli dbus API (bz 1162815)
This allows virt-manager command line that launch windows to work for an
existing virt-manager instance. This is handy for scripting, and giving
other apps a reasonable way to launch a virt-manager VM window for
example.
2015-11-24 16:30:18 -05:00
Cole Robinson 356f30d7ba create: Hide pxe warning if there's no issue 2015-11-21 20:39:55 -05:00
Cole Robinson 2178cc8c93 create: Drop explicit kickstart UI
Few users actually use this, and they can easily do it with the kernel
options field.
2015-11-21 20:21:09 -05:00
Cole Robinson e18d2caa45 create: Don't go back to NewVM on error, if customize dialog launched
The code really isn't set up to handle exiting the customize dialog,
so just make the UI enforce it.
2015-11-21 19:55:48 -05:00
Cole Robinson e68efe8103 domain: Use setMemoryStatsPeriod for QEMU
Since that's what is required to get cooperative memory stats from
the guest balloon driver.
2015-11-18 21:20:36 -05:00
Cole Robinson 689b0db2c7 fsdetails: Don't sort type list, use the specified order
For LXC we want 'Mount' at the top, not the alphabetical 'Block'
2015-11-18 21:15:53 -05:00
Cole Robinson c3b5fb407a details: Fix editing filesystem devices 2015-11-18 21:12:35 -05:00
Cole Robinson 71a52300ae systray: Log if we will use AppIndicator 2015-11-18 18:54:17 -05:00
Cole Robinson cbef4ad84b systray: Fix appindicator icon name (bz 1257949) 2015-11-18 18:48:30 -05:00
Cole Robinson 603fc361bc connect: Fix generated URI for IPv6 addresses 2015-11-18 16:56:41 -05:00
Cole Robinson d32953d8c6 details: Remove UI for vcpu pinning
This UI exposed the old NUMA allocation policy detailed in the last commit.
It's very much sub-optimal, and should be removed.

Manual cpuset configuration is also quite uncommon and not really something
worth exposing in the UI. It can easily be done from the command line
with virt-xml.

If people complain, I'd consider adding a checkbox for vcpu placement=auto,
or an option to do that by default for new VMs.
2015-11-18 15:05:21 -05:00
Chen Hanxiao 908a00cc73 details: show Channel label by device type
Currently we show channel label by its name.
If we use name com.redhat.spice.0 but set it
as unix socket, the label in details keep unchanged.

This patch will set label according to device type
if we failed matching target_name

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2015-11-12 22:53:17 +08:00
Pavel Hrdina fedf2e7b66 ui: improve pause/resume tooltip
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1238618

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-12 13:13:19 +01:00
Cole Robinson 3e049583cc details: Drop ignorePause variable; just block the signals 2015-11-10 18:30:31 -05:00
Cole Robinson 0bf6124a28 storage: Fix updating UI when volume deleted (bz 1279940)
We in fact weren't updating the cached XML when pool.refresh() was called.
2015-11-10 17:40:04 -05:00
Cole Robinson ba8080db3f storagelist: Reset list position after deleting volume (bz 1279861) 2015-11-10 17:27:49 -05:00
Cole Robinson d5e5068699 engine: Update details window mapping when VM is renamed
Fixes this issue:

- Rename VM from 'foo' to 'foo1'
- Create new VM named 'foo'
- It raises 'foo1' window
2015-11-03 16:01:04 -05:00
Cole Robinson fe722b99cb setup: Make gsettings always work regardless of install dir (bz #1267377)
Most of this is lifted from 'meld'. The bits are

- compile gsettings schemas at setup.py install time
- add options to disable that, and use them in the RPM
- always pass GSETTINGS_SCHEMA_DIR so gsettings loading always works
  regardless of the install dir

https://bugzilla.redhat.com/show_bug.cgi?id=1267377
2015-11-02 21:02:42 -05:00
Cole Robinson c6da8fedb8 config: s/running_config/RUNNING_CONFIG/g 2015-11-02 16:09:47 -05:00
Cole Robinson 50b1b18ec4 create: Show a warning if no network is selected (bz 1267377) 2015-11-02 14:48:03 -05:00
Cole Robinson 90816a6263 create: Simplify network warning setup 2015-11-02 14:47:59 -05:00
Cole Robinson a91419d5c6 netlist: Don't trigger change events when repopulating list
Like we do in other places
2015-11-02 14:41:18 -05:00
Cole Robinson 0b6233b0f8 create: Small re-org of conn init
- Share error reporting with the two callers
- Fix an issue where the arch error dialog is shown when there's no connections
2015-11-02 14:08:09 -05:00
Colin Walters 3eaa59dc95 addstorage: Fix a typo in an error message
Just noticed it while using the app.
2015-10-05 14:47:50 -04:00
Cole Robinson b45a0ce286 create: Show TCG vs KVM for aarch64 too
Since it can be used for arm32 installs as well.

Requested here; https://bugzilla.redhat.com/show_bug.cgi?id=1214592#c4
2015-09-28 20:00:01 -04:00
Cole Robinson d57d4d0e76 netlist: Allow specifying a manual bridge name for qemu:///session (bz 1212443)
Since qemu has the setuid qemu-bridge-helper, give a way in the UI
to specify a manual bridge name for qemu:///session. Might not work
all the time but at least the users can try

https://bugzilla.redhat.com/show_bug.cgi?id=1212443
2015-09-24 16:32:04 -04:00
Cole Robinson 0f940a4432 details: Fix topology init from overriding curvcpus value
Reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1095323#c5
2015-09-24 09:31:04 -04:00
Cole Robinson 8b9b05f563 details: Fix busted UI after translation changes 2015-09-23 17:31:26 -04:00
Cole Robinson 8e58734699 create: Hide aarch64 warning if we switch architectures
Simplest is to have a separate UI area for the arch warning, since
the standard startup warning may still apply too.

Reported-by: João Pirralha <joaopirralha@gmail.com>
2015-09-23 16:51:49 -04:00
Cole Robinson 2f775b6bf0 Mark more UI strings as translatable 2015-09-23 16:39:48 -04:00
Cole Robinson 9da74dc7ea serialcon: Fix error reporting for remote connections 2015-09-22 12:41:57 -04:00
Cole Robinson 028ec70fe7 details: Mark more HW strings as translatable
Reported-by: João Pirralha <joaopirralha@gmail.com>
2015-09-21 19:16:31 -04:00
Robb Manes 5a7ffed25e createnet: Updated error message for IPv6 when checking
The message when using a non-private address when using IPv6 addresses
referred to private IPv4; changed it to indicate IPv6.
2015-09-21 17:05:13 -04:00
Cole Robinson ccaf749e29 fsdetails: Show mode field for test:/// connections 2015-09-20 20:22:10 -04:00
Cole Robinson 6a9f0089b9 devicefilesystem: Rename mode->accessmode
To reflect the name in the XML
2015-09-20 20:16:21 -04:00
Cole Robinson f8744a34da domain: Fix filesystem device editing 2015-09-20 16:48:30 -04:00
Cole Robinson a91137dbdd engine: Clean up some object lifecycle leaks
pygobject doesn't seem to choke on debug_leak_check anymore, so we
can use it to find object leaks. just doing a few for now since it's
generally not a big deal.
2015-09-20 15:30:00 -04:00
Cole Robinson d5d6cfff2c Copy urlgrabber progress bar code into virt-manager.git
This is so we can drop the dep on system python-urlgrabber, which will
block us from going to python3.

All we need is like 300 lines from python-urlgrabber for the progress
bar. In reality our needs are much lower, we don't need the fancy
progress bar that urlgrabber provides, but it's nice to have. So if
keeping a copy of this code causes issues in the future, we can probably
come up with something simpler (or hopefully there's a more common
python progressbar impl that we can use at that point).
2015-09-18 20:55:44 -04:00
Cole Robinson ec166e2cc4 console: Centralize more widget state updating 2015-09-18 13:22:48 -04:00
Cole Robinson 0b881591ec console: Add a separate notebook for serial pages
Rather than the 'offset' page hack we previously did that is hard to
keep track of. This allows for a handful of code simplifications
2015-09-18 12:36:06 -04:00
Cole Robinson dc61755e8b domain: Don't track xen Domain-0
It doesn't really fit our UI, so blacklist it
2015-09-17 16:06:14 -04:00
Cole Robinson a9d3cbd6cc connection: Add infrastructure to blacklist failing objects
It happens every now and then that a libvirt bug means calling XMLDesc
on an object will always fail. For example:

https://bugzilla.redhat.com/show_bug.cgi?id=1225771

We don't handle this very well and it can bleed into many other parts of
the code in a bad way. So if the initial polling of the object fails,
blacklist it entirely and ignore it for all future polling.
2015-09-17 15:51:52 -04:00
Cole Robinson 053cda8de7 virt-manager: Add hidden options --test-old-poll and --test-no-events
For easy testing of fallback codepaths
2015-09-17 15:18:22 -04:00
Cole Robinson 5df6757a0b viewers: Use GtkVnc.Display() not GtkVnc.Display.new()
The latter doesn't cause problems on Fedora, but it's currently throwing
errors on Freebsd:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203152
2015-09-16 16:46:39 -04:00
Cole Robinson 5f0433700b connection: Don't immediately encode pretty_name into gconf
Allows the app to change the defaults and users aren't stuck with the
bad names
2015-09-15 19:35:30 -04:00
Cole Robinson 71362cfb7e connection: Tweak pretty_name for Xen connections 2015-09-15 19:30:09 -04:00
Cole Robinson 477e82b35a create: Remove some leftover debug prints 2015-09-15 14:53:10 -04:00
Cole Robinson d896dd7347 create: Allow switching between KVM and TCG for armv7l (bz 1214592)
Otherwise we tried to always force KVM which reduces the usefulness
here. We still get the defaults right though

https://bugzilla.redhat.com/show_bug.cgi?id=1214592
2015-09-14 19:27:48 -04:00
Cole Robinson d661fe7859 createvol: Fix VM name hint setting 2015-09-14 16:29:27 -04:00
Cole Robinson 7953f23975 create: Update storage path in summary when VM name changes
If the name is going to influence the default storage path, update it
as people type
2015-09-14 16:22:17 -04:00
Cole Robinson 4455f7dcb5 create: Use generic helpers for removing already created devices
Simplifies some logic in a few places and makes it clearer IMO
2015-09-14 16:10:42 -04:00
Cole Robinson a4ddac4bb1 create: Always display the storage path in the summary 2015-09-14 15:22:17 -04:00
Cole Robinson ba0711b0bf addhardware: Use same default storage size as create.py (20 GB)
createvol too
2015-09-13 19:32:11 -04:00
Cole Robinson 16a744749f addhardware: Drop 'storage format' field
Originally this made sense, as it was the only way to specify a non-default
storage format when creating new storage.

Nowadays the storage browser is a full featured storage manager... and
this field is a bit confusing WRT whether it's used for creating new
storage, or informing libvirt about an existing image's format.

Drop it from the addhardware wizard, and simplify what we show in the
details wizard as well.
2015-09-13 19:13:53 -04:00
Cole Robinson 6861d467a4 addstorage: Clean up validate_storage a bit more 2015-09-13 19:08:30 -04:00
Cole Robinson a2bd31c2a6 virt-manager: Drop old style config- prefix for widget names
It's redundant and we haven't followed that pattern for a long while
2015-09-13 18:01:39 -04:00
Cole Robinson c558bb1f56 addstorage: Move validate_storage error catching to the caller
Saves some code indentation, and is more robust
2015-09-13 16:02:35 -04:00
Cole Robinson 4b5e65fe8d details: Remove iotune UI
This is a little low level and rarely used IMO to have it in the UI.
If people want to edit this we should point them at virt-xml which
seems like the appropriate user friendlyness for this feature.
2015-09-13 15:54:47 -04:00
Cole Robinson 15a6a7e210 addstorage: Drop explicit sparse option
This made more sense when raw was the disk image default, but nowadays
we use qcow2 which doesn't even support non-sparse, so the UI is always
disabled.

If the user changed their preference to raw, it still doesn't make much
sense to show the option, since they are likely using raw for performance
in which case they are going to want to preallocate anyways.

So just default to sparse=False. If users want to override it, they can
do it via custom created storage.
2015-09-13 15:43:24 -04:00
Cole Robinson bcc13dca31 virt-manager: Only save window dimensions on app exit (bz 1262561)
Rather than on every window change event which spams dconf and hits
the disk repeatedly. The new method is roughly what is suggested by
https://wiki.gnome.org/HowDoI/SaveWindowState

https://bugzilla.redhat.com/show_bug.cgi?id=1262561
2015-09-13 14:07:43 -04:00
Cole Robinson b95af3bedc create: Privatize more variables 2015-09-13 12:45:35 -04:00
Cole Robinson 241c3125e5 create: Drop redundant _have_startup_error
Isn't needed in the modern code
2015-09-13 12:28:16 -04:00
Cole Robinson ddea18baf9 create: Cleanup of distro detection code
- Use better variable names
- Lots of comments
- Streamline various parts
2015-09-13 12:28:16 -04:00
Cole Robinson 38a8454941 create: Organize code better
- Privatize a bunch of functions
- Rename functions to make their purpose cleared
- Document some functions
- Group functions into logical groups and use comment blocks to separate them
2015-09-13 12:28:16 -04:00
Cole Robinson 3730c31b40 console: Fix some issues with reconnecting to the viewer
Regressed with my recent console rework bits
2015-09-12 12:07:56 -04:00
Cole Robinson 6c7a3dbcc4 details: Use 'CPUs' instead of 'Processor'
All VM terminology is around CPUs, you never really see the word processor,
so be consistent
2015-09-09 12:20:44 -04:00
Cole Robinson 67f79569e6 create: Fix OS variant autocomplete
And drop the model infinite loop hack we added last release, since this
is the proper fix for both issues
2015-09-09 11:23:25 -04:00
Cole Robinson d66b691035 virt-manager: Allow mixing --connect and --test-first-run
To run with just the passed connection, but skip the first run logic.
Useful for UI testing
2015-09-06 18:15:16 -04:00
Cole Robinson 60d6161efc create: Clean up default storage if VM fails (bz #799721)
Similar to the virt-install change, we only do this with default storage
if the installed failed in such a way that we never left the wizard.

It isn't going to cover all cases, but should handle the common issue
of stranded disk images

https://bugzilla.redhat.com/show_bug.cgi?id=799721
2015-09-06 15:10:17 -04:00
Cole Robinson 697164f2e5 virtinst: Centralize urlgrabber meter lookup
We will eventually want to drop this dep since it's basically dead
upstream, this is a small step in that direction
2015-09-06 15:09:44 -04:00
Cole Robinson 1d7b74ba52 uri: Add a MagicURI class for handling magic virtinst URIs
And document it
2015-09-06 12:00:25 -04:00
Cole Robinson ed48b5d0a8 details: Centralize disabling widgets when console page changes
And fix a few bugs in that area, like disabling sendkey when we are
on the serial console page.
2015-09-05 18:33:31 -04:00
Cole Robinson 57fa64e542 details: Use devicedisk path lookup for source_pool 2015-09-05 17:59:47 -04:00
Cole Robinson 7a56c322ed domain: Drop is_management_domain
It's not consistently applied. If I had a setup to test against old xen
that still listed dom0, I'd make it so we never even show dom0 so we
can sidestep the problem entirely.
2015-09-05 17:32:03 -04:00
Cole Robinson 9e23843961 devicechar: Simplify host/port/mode handling
It's kinda crazy, and parts of cli API depend on it, but we can strip
a lot of the confusing bits away by pushing a small bit of logic to
the callers.
2015-09-05 17:16:18 -04:00
Cole Robinson fbb31bd156 fsdetails: Drop check for qemu target collision (bz #1257565)
We can fix the reported bug, but this is one of those cases where
libvirt or qemu should be warning if there's a problem, so just drop
our local check
2015-09-01 12:31:53 -04:00
Cole Robinson 364e352e5d console: Show connection name in window title
To differentiate between similarly named VMs on multiple connections.

Suggested-by: Pavel Fedin <p.fedin@samsung.com>
2015-08-31 18:38:05 -04:00
Cole Robinson 40d4c37868 domain: Use UpdateDevice for CDROM media change (bz 1229819)
This has been supported for a long time now, and is more tested these
days, so let's use it rather than the old style AttachDevice method

It also works around a libvirt issue described in bz 1229819
2015-08-10 18:47:12 -04:00
Cole Robinson 5f2913e5e1 createvol: Log parent pool XML when opening
And chosen volume XML
2015-08-10 16:58:09 -04:00
Lin Ma 7be81e6300 Get framebuffer size from 'vgamem' attribute for qxl device
Libvirt commit#742d49f introduces vgamem attribute to set the VGA
framebuffer size for QXL device of qemu, So we use vgamem instead
of vram here for qxl.

Signed-off-by: Lin Ma <lma@suse.com>
2015-08-10 16:26:06 -04:00
Pavel Hrdina 9f26bbb5e9 addstorage: remove _check_ideal_path
This feature has been added few years ago.  I don't think, that it's a
good feature, as it can ask a user to use different storage than he
actually wants to use.  One thing is automatically create a new storage
for user, if he let as do that, but we shouldn't annoy a user with this
question as he probably don't want to use the proposed storage.  For
example he would like to use different storage pool or while importing
existing storage.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1232599

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-08-10 15:07:38 -04:00
Cole Robinson 7d08d3d981 addhw: Drop unused columns from host-device list 2015-08-10 14:18:43 -04:00
Cole Robinson b4a7d89d4b addhardware: Fix USB host device listing 2015-08-10 14:12:27 -04:00
Cole Robinson 473eaf4aa5 create: Invalid os lookup should be a validation error dialog 2015-08-10 13:02:27 -04:00
Cole Robinson cca72a73c4 create: Fix backtrace when reporting OS error (bz 1241902) 2015-08-10 12:56:11 -04:00
Cole Robinson f2dac84173 connect: Fix some pylint 2015-08-09 14:01:22 -04:00
Cole Robinson 5f497b4d79 Mark a couple strings as translatable 2015-08-09 14:01:01 -04:00
Cole Robinson 4970615f48 addconnection: Fix qemu:///session vs. lxc:/// detection 2015-08-09 12:27:20 -04:00
Pavel Hrdina 745fa9fa5e scsi-storage: unify SCSI storage code and logic
There is no virtio-scsi or spapr-vscsi bus, but only 'scsi' bus.  There
are several types of SCSI controllers, but the SCSI storage don't care
about the SCSI controller and there is also no difference in address
specification or address type.  Use only 'scsi' bus for all SCSI storages
to correspond the reality and also the libvirt domain XML.  The only
difference is in the type of SCSI controller

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-08-05 13:41:47 +02:00
Pavel Hrdina db9d851c96 Revert "create: customize: Hide bus=virtio-scsi"
This reverts commit cca34185c0.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-08-05 13:41:45 +02:00
Pavel Hrdina f81358b02d details: don't display error if machine is missing in XML
Commint 0ddec919 updated the details page.  Now the detail page of
existing domain cannot update the 'machine' value, only prints that
value.  If we cannot get the machine from domain XML, don't pass a None,
but "Unknown" instead.  This can happen if you are connecting with
virt-manager to really old libvirt, the machine value is present in
domain XML since libvirt v0.9.5.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1238981

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-08-05 13:32:04 +02:00
Pavel Hrdina b06c91d2fc hostdev: add an address element for USB host devs if necessary
This issue was fixed for few years but only in virt-manager,
virt-install has the same bug.  If you have two USB devices with same
vendor and product ID, you need to use also address element to create
a valid XML to define that device into a guest.

This patch moves the logic from vmmAddHardware into VirtualHostDevice in
order to not duplicate that code for virt-manager and virt-install.

Also update the tests files to properly check this functionality.  I've
changed the USB device according the 'tests/testdriver.xml' and picked
one of the USB HUBs, because they have the same vendor and product ID.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1230611

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-08-05 13:32:04 +02:00
Pavel Hrdina cce1f89a34 virtManager/create: update capsinfo sooner in set_conn_state
We need to update/initialize the capsinfo sooner in that function to be
able to call has_install_options().

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1244566

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-21 11:55:11 -04:00
Pavel Hrdina 3ff35898a4 refactor detection of guest type capabilities
Each guest type can have its own capabilities and we should always ask
only for those capabilities.

The old approach was to get capabilities from libvirt and then for
example cycle trough all guests and return True, if any guest type
supports kvm or pae, etc.

Now we check those capabilities only for the correct guest type
according to defaults and input from user.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:11:40 -04:00
Pavel Hrdina a2505def2c pep8 E731: do not assign a lambda expression, use a def
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:01:20 -04:00
Pavel Hrdina c7049eb120 pep8 W503: line break before binary operator
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:01:20 -04:00
Kevin Zhao 8dbe96fc01 virt-manager : add support for architecture type "s390x".
For architecture "s390x",the disk and the network device are base
on "virtio" bus.The cdrom is based on "scsi".So set the default
cdrom bus as "scsi",the default bus as "virtio".Also the default
machine type is set to "s390-ccw-virtio" as it is the only supported
in "s390x".Also add a test cast of virt-install by cdrom in s390x.

(crobinso: Tweak test suite and minor formatting stuff)
2015-07-14 12:45:32 -04:00
Cole Robinson 34db1af7b6 createpool: Fix adding iscsi pools (bz 1231558) 2015-06-21 15:47:31 -04:00
Cole Robinson 77423e7a8d connection: catch more errors in filter_nodedevs (bug 1225771)
https://bugzilla.redhat.com/show_bug.cgi?id=1225771 Has an example of
libvirt failing to generate nodedev XML, so handle that too.
2015-06-09 11:41:39 -04:00
Cole Robinson 8033d33fe3 createinterface: Avoid gtk warning about double setting text renderer 2015-06-06 14:40:19 -04:00
Cole Robinson 853cefbfe8 createinterface: Don't double log about closing dialog 2015-06-06 14:32:04 -04:00
Cole Robinson 07d02a13fd mediacombo: Ensure has_media returns bool 2015-06-06 14:23:34 -04:00
Cole Robinson 68908c2d81 connection: Handle nodedevs disappearing in filter_nodedevs (bz 1225545)
Not exactly sure how we end up with a nodedev in the list that doesn't
have cached XML, but whatever
2015-06-06 14:21:05 -04:00
Pavel Hrdina 0fbe8e7a1f translation: fix wrong usage of _() function
All the strings have to be at first translated and then we can fill the
formated and translated string.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-06-05 16:33:51 -04:00
Chen Hanxiao 7251a2ba6e createinterface: fix a typo
s/selectabel/selectable

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-06-03 23:12:19 -04:00
Cole Robinson b02cb7ffa0 delete: Improve dialog sizing and scrolling
Drop horizontal scrolling, since with gtk3 hidden scrollbars it might
mean users don't realize there's info that is scrolled off.

Adjust the default sizing to match that pattern
2015-05-20 17:50:11 -04:00
Giuseppe Scrivano f8af2e6b10 create: verify HYPER-V support after customization
commit 938060ae53 moved default devices
setup to happen before UEFI is set invalidating what the commit
5acfccf6032abb9e8be89130d05b661e8b3f42c7 does.

Add another check to happen before installing the guest to disable
HYPER-V when not supported.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1185253

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-20 22:48:33 +02:00
Cole Robinson 43340f46a2 create: Fix infinite loop after uiutil rework
Repopulating the ostype/variant list triggers a bunch of change events,
which causes us to enter an infinite loop due to some minor behavior
change in the uiutil helpers.

The uiutil helpers are still correct, the root problem is we should be
disabling change events when repopulating those UI lists (we already
have to do a similar trick in a few other places, like host.py)
2015-05-20 14:18:09 -04:00
Cole Robinson 8a20a71c46 uiutil: Merge set_combo_entry into set_list_selection 2015-05-19 18:29:46 -04:00
Cole Robinson 23bf115024 uiutil: Rename select_list_row* to match getter functions 2015-05-19 18:29:46 -04:00
Cole Robinson 490aee74de uiutil: select_list_row_by_value: Handle value=None
Which is a legit value we use as a key in several places. Fix up
a potentially problematic caller
2015-05-19 18:29:46 -04:00
Cole Robinson 08116d2869 uiutil: Group similar functions with comment blocks 2015-05-19 18:29:45 -04:00
Cole Robinson 5219e49eec uiutil: Merge get_combo_entry into get_list_selection
There's no reason we can't handle it together
2015-05-19 18:29:45 -04:00
Cole Robinson fdad3efe24 uiutil: streamline column vs rowidx parameter name 2015-05-19 18:29:45 -04:00
Cole Robinson e8e2c831bf addhardware: Don't list device 'default' options
This is really only useful for building default XML internally, and
for virt-install stuff like --watchdog default. Instead just select
the 'default' value in the wizard
2015-05-19 18:29:45 -04:00
Cole Robinson f33b6d2750 addhardware: Modernize the code
- Privatize the actually private functions
- Drop the largely redundant get_config helpers
2015-05-19 18:29:45 -04:00
Cole Robinson b17c00ecca details: Clean up media eject/insert code 2015-05-19 18:29:45 -04:00
Cole Robinson 776c1d97c6 domain: Fix changing USB device model
Broken before v1.2.0
2015-05-19 18:29:45 -04:00
Cole Robinson 2168f33799 details: Unify controller model handling with addhardware 2015-05-19 18:29:45 -04:00
Giuseppe Scrivano 4b5c836a16 interface: read the start mode from the inactive conf XML
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1154480

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-15 09:14:09 +02:00
Giuseppe Scrivano 2c1e482b2d virt-manager: fix --show-host-summary error windows flooding
Break an endless loop vmmHost.overview_name_changed ->
vmmHost.conn_state_changed -> vmmHost._overview_name_changed.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1220322

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-11 20:20:10 +02:00
Cole Robinson 88e18c86d3 connection: Fix sending net-removed signal 2015-05-07 12:30:28 -04:00
Cole Robinson a65c1f62ec conn: Audit get_$obj callers, drop KeyError handling
These functions don't throw KeyErrors anymore, so adjust callers that
were handling it
2015-05-07 12:26:10 -04:00
Giuseppe Scrivano ac2be79658 storage: do not throw exception if the volume or the pool don't exist
commit 5357b91402 changed the semantic of
conn.get_(vm|pool|interface|nodedev|net), to return None instead of
raising KeyError. Leave the exception handling code in case the
semantic is going to be reverted.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1219427

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 17:42:58 +02:00
Giuseppe Scrivano ebcb7c064c sshtunnels: fix exception when the address is not an IP
bug introduced with commit a2d453f3e2

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1218958

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-06 21:27:50 +02:00
Cole Robinson 32d998b216 domain: Properly prime stat lists at object creation
Fixes graph spikes when initially connecting to a running VM
2015-05-04 18:42:26 -04:00
Cole Robinson cb0eaf23d8 conn/domain: Privatize stats list 2015-05-04 18:42:17 -04:00
Cole Robinson fbf841151d conn/domain: Condense the internal stats APIs 2015-05-04 18:05:54 -04:00
Cole Robinson 848123e6c8 domain: Fix memory stats for shutoff VM (bz 1215453)
memory doesn't have a separate input/output stats, so we shouldn't use
the in_out_vector_helper. This resulted in shutoff VMs appearing to still
use memory in the manager window.
2015-05-04 15:50:01 -04:00
Cole Robinson 1a5b87b066 details: Remove unused function 2015-05-04 14:18:03 -04:00
Cole Robinson cc67f8f194 addstorage: Clarify that VM will fail if cant set path search perms
https://bugzilla.redhat.com/show_bug.cgi?id=1181025
2015-05-03 17:33:26 -04:00
Cole Robinson cca34185c0 create: customize: Hide bus=virtio-scsi
We don't handle it correctly, need to duplicate the addhw logic
2015-05-03 17:24:02 -04:00
Cole Robinson 4547031152 addhardware: Generate disk targets for disks via customize dialog
Since the XML we use now is with the defaults filled in. Fixes some
issues in the log here:

https://bugzilla.redhat.com/show_bug.cgi?id=1213475
2015-05-03 17:17:53 -04:00
Cole Robinson a8d3afbcd9 domain: Log initial XML for virtinst/customize object 2015-05-03 17:01:16 -04:00
Cole Robinson 53703117d9 storagebrowser: Don't log about closing, if already closed. 2015-05-03 16:57:31 -04:00
Cole Robinson 68ce97d533 create: customize: cancel now cancels the entire installation
Trying to fall back to the create wizard can give weird results, since
it's really hard to ensure the customized changes are preserved if
the user changes things in the 'new' wizard.
2015-05-03 16:53:43 -04:00
Cole Robinson c8a0b8310c create: Fix a logging typo 2015-05-03 16:37:42 -04:00
Cole Robinson 252c216fb9 createpool: Don't unconditionally use /var/lib/libvirt
Doesn't make sense for session URIs
2015-05-02 19:54:14 -04:00
Cole Robinson 45e6cd4cac Remove redundant 'default dir' functions 2015-05-02 19:48:04 -04:00
Cole Robinson 892e13d2c0 connection: Tweak pretty names a bit 2015-05-02 19:20:18 -04:00
Cole Robinson cc3c6e24a3 packageutils: Add some extra logging 2015-05-02 18:01:52 -04:00
Ján Tomko be7611b645 connection: refresh domain XML on device hotplug
Listen to the VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event
too, added by libvirt 1.2.15.

https://bugzilla.redhat.com/show_bug.cgi?id=1179138

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2015-04-29 09:52:10 -04:00
Cole Robinson 0aeee5c449 serialcon: Fix opening with xen (bz 1215357)
Apparently xen doesn't set <serial> device alias names, and OpenConsole
just opens the first <console> device unconditionally.

Properly handling that would be to report it in the UI that we can
only open the first console, but for now just drop the alias check.
Apparently SUSE already does this as mentioned in the RH bug

https://bugzilla.redhat.com/show_bug.cgi?id=1215357
2015-04-26 11:54:55 -04:00
Cole Robinson 05db555145 libvirtobject: Don't raise error during init_libvirt_state
The connection doesn't handle it. If it ever needs to know we can have
it return a value or something.
2015-04-24 15:34:55 -04:00
Giuseppe Scrivano a2d453f3e2 sshtunnels: use ipaddr to check if address is loopback or unspecified
It supports IPv6 addresses written as "0::0", "0:0::0".

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-24 11:39:04 +02:00
Cole Robinson 18a6d8b444 migrate: Add 'temporary' option
This doesn't undefine the VM source, and leaves it temporary on the
destination. Basically the default migration action
2015-04-21 17:39:44 -04:00
Cole Robinson fb26349546 domain: Make the tick() logic easier to follow 2015-04-21 17:15:58 -04:00
Cole Robinson 62ad0e91ee migrate: Big reworking of the dialog
It's largely the same, but now

- The code is better organized
- The UI is much more streamlined, only showing relevant fields when
  required.
- We warn about the hostname/URI cases that we know libvirt will error on
- Drop some of the attempts at being smart, and just mimic what libvirt
  will do.
2015-04-21 17:15:58 -04:00
Cole Robinson bfcfdbf785 host: Remove some redundant connection fields 2015-04-21 16:33:41 -04:00
Cole Robinson 996c8b76b8 clone: Use conn desc if showing destination conn 2015-04-21 16:33:41 -04:00
Cole Robinson 692604e0a3 domain: migrate: Use UNDEFINE_SOURCE
Leaving a VM defined on the source is dangerous: if they are sharing
storage, and aren't using virtlockd, then they might be inadvertently
started in two places at once and trash a disk image.

Some people might still need the option to turn this off, so maybe we
will revive it. Not sure though
2015-04-21 16:33:41 -04:00
Cole Robinson 26c729887d domain: migrate: use PERSIST_DEST flag
Don't do it manually, it's been supported by libvirt for 5 years
2015-04-21 16:33:41 -04:00
Cole Robinson be86785fdd migrate: Drop unused 'live' parameter. We always pass LIVE 2015-04-21 16:33:41 -04:00
Cole Robinson 2b877cf337 migrate: Remove 'max downtime' support
This is only needed when people have very specific downtime constraints
on public facing services. I don't think that covers many virt-manager
users. So suggest they just use the command line for this.
2015-04-21 16:33:41 -04:00
Cole Robinson 39dc0c7b94 migrate: Drop 'bandwidth' UI
A bit too enterprisy for my tastes. If people need this they should use
the command line.
2015-04-21 16:33:41 -04:00
Cole Robinson 8aefc012c5 connect: Fix handling of missing avahi (bz 1213299)
gdbus seems to behave differently here now. Perform an API check at
initial lookup time to ensure avahi is available
2015-04-20 12:32:33 -04:00
Cole Robinson 7b1a4634a8 clone: Refresh cached pools after storage creation 2015-04-14 18:42:56 -04:00
Cole Robinson 6dbe19bd83 libvirtobject: Fix deleting a running VM
The recent XML rework wasn't catching when a domain disappears while
trying to refresh it's state from the event loop.
2015-04-13 18:24:46 -04:00
Cole Robinson 1a8c6ba645 console: Use VM title as window title 2015-04-13 17:30:12 -04:00
Cole Robinson e4e4c8c6f7 domain: Some 'customize before install' fixes after XML rework 2015-04-13 17:25:40 -04:00
Cole Robinson 10ad151d4b connection: Clarify tick functions and who should use them 2015-04-13 16:56:46 -04:00
Cole Robinson c82507fc41 mediacombo: Just log error if populating fails
This is a non-essential feature. I just hit a backtrace when trying
to refresh XML. It's fixed by the previous patch, but we should avoid
these errors from killing the create.py wizard at least.
2015-04-13 16:41:58 -04:00
Cole Robinson 83f1c5f4bb nodedev: Populate XML at init time 2015-04-13 15:43:48 -04:00
Cole Robinson 6ecf01a3bd console: Catch and handle password auth errors (bz 1151801) 2015-04-12 14:10:45 -04:00
Cole Robinson 4e47cc9061 console: Fix password entry grab_focus 2015-04-12 12:43:29 -04:00
Cole Robinson f013453999 sshtunnels: Don't log the SSH command over and over
Just log it once at init time
2015-04-12 12:21:38 -04:00
Cole Robinson 2ca72d1117 viewers: Don't try to use SSH tunnels in spice local case
Regressed with the recent tunnel cleanups
2015-04-12 11:06:15 -04:00
Cole Robinson acebd1248c viewers: Add explicit API for removing display from parent
Previously we were hacking it in
2015-04-12 10:33:41 -04:00
Cole Robinson c3fc4ee5a2 console: Drop timeout retry logic
This was needed in the days of old xen + libvirt, but I don't think
it's required nowadays, and if it is it's busted with our XML caching
I think.
2015-04-12 10:24:35 -04:00
Cole Robinson 792774450f console: Properly cleanup viewer when closing
Otherwise signals aren't properly removed, can cause some backtraces on
shutdown.
2015-04-12 09:53:23 -04:00
Cole Robinson 80c2dde350 virt-manager: Fix connection to domain from cli
Need to tweak our signal handling here with the recent connection changes.
2015-04-12 09:34:55 -04:00
Cole Robinson aec851f73a viewers: Always clean up tunnel FDs when closing viewer
We were basically leaking a lot of FDs. They were still being tracked
but they were stranded and never dealt with.
2015-04-11 22:44:03 -04:00
Cole Robinson e2cdfd651c sshtunnels: Don't use python socket for FD we pass to spice
Since socket objects close their FD when they are garbage collected,
this seems to lead to crashes like reported here:

https://bugzilla.redhat.com/show_bug.cgi?id=1135808
2015-04-11 22:36:04 -04:00
Cole Robinson 21b80226a8 config: Remove debug print statement 2015-04-11 22:36:04 -04:00
Cole Robinson 285e345f17 viewer: Simplify tunnel handling
- Cache ginfo, since it is tied to a single viewer instance
- Always create the sshtunnels object
- Track lock state so we can make it idempotent
2015-04-11 21:39:24 -04:00
Cole Robinson 0f3d86ac9e guest: Disable PM for virt-install as well
We are just mirroring the behavior that virt-manager (and boxes) have
used for a while now.

In my experience the average user is confused by their VMs suspending,
so for our sake I'd rather make people opt into this feature.
2015-04-11 18:02:45 -04:00
Cole Robinson e9495110ca connection: Refresh XML for every libvirt object event
We tried to split up status vs XML refreshing, but they are tied together
in various ways (like the runtime XML changes when a VM starts). This
was breaking console connecting when starting a VM
2015-04-11 17:24:30 -04:00
Cole Robinson 630a80de62 storagelist: Fix sorting by size 2015-04-11 15:08:07 -04:00
Cole Robinson 9d99b8caab createvol: Don't cap capacity to host space (bz 1118706)
Only cap allocation, since we can overcommit with sparse images.
2015-04-11 14:56:23 -04:00
Cole Robinson d7a7d00e9e engine: Don't raise conn poll errors if only systray visible (bz 1082685) 2015-04-11 14:41:02 -04:00
Cole Robinson f7b05912f0 engine: Before launching any error, try to find a parent dialog 2015-04-11 14:39:52 -04:00
Cole Robinson 0b47635676 vmmenu: Fix updating submenu state 2015-04-11 14:14:24 -04:00
Cole Robinson 9a1fc63c89 manager: Disable 'force reset' if HV doesn't support it (bz 1078731) 2015-04-11 14:01:45 -04:00
Cole Robinson 839ce682b1 Drop support for non-managed save/restore
All major drivers either support it, or don't support save at all,
so I think we can safely drop it. If people still need it they can
get by with virsh.
2015-04-11 13:52:48 -04:00
Cole Robinson 3d2afbaf6f connection: Allow setting a custom 'pretty name' (bz 784701)
We've had multiple requests over the years for something similar. People
might have to connect to multiple IP addresses, or really large hostnames,
that become difficult to distinguish in the UI.

Add a field in the host details page that allows setting a custom name,
and store it in gsettings.
2015-04-11 13:39:25 -04:00
Cole Robinson 4781ad6cd6 connection: Simplify manager row 'pretty name' handling
Unify all the callers, and use some UI ellipsizing to handle
crazy long hostnames.

This drops the conn name collision prevention stuff which can be
useful when you have lots of similar connection names. But upcoming
patches will make it mostly redundant.
2015-04-11 12:57:32 -04:00
Cole Robinson fc171fc31d connection: Bunch of minor tweaks handling TCP URIs 2015-04-11 12:08:57 -04:00
Cole Robinson ee9aa0ef11 host: Don't trigger selection callbacks when conn is closing
We already do this for storage, make sure we do it for iface + net
as well.
2015-04-11 11:40:47 -04:00
Cole Robinson 8c107f87f9 host: Remove some redudant conn details
And some minor UI spacing fixes
2015-04-11 11:29:03 -04:00
Cole Robinson 20cd7f86ca domain: Remove manual_reboot
qemu has provided this feature for a long time, and every other driver
we care about provides a reboot implementation as well, so drop our
handling of it.
2015-04-11 11:13:05 -04:00
Cole Robinson 8f563cbae8 storagelist: Simplify Ui a bit
Drop the bold and overly sized text. Drop the name duplication.
Drop the type field since it's shown in the pool list.
2015-04-10 18:40:54 -04:00
Cole Robinson 705daf6db9 storagelist: Fix refresh button sensitivity 2015-04-10 18:20:13 -04:00
Cole Robinson 87098d1273 storagepool: Refresh volumes on state change
Otherwise the UI list is out of date
2015-04-10 18:17:29 -04:00
Cole Robinson a0075beab4 libvirtobject: Minor tweaks to ensure we cache domain bits correctly 2015-04-10 18:03:56 -04:00
Cole Robinson 42648f45f0 libvirtobject: Clean up XML invalidation
Make sure we aren't invalidating things when we are using events. Don't
overload APIs so much.
2015-04-10 17:50:06 -04:00
Cole Robinson a7a19b2abc libvirtobject: Drop redefine_cached
There's no external callers anymore, and the prospect of keeping this
stuff cached but potentially having a thread invalidate it makes me nervous,
so simplify things by making callers explicitly request the object they
want to redefine.
2015-04-10 17:23:11 -04:00
Cole Robinson 1552cb257e domain: Make device XML editing similar to guest XML editing 2015-04-10 17:15:07 -04:00
Cole Robinson 2c9adb18bc storagelist: Fix backtrace on connection close 2015-04-10 16:53:19 -04:00
Cole Robinson d0ffd954cd connection: Unify initial object refresh handling
Have libvirtobjects advertise a routine specifically for initial setup,
and emit a signal when it's complete. Then dispatch the associated conn
signal on demand as the objects are initialized. This should avoid a
whole class of ordering issues, and is easier to follow IMO.
2015-04-10 15:00:42 -04:00
Cole Robinson 629627b663 connection: Drop unused open() argument 2015-04-10 15:00:34 -04:00
Cole Robinson 6071ab0ea4 uiutil: Clarify a few ambiguous function names 2015-04-10 15:00:34 -04:00
Cole Robinson 49e3ea2cdf host: Make sure first object selected when conn connects
Previously it was dictated by what order we received conn
signals in.
2015-04-10 15:00:34 -04:00
Cole Robinson 838baf6946 connection: tick: Operate on combined object lists
Makes the flow a bit simpler, and allows us to break out polling without
having to pass around a ton of lists.
2015-04-10 15:00:34 -04:00
Cole Robinson 5357b91402 connection: Store all object lists in an external class
Simplifies list management and allows us to use real locking to prevent
list collisions.
2015-04-10 15:00:34 -04:00
Cole Robinson 2d25c920ea connection: Use consistent nodedev function names 2015-04-10 15:00:34 -04:00
Cole Robinson 3df02e8ee1 host: Fix a couple recently introduced issues 2015-04-10 15:00:34 -04:00
Cole Robinson cb5d075f50 libvirtobject: Unify a few APIs and conn tick handling 2015-04-10 15:00:34 -04:00
Cole Robinson 1e154a373d libvirtobject: Populate status up front
And use this to kill paranoid object tick() that are sprinkled throughout
the code.
2015-04-10 15:00:34 -04:00
Cole Robinson 4933cf7600 libvirtobject: Clarify force_update_status 2015-04-10 15:00:34 -04:00
Cole Robinson c9b882619e libvirtobject: Add decorator for lifecycle events
That does the appropriate event loop updating, if needed.
2015-04-10 15:00:34 -04:00
Cole Robinson a3f8d73a9c libvirtobject: Unify internal status APIs and signals
Drop config-changes vs. status-changed and just use one signal, since they
are largely the same code paths for all users.
2015-04-10 15:00:34 -04:00
Cole Robinson 01bf07ba11 libvirtobject: Unify status signals
Dispatch them all from the actual object and not proxied through
the connection. Use the same signal name for all objects with the same
signature.
2015-04-10 15:00:33 -04:00
Cole Robinson a45fc36d06 host: If connection disconnects, close add* wizards 2015-04-10 15:00:33 -04:00
Cole Robinson fb7a921ec4 storagelist: Select newly created pool/volumes
And clean up some of the internal APIs in this area
2015-04-10 15:00:33 -04:00
Cole Robinson 92c42bc5a0 details: Improve UI labeling of keyboard devices 2015-04-09 13:36:40 -04:00
Cole Robinson 22b9932c47 addhardware: Add USB keyboard option (bz 1176724) 2015-04-09 13:25:15 -04:00
Cole Robinson 2bf1a29f40 details: Add tooltips if device isn't removable 2015-04-09 13:11:20 -04:00
Cole Robinson 1c63c2b0d9 libvirtobject: Invalidate cache if redefine fails 2015-04-09 13:01:38 -04:00
Cole Robinson 771154d104 addhardware: Make network model a combo entry
So users can add non-advertised models
2015-04-09 12:58:21 -04:00
Cole Robinson 058c06972e Break out shared storage UI to storagelist.py (bz 1060433)
We were already sharing a chunk of this in a haphazard way. Now officially
break it all out, similar to netlist.py. This mostly unifies the views
of host->storage and storagebrowser.py
2015-04-09 12:31:24 -04:00
Cole Robinson 68a11727a4 create: Show proper install options for ppc64le (bz 1209720) 2015-04-08 09:31:07 -04:00
Cole Robinson cc3a522455 Use is_pseries() helper more consistently 2015-04-08 09:31:01 -04:00
Cole Robinson a4e6280a6c details: Refresh boot arrows when unchecking an item 2015-04-07 19:43:09 -04:00
Cole Robinson ec162888f5 addhardware: Make bus list dependent on device type
And not the other way around. It's less confusing this way IMO, particularly
if virtio is selected by default and the user is confused, wondering
where the cdrom option is.

Take the opportunity to actually share the bus combo logic between details
and addhardware
2015-04-07 19:31:30 -04:00
Cole Robinson 1d98af2c47 create: Move mac address editing to customize dialog
People should rarely need to edit the mac address, so remove it from
the create wizard. However we only allow editing the mac address in
the 'customize' dialog: regular network details disables editing, since
that should be a rare and potentially dangerous operation.
2015-04-07 18:52:35 -04:00
Cole Robinson 55c8453d15 details: Use 'Hypervisor default' description in more places (bz #1073521) 2015-04-07 18:36:07 -04:00
Cole Robinson 938060ae53 domain: Fix customize dialog to show VM config with defaults set
Right now we aren't showing the defaults like disk buses, sound devices,
disk cache modes, etc. This is confusing to the user and not that useful.

Encode the defaults before launching the wizard, so the user can see what
the end config will actually look like.

This might cause weirdness if going back to the create.py wizard, but
we'll see if anyone complains before handling that.
2015-04-07 18:36:06 -04:00
Cole Robinson be5c2c742c libvirtobject: Clean up the internal XML APIs
There was lots of redundancy and confusing semantics. Document functions,
drop a bunch of unneeded ones.
2015-04-07 17:41:29 -04:00
Cole Robinson c66bc2a87f connection: Have get_nodedevs return vmmNodeDevice
To make it consistent with similar vmmConnection functionas
2015-04-07 14:12:00 -04:00
Cole Robinson ebfb0cd726 mediadev: Kill the abstraction, just use nodedevs
It's really a useless hold over from the days when we manually talked
to HAL.

One semi useful bit lost in the shuffle is the option to repoll cdroms
for media. But since virt-manager allows attaching a device to the
VM regardless of whether it notices media change, this plumbing is
really overkill. If libvirt ever grows nodedev events we will get this
much easier.
2015-04-07 13:59:43 -04:00
Cole Robinson abbc781cab connect: Expand check for qemu binaries
And drop dead handling of qemu:///session
2015-04-06 16:43:44 -04:00
Cole Robinson fa0dc2b6dd netlist: Don't set portgroup="" 2015-04-06 16:41:02 -04:00
Cole Robinson ef5552d0aa configure: Add --default-hvs, kill --with-bhyve
Takes a comma separated list of HVs, and only shows those as options in
the 'Open Connection' wizard. This option can be used to hide the bhyve
option as well, so drop --with-bhyve
2015-04-06 16:29:28 -04:00
Cole Robinson a773a66a3f virtcli: Export config variables in a class object
Makes things easier to extend later
2015-04-06 15:54:35 -04:00
Cole Robinson feb010621b addhardware: Don't advertise IDE for Q35 (bz #1207834)
Laine suggests we hide it altogether
2015-04-06 13:36:54 -04:00
Cole Robinson 3a36d95da0 details: Explicitly label virtio scsi disks + controllers 2015-04-04 20:06:40 -04:00
Cole Robinson c25bb28db8 engine: On connection error, try and set dialog parent
Avoids a GTK stderr warning
2015-04-04 19:40:22 -04:00
Cole Robinson dd8f7c90c0 addhardware: Allow SATA CDROM (bz 1207834) 2015-04-04 19:07:39 -04:00
Cole Robinson 070dd60732 create: If we can't detect URL, still only show 'supported' list 2015-04-04 16:32:41 -04:00
Cole Robinson ce73272c7e create: Drop hardcoded STABLE_OS_SUPPORT list
It's out of date, and doesn't even seem to work with current RHEL versions
and no one is complaining.

If we want to add it back, it should be an explicit setup.py configure
option.
2015-04-04 13:48:15 -04:00
Cole Robinson 595b5b4bdf osdict: Drop explicit 'type' class
create.py is the only thing that cares about this nowadays, so we can
work with things to make it all simpler.
2015-04-04 12:48:50 -04:00
Cole Robinson 647420ca90 create: Log results of recommended resources 2015-04-04 12:10:20 -04:00
Cole Robinson bd9ab2d5b5 osdict: Add toplevel OSDB as API entry point
Makes code more readable, and lazy loading simpler.
2015-04-04 12:06:41 -04:00
Cole Robinson 03dbbac806 console: Make API used by vmmDetails explicit
And hide everything else. Similar to what we did with the Viewers, this
should help clarify what the boundaries are here.
2015-04-03 21:34:03 -04:00
Cole Robinson f589f01665 console: Move viewer classes to viewers.py 2015-04-03 20:54:38 -04:00
Cole Robinson 3b671a9ac3 console: Large amount of internal API tidying
It's very difficult to tell what bits of Viewer that vmmConsolePages
accesses, and what bits of vmmConsolePages that vmmDetails will access.

Clean up the Viewer side with consistent function names, lots of comments,
and privatizing everything that shouldn't be shared.

Yeah this is a big ugly commit...
2015-04-03 20:43:48 -04:00
Cole Robinson b654db1d17 create: Add aarch64 to the arch priority list
Since it's reasonably well supported now
2015-04-03 17:37:34 -04:00
Cole Robinson 97259c4d9b capabilities: Store results of guest_lookup together
Simplifies API users lives to not have to remember whether caps guest
or caps domain contains a particular value.
2015-04-03 17:37:08 -04:00
Cole Robinson 81a1910d90 capabilities: Rename no_install_options -> has_install_options
It's easier to visually parse the wording
2015-04-03 17:25:29 -04:00
Cole Robinson fe9ffe86f6 capabilities: Drop xen-only bios virt checks
These only work for xen x86, and are less relevant nowadays since HW
virt has been around for a very long time. Also it's tough to be sure
that we aren't giving a bogus warning.
2015-04-03 17:25:29 -04:00
Cole Robinson f5b13a6e19 Drop all references to xenner, it's long dead 2015-04-03 16:45:43 -04:00
Cole Robinson d4dfbd41b5 capabilities: Use XMLBuilder for cpu_map parsing
And clean up the internal bits a little
2015-04-03 16:45:43 -04:00
Cole Robinson cac4ac1401 capabilities: Switch to use XMLBuilder
Just a cleanup to finally unify all the XML objects around the same
API, and drop a bunch of old cruft.
2015-04-03 16:45:42 -04:00
Cole Robinson 0492dbc1b1 createpool: Remove some pylint 2015-04-03 15:26:33 -04:00
Charles Arnold 20fe287341 virt-manager: Don't allow an empty string for a network name
When starting the 'Create virtual network' wizard, you are allowed to proceed
without specifying a Network Name.  An error only occurs after all else is
completed with the wizard. This patch stops the user from proceeding if a
network name has not been specified.

The check for an empty string is done in util.py which also effects storage
pool names and guest names neither of which should have empty strings.

Signed-off-by: Charles Arnold <carnold@suse.com>

Message-Id: <551D664702000091000F42E8@prv-mh.provo.novell.com>
2015-04-03 10:49:42 -04:00
Cole Robinson ce74cd7726 connection: Protect conn state tick() updates with a lock
If the mainloop is backed up, tick_send_signals might not run before
another conn.tick call is scheduled by the tick thread. conn.tick would
then be operating on incorrect self._vms since it was never updated.

Don't run another tick() until tick_send_signals has released a lock.

https://www.redhat.com/archives/virt-tools-list/2015-April/msg00009.html

Reported-by: Charles Arnold <carnold@suse.com>
2015-04-02 14:05:56 -04:00
Dustin C. Hatch 7acbdd9bf3 preferences: Correct usbredir preference values
All of the gsettings values of the "prefs-add-spice-usbredir" combo box
result in the preference being set to true, causing all new VMs to have
USB redirection added. This commit corrects the value of the "No" row to
correctly disable the setting when selected.

Signed-off-by: Dustin C. Hatch <dustin@hatch.name>
2015-03-26 19:16:33 -04:00
Cole Robinson 606069b1f4 manager: Use case-insensitive sort for VM names (bz 1155227) 2015-03-26 19:13:29 -04:00
Cole Robinson b4a7c5e67d virt-manager: Refresh pools after VM/storage is created (bz 1146282)
After the caching changes over the past year, virt-manager's internal state
isn't accurate when virtinst creates new disk storage.

Manually update the pools at the two virtinst entry points: create.py and
addhardware.py
2015-03-26 19:08:04 -04:00
Cole Robinson 6a24eb9d30 createnet: Remove unused module 2015-03-26 18:05:38 -04:00
Cole Robinson af562320a5 createnet: Drop incorrect domain name validation (bz 1195873)
Just let libvirt error if something is wrong
2015-03-26 17:11:23 -04:00
Cole Robinson 87c5094745 details: Don't access console.viewer directly
Add accessors for everything details.py needs. Makes separation clearer
2015-03-26 13:16:50 -04:00
Cole Robinson 26abb5a2b5 console: Drop _has_property
All these checks are redundant with modern deps
2015-03-26 13:10:38 -04:00
Giuseppe Scrivano 0aa200604a addhardware: default to an existing bus when adding a new disk
When a new disk is added, by default choose a bus that is already used
by an existing disk, if any.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1206097

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-26 15:25:16 +01:00
Cole Robinson 4224772852 netlist: Streamline bridge and macvtap labels (bz 1147660) 2015-03-25 08:47:21 -04:00
Marc Deslauriers 8574eedd2e virt-manager: Don't clear all page visibilities during initialization
Since commit dfa23765, page_changed() sets page visibilities based on the
value of the newpage parameter. Calling the function without it being set
makes all pages invisible at once during initialization, resulting in a
weird scenario which prevents the window from getting proper focus events
when another window partially overlaps it, resulting in stuck grabs.
Message-Id: <55114787.6070401@canonical.com>
2015-03-24 12:36:16 -04:00
Cole Robinson 2a31ff0248 guest: Perform stable_defaults check using our emulator
Not passing an emulator is only for showing ideal defaults in the UI.
When doing internal checks, we only want to disable features if we know
the emulator doesn't support them.
2015-03-23 16:49:32 -04:00
Cole Robinson 7a1b7b69e3 Drop non-ascii text from files
Seems to be tripping up coverage output on f22
2015-03-23 15:56:55 -04:00
Giuseppe Scrivano 61e06856a3 virt-manager: Allow to change SGIO with LUN disk devices
It is added only in the details window, and intentionally not added to
the addhardware UI to keep it simpler.  Users can edit this after a
new device is added.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-16 20:32:40 +01:00
Giuseppe Scrivano ef286321f9 Fix an exception while a XEN domain is shutting-down
I've noticed twice today that 'guestcpus' was set to 0 while the
domain was shutting down.  Play safe and check that 'guestcpus' is > 0
before divide by it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-26 11:08:57 +01:00
Giuseppe Scrivano 64264e8fa2 Disable domain events with XEN
When XEN is used, disable domain events and use polling.

On RHEL-5.9 virDomainInfo() seems to not report correctly the domain
status when called immediately after the event is received.

Solves: https://bugzilla.redhat.com/show_bug.cgi?id=1177207

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-26 11:08:57 +01:00
Giuseppe Scrivano 7b630c00a0 Move stable_defaults from vmmConnection to VirtualConnection
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-24 17:44:23 +01:00
Cole Robinson 0befc54abe details: Handle libvirt reporting multiple firmware paths 2015-02-22 11:19:50 -05:00
Cole Robinson 4ee9fdf944 domcapabilities: Get arch from caps XML 2015-02-22 11:13:59 -05:00
Cole Robinson a5b3e2adab create: Try to default to UEFI for aarch64
If we detect AAVMF, set it up, and allow all install options.
If we don't find AAVMF, disable all options except import install (the
current behavior) and show a warning.
2015-02-22 10:25:51 -05:00
Cole Robinson 0ddec9199b details: Don't allow changing machine type for existing VM
But still allow it from the customize dialog. It's one of those things
that rarely can be changed for a working VM and things continue to work.
2015-02-22 10:25:51 -05:00
Cole Robinson a04307cd70 virt-install: Add --boot uefi
Will enable UEFI if we know libvirt + hypervisor support it, and libvirt
is advertising a suitable UEFI binary.
2015-02-22 10:25:47 -05:00
Cole Robinson a2109f922c console: Drop custom usb format string
It's just recreating the default, and causes a headache with translations
2015-02-11 13:14:19 -05:00
Giuseppe Scrivano a063a74831 storage: change default storage size to 20G
If libosinfo fails to detect the operating system or the user doesn't
select any, use 20G by default.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-01-27 20:08:04 +01:00
Cole Robinson f815c988aa details: When VM is run, always update console page
If we were focused on the VM details page for a container, then clicked
'Run', the console page wouldn't be switched to view the serial console.
Make that work, but continue to not switch focus away from the current
non-console page.

Based on Cédric's patch here: http://www.redhat.com/archives/virt-tools-list/2015-January/msg00078.html
2015-01-27 13:41:45 -05:00
Charles Arnold 65f7017eaf createnet: Fix creating network with forward device 2015-01-16 13:30:36 -05:00
Richard W.M. Jones 22b338a65a virt-manager, inspection: use add_libvirt_dom
Enable inspection only if the add_libvirt_dom function is present at
runtime.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1075143

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-01-09 12:32:45 +01:00
Cédric Bosdonnat 7e01c4f1cd Default connection URI if libvirt-daemon-driver-lxc is installed
The default URI is set to lxc:/// if libvirt's lxc driver is installed
locally, but only if there is no kvm/xen URI to default to.
2014-12-10 13:28:36 -05:00
Cole Robinson 9552afcc92 storagebrowse: Standardize on set_finish_cb
Instead of gobject signals
2014-12-09 18:37:00 -05:00
Cole Robinson e61311fc8a storage: More support for network pools
Including parsing multiple hosts, filling reasonably defaults, making
sure the createpool wizard does the correct thing, etc.
2014-12-09 16:12:47 -05:00
Cole Robinson cff08223ba util: Move uri_split to its own URISplit class
Does what uri_split did, but wraps it all up in an object that makes
handling the data easier, and makes it easy to extend.
2014-12-09 08:43:19 -05:00
Cole Robinson 7e2ea81a2c addstorage: Switch away from set_create_storage 2014-12-05 21:49:10 -05:00
Cole Robinson 66a8c5d374 vmm: conn: Don't abuse path_definitely_exists for pool refreshing
Just catch any errors and continue on
2014-12-04 20:39:27 -05:00
Cole Robinson 6489df83ca devicedisk: Rename path_exists -> path_definitely_exists
Since it's a best effort attempt, try to make it more clear that
we aren't certain if paths exist in some cases.
2014-12-04 20:10:37 -05:00
Cole Robinson a75aa47daf devicedisk: Use consistent capitalization for property names 2014-12-04 16:30:18 -05:00
Cole Robinson 01d6541f69 create: Don't show default disk path on summary page
Since it's dependent on the VM name, which the user might change
2014-12-03 13:14:36 -05:00
Cole Robinson 4a678f0543 create: Fix default storage path when VM name is changed (bz 1169141)
Regressed with 2e7ebd4 . Use skip_disk_page() to determine when we
shouldn't assume default storage
2014-12-03 13:08:18 -05:00
Cole Robinson c090d18beb console: Show multiple graphics devices in menu list
But actually switching to one isn't supported, so show a tooltip to
that effect.
2014-12-03 12:21:57 -05:00
Cole Robinson ef99daa3d1 console: Rework serial menu building
Mostly code reorg with some minor bug fixes thrown in.
2014-12-03 12:14:32 -05:00
Cole Robinson d178923609 create: Clarify function name
It's no longer the 'name' page
2014-12-03 10:13:39 -05:00
Cole Robinson 0b391fe9ed virt-manager: Enforce gobject introspection versions
This is needed with freebsd and opensuse at least. See:

https://bugzilla.suse.com/__show_bug.cgi?id=901869
http://www.redhat.com/archives/libvir-list/2014-December/msg00184.html
2014-12-02 14:01:28 -05:00
Giuseppe Scrivano 51e5a47120 virt-manager: reset vgamem for video when changing device type
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1169295

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-12-01 17:02:22 +01:00
Giuseppe Scrivano ad1f0fa081 details: fix --show-domain-performance
the introspection page could be missing, in this case the tabs values
are shifted by one.  The new code looks for the correct row number
before selecting it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1167600

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-26 08:41:40 +01:00
Giuseppe Scrivano c9a04c23dc virtManager: show correctly IPv6 addresses
VirtualConnection.get_uri_host_port already splits this information
taking care of IPv6 addresses, do not split it again.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1094631

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-20 15:51:16 +01:00
Giuseppe Scrivano 5c68542151 console: switch to CONSOLE_PAGE_UNAVAILABLE while waiting for login
It fixes a race condition if the ERROR_AUTH error if received while
still on the CONSOLE_PAGE_AUTHENTICATE and skipping the page_changed
event.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1165990

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-20 15:51:16 +01:00
Giuseppe Scrivano 1cdd10ce34 virt-manager: show the manager when using a wrong domain id
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1164691

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-17 16:50:04 +01:00
Marc-André Lureau 5daee287d9 tunnels: do not close unowned fd
The fd is handed to spice-gtk and gtk-vnc. They will close it when no
longer needed. Double closing leads to various race issues, since the
same fd may be opened for a different usage.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1081227
2014-11-16 12:09:02 -05:00
Giuseppe Scrivano 741f2923d7 details: do not show MAC address if not set
Fixes this exception:
Traceback (most recent call last):
  File "virt-manager/virtManager/create.py", line 1780, in finish
    self.customize(guest)
  File "virt-manager/virtManager/create.py", line 1812, in customize
    self.config_window = vmmDetails(virtinst_guest, self.topwin)
  File "virt-manager/virtManager/details.py", line 560, in __init__
    self.populate_hw_list()
  File "virt-manager/virtManager/details.py", line 3165, in populate_hw_list
    self.repopulate_hw_list()
  File "virt-manager/virtManager/details.py", line 3220, in repopulate_hw_list
    update_hwlist(HW_LIST_TYPE_NIC, dev)
  File "virt-manager/virtManager/details.py", line 3195, in update_hwlist
    label = _label_for_device(dev)
  File "virt-manager/virtManager/details.py", line 188, in _label_for_device
    return "NIC %s" % dev.macaddr[-9:]
TypeError: 'NoneType' object has no attribute '__getitem__'

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1164123

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-14 10:45:18 +01:00
Giuseppe Scrivano f19a07d5a5 virt-manager: close the SPICE main channel on an AUTH error
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1152981

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-10-28 14:59:21 +01:00
Cole Robinson cbf38cbe9f pylint: Ignore new warnings 2014-10-27 19:53:25 -04:00
Wei Huang 2d6422e10b virt-manager/details: add checking code for CPU threads
This patches adds the support to check the thread # against the
selected CPU model. If the selected # of CPU threads > 1 and CPU
model does not support hyper-threading, a warning message will be shown.

Signed-off-by: Wei Huang <wei@redhat.com>
2014-10-27 18:05:21 -04:00
Giuseppe Scrivano 750eeaad98 virt-manager, details: properly check for pool presence
commit 5e8f35f5e6 introduced this
problem.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-10-14 12:23:08 +02:00
Giuseppe Scrivano 8f1aa5a4f0 virt-manager, delete: fix path for disk type='volume'
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1146869

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-10-14 12:23:08 +02:00
Lubomir Rintel 835d40b151 addhardware, details: STOCK_DIRECTORY is gone
It's no longer present in Gtk+ 3.14 and deprecated since at least 3.10 in favor
of named "folder" icon. That seems a good fit, a quick check on my system finds
it present in all themes that are available.
2014-10-06 12:14:14 -04:00
Guido Günther 1726505fd6 s/gconf/gsettings/
GConf got replaced by GSettings but some methods kept the old name
2014-09-29 08:56:37 -04:00
Cole Robinson bf6af370c6 sshtunnels: Clarify a logging message 2014-09-29 08:55:47 -04:00
Cole Robinson d1f36ac875 domain: Fix defining domain after migration 2014-09-29 08:55:47 -04:00
Giuseppe Scrivano 5e8f35f5e6 virt-manager, details: fix path and size for disk type='volume'
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1146869

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-26 16:24:59 +02:00
Cole Robinson 69b131f81f engine: Clarify a debug message 2014-09-25 10:13:20 -04:00
Cole Robinson 3e5a20aaf1 addhardware: Fix attaching USB/PCI hostdev (bz 1146297) 2014-09-24 20:12:38 -04:00
Cole Robinson 310f65273f osdict: Restrict n-cpus to 1 for machvirt
It fails to boot otherwise
2014-09-23 17:09:36 -04:00
Cole Robinson c4162f6708 Use -M virt as default machine for arm/aarch64
Centralize the default machine logic in caps and use it consistently
2014-09-23 16:05:48 -04:00
Laszlo Ersek 3e5b61da86 domain: relax the UNDEFINE_NVRAM condition precisely to libvirtd's one
(1) A separate nvram (ie. variable store) file for the domain exists if
and only if the following condition holds:

    (self.get_xmlobj().os.loader_ro is True and
     self.get_xmlobj().os.loader_type == "pflash")

(Refer to libvirtd's qemuPrepareNVRAM() function, as of commit 742b08e30.)

(2) The

    self.get_xmlobj().os.nvram

condition is sufficient, but not necessary, for the separate varstore file
to exist. That is, if the condition holds, then the separate varstore file
exists for sure, but if the condition doesn't hold, the file may exist
nonetheless. (Because libvirtd can auto-generate the varstore file's
pathname.)

This means that requiring condition (2) for setting UNDEFINE_NVRAM on
domain deletion will miss a subset of the cases, ie. when the necessary
and sufficient condition (1) holds, but the sufficient-only condition (2)
doesn't.

Make sure that the code uses the necessary and sufficient condition (1).

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2014-09-22 12:32:31 -04:00
Cole Robinson 662922dc95 createinterface: Use inactive XML for embeding child XML
The inactive XML will drop things like complex protocol output and
link state info, which netcf can choke on for sub interfaces.
2014-09-21 15:04:16 -04:00
Cole Robinson bd0bcba0b5 createinterface: Fix 'copy child protocol' behavior (bug 1122743)
We should only copy the inactive protocol XML, which lists things
like dhcp, vs the running XML, which is the same format as static
addressing.
2014-09-21 15:02:27 -04:00
Cole Robinson 6a9aa6827b console: Break out tunnel handling to its own file 2014-09-21 13:38:53 -04:00
Cole Robinson e1b646594c console: Hide display widget from consumers
There were several layering violations, make it explicit by making
display private, and providing APIs for everything the consumers
need.
2014-09-21 13:25:43 -04:00
Cole Robinson a3bd1b26a9 console: Clarify keyboard grab default handling 2014-09-21 13:06:25 -04:00
Cole Robinson 4568cdb636 module_trace: Only show main thread APIs by default 2014-09-21 12:05:02 -04:00
Cole Robinson b0d5198b7a virt-manager: Switch 'Copy host' to use host-model (bz 1133155)
Similar to the previous change for virt-install
2014-09-20 20:44:14 -04:00
Cole Robinson 85161e4c57 host: Clean up invocation of *apply from confirm dialog
Basically, only apply the page we are actually on
2014-09-20 17:32:10 -04:00
Cole Robinson 0717a21f65 host: Fix renaming network/storage pool 2014-09-20 17:32:09 -04:00
Cole Robinson 38738d9fa6 connection: Don't close VM dialog on rename
Rework things a bit to simplify everything we pass around.

The specific bug fix is making sure we update the object list in place,
otherwise the event loop detects it as the VM being deleted and closes
the details window.
2014-09-20 17:32:09 -04:00
Cole Robinson ea97325a72 connection: Tweak some debugging output 2014-09-20 16:33:26 -04:00
Cole Robinson f2ff378a9d details: Avoid some misleading logging on rename 2014-09-20 16:18:10 -04:00
Cole Robinson 56c091600a details: Move hostdev prettyifier to virtinst 2014-09-20 14:56:57 -04:00
Cole Robinson 92f298e393 addhardware: Use virtmanager APIs for VM listing 2014-09-20 13:04:47 -04:00
Cole Robinson dd67c48233 connection: Handle nodedev polling too
And cleanup up a bunch of nodedev functions as a result
2014-09-20 12:04:49 -04:00
Cole Robinson 439e5ad0fe details: Reorg a bunch of the global helpers
Some were redundant, some should be in virtinst
2014-09-20 10:23:19 -04:00
Cole Robinson fa76e92f2c virt-manager: Fix issues with ellipsizing on recent gtk 2014-09-19 22:08:22 -04:00
Cole Robinson edf9bf0aad serialcon: Drop use of yet more removed API 2014-09-19 20:35:06 -04:00
Cole Robinson 3feedb76e9 domain: Match UNDEFINE_NVRAM conditions with libvirt
Suggested-By: Laszlo Ersek <lersek@redhat.com>
2014-09-19 20:08:59 -04:00
Cole Robinson ebeea7af9f delete: Remove nvram support
As of now, the only uses of nvram likely in the domain XML are with
libvirt configurations that also support the UNDEFINE_NVRAM flag, so
listing it here is kind of redundant. And in the common config of
non-root user connected to qemu:///system with template based nvram
in /var/lib, we won't be able to remove it anyways.
2014-09-19 20:04:39 -04:00
Cole Robinson ae26313ed4 details: Add UI for enabling UEFI via 'customize before install'
We expose a simple combobox with two entries: BIOS, and UEFI. The
UEFI option is only selectable if 1) libvirt supports the necessary
domcapabilities bits, 2) it detects that qemu supports the necessary
command line options, and 3) libvirt detects a UEFI binary on the
host that maps to a known template via qemu.conf

If those conditions aren't met, we disable the UEFI option, and show
a small warning icon with an explanatory tooltip.

The option can only be changed via New VM->Customize Before Install.
For existing x86 VMs, it's a readonly label.
2014-09-17 18:43:41 -04:00
Cole Robinson ead9d3f56d domain: If VM has nvram, ask libvirt to remove it on undefine 2014-09-17 18:35:20 -04:00
Lin Ma e088486b23 addhardware: Deal with the conflict host device
If a host device is in use by guests, Warn user and
let user make choice while adding hardware.

Signed-off-by: Lin Ma <lma@suse.com>
2014-09-16 11:41:13 -04:00
Lin Ma 2f62ba964c Add comparison function for NodeDevice
PCIDevice and USBDevice include respective comparison logic.

Signed-off-by: Lin Ma <lma@suse.com>
2014-09-16 11:41:13 -04:00
Giuseppe Scrivano e5d2059853 virt-manager: delete nvram file on VM deletion
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:49:00 +02:00
Giuseppe Scrivano f2ad085918 virtManager: add "ich9" to the list of stable audio models
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1140937

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:04:14 +02:00
Cole Robinson 9b62573c0b module_trace: Improve output for tracking mainloop libvirt usage 2014-09-13 13:52:42 -04:00
Cole Robinson 226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson 3753fcbaa3 addstorage: Rate limit the default pool refresh 2014-09-12 16:28:37 -04:00