Commit Graph

1197 Commits

Author SHA1 Message Date
Chen Hanxiao
645edb176d domain: treat VIR_DOMAIN_CRASHED not as runnable but rather as stoppable
If we set on_crash as `preserve`, we'll get a crashed
VM state.
At this time, it's impossible to start this VM.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-05-03 13:38:07 -04:00
Pino Toscano
7866cfec1b osdict: add "macos" type
Give macOS OSes an own type, so they have their own entry in the list of
OS types.
2017-04-27 15:57:40 -04:00
Pino Toscano
fa9ee6cd94 osdict: rename "unix" type to "bsd"
It really holds BSD OSes, so rename it to match the reality.
2017-04-27 15:57:40 -04:00
Pino Toscano
0eabf343ee create: refactor combobox with distros
When showing all the OSes, the list of distributions for some types of
OSes (Linux, UNIX) will get insanely long, and thus very hard to scroll.
As solution, introduce groups for some of the OS families, leaving the
ones without a defined group into a "Others" group.

To keep the completion working in the editable combobox, add a separate
completion model for the completion entry, providing all the OSes
directly there as simple list.

There are a number of changes related to this:
- the model for the OS comboboxes is now a TreeStore, and the iterations
  on the OS variant keep that into account
- there are better UI labels for OS types and groups
- when there are no groups for a type, add all the OSes directly, just
  like now
- optimize the way types are added to the combobox: when not adding all
  of them, filter out those not "supported"
- optimize the way OSes are added to the combobox: query only for the
  list we need (supported or all, not both), and group them according
  to the hash defined
- add separator + "show all" options only when not showing all of them
- _add_os_row now is called only when needed, so remove its "supported"
  parameter
2017-04-27 15:57:40 -04:00
Cole Robinson
cd0e3a897c sshtunnels: Detect listen type=none for VNC (bz 1445714)
https://bugzilla.redhat.com/show_bug.cgi?id=1445714
2017-04-27 15:29:05 -04:00
Cole Robinson
c0a3234633 baseclass: share wizard cursor setting code 2017-04-27 15:00:17 -04:00
Cole Robinson
6d1a3db421 createnet: Cleanups around hostdev UI 2017-04-04 15:20:33 -04:00
Lin Ma
97c8412df6 network: add support to create SR-IOV VF pool
Create a network with a device pool containing all the VFs of an SR-IOV device.

Signed-off-by: Lin Ma <lma@suse.com>
2017-04-03 19:15:11 -04:00
Cole Robinson
0610cd6acb console: Ensure bool value used for set_sensitive call
Seen in a bug log file:

[Tue, 28 Mar 2017 12:05:21 virt-manager 2465] DEBUG (cli:251) Uncaught exception:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1303, in refresh_vm_state
    self.console.details_update_widget_states()
  File "/usr/share/virt-manager/virtManager/console.py", line 1025, in details_update_widget_states
    return self._update_vm_widget_states()
  File "/usr/share/virt-manager/virtManager/console.py", line 597, in _update_vm_widget_states
    self._refresh_widget_states()
  File "/usr/share/virt-manager/virtManager/console.py", line 663, in _refresh_widget_states
    self.widget("details-menu-vm-screenshot").set_sensitive(is_viewer)
TypeError: Argument 1 does not allow None as a value
2017-03-29 12:07:50 -04:00
Cole Robinson
14f3efa810 libvirtobject: Add better __repr__ for debugging 2017-03-29 12:07:50 -04:00
Cole Robinson
2c8ed52813 Fix some pylint 2017-03-27 17:27:14 -04:00
Charles d'Hondt
b545201617 Added OpenVSwitch Network Detection
Small patch to allow VMM to detect OpenVSwitch

Signed-off-by: Charles d'Hondt <charles.dhondt@gmail.com>
2017-03-24 16:42:45 -04:00
Pavel Hrdina
cb182f7e3a graphics: skip authentication only for VNC with listen type none
This is in fact a bug in QEMU so we have to workaround this issue
to allow to connect to guest with VNC and listen type none.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-23 15:26:19 +01:00
Cole Robinson
cfc4e903b7 details: Remove some debug printing 2017-03-22 12:28:04 -04:00
David Thurstenson
a86c119e1c Fix ambigous label on Autostart checkbox
When the Autostart checkbox on the host Virtual Network or Storage tabs
is deselected, the label reads "Never", and when selected the label reads
"On Boot". This changes these labels to always read "On Boot".
2017-03-22 11:53:00 -04:00
Cole Robinson
aefea61fa0 create: Fix some minor UI issues with vz installs 2017-03-22 11:40:04 -04:00
Mikhail Feoktistov
5a70b946c7 Add GUI to create wizard for virtuozzo containers
Add virtuozzo hypervisor to connection list.
Add radio buttons for choosing VM or container virtualization type.
New wizard window for setting template name for containers.
2017-03-22 11:00:50 -04:00
Mikhail Feoktistov
c25ea6537b Tune default device list for Virtuozzo containers
Virtuozzo supports virtio NIC.
Also add default VNC graphics.
Privnet feature and emulator device have no sense for vz containers.
2017-03-17 13:36:15 -04:00
Cole Robinson
8f39de8243 ui: details: Tweak RNG page a bit 2017-03-08 17:48:26 -05:00
Cole Robinson
8eee62712e gfxdetails: Add more errors/warnings around spice GL
Add warning icons with informative tooltips. Desensitive UI rather
than hide it if the hypervisor doesn't support things. A few other
usability tweaks
2017-03-08 16:07:32 -05:00
Cole Robinson
f61e586b77 domain: rename: Fix when nvram pool is newly created
We don't have any way at the momemnt to synchronously update cached
object lists. So if old_nvram will create a pool for the nvram dir
(/var/lib/libvirt/qemu/nvram), new_nvram won't see that new object
in our cache, will attempt to create it itself, and raise an error.
Next attempts succeed though.

We can avoid this by not even setting new_nvram.path, that step was
redundant anyways since we are setting a vol_install right afterwards.
This way, new_nvram is getting a reference to the parent_pool object
via the vol_install, so it doesn't even check the pool object cache.
2017-03-08 14:22:44 -05:00
Cole Robinson
3030c585b9 domain: rename: don't overwrite nvram error
Just raise whatever error is throw, so we have the backtrace if needed
2017-03-08 13:22:09 -05:00
Pavel Hrdina
92c230d111 domain: add support to rename domain with nvram vars file
Libvirt storage API doesn't support renaming storage volumes so
we need to copy the nvram file and remove the old one.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-08 08:24:57 +01:00
Cole Robinson
07f1a4e168 ui: Use 'Shut Down' vs 'shutdown' consistently 2017-03-06 22:05:35 -05:00
Cole Robinson
1ac02d2ade ui: clone: Delay error if default storage doesn't have enough space
Just ignore the error populating the initial paths, otherwise we can't
even open the dialog
2017-03-06 22:05:34 -05:00
Cole Robinson
b6630c2a63 clone: Don't error if disk doesn't have a backing volume 2017-03-06 22:05:34 -05:00
Pavel Hrdina
8225cac648 virtManager.delete: don't allow deleting SCSI disks
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-06 14:31:42 -05:00
Pavel Hrdina
31e923dbdf virtManager.clone: don't generate default clone_path for some storage pools
Libvirt doesn't support creating volumes for some storage pools,
don't generate default clone_path for these storage pools.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-06 14:31:42 -05:00
Pavel Hrdina
79baf8e30c virtManager.clone: don't generate clone path if we don't default to clone
If we don't default to clone the disk in question don't try to generate
and assign default clone_path, this will force user to select the path
explicitly and avoid some unnecessary errors in debug log.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-06 14:31:42 -05:00
Pavel Hrdina
d93203022a virtManager.clone: set new manual path before we populate storage list
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-06 14:31:42 -05:00
Cole Robinson
0910c8dcfc domain: Use libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH (bug 1379581)
It's what virt-viewer uses, and apparently it's needed for VNC
listen type=none

https://bugzilla.redhat.com/show_bug.cgi?id=1379581
2017-03-02 15:08:32 -05:00
Marc-André Lureau
b484d15258 virtManager/ui: add 3d acceleration checkbox to virtio video
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-03-01 17:58:30 -05:00
Marc-André Lureau
53d09bc28c virtManager/ui: add rendernode selection
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-03-01 17:57:57 -05:00
Marc-André Lureau
326dc03c23 virtManager/ui: add listen type option
Similarly to virt-install --listen=none, add a combobox to select
the listen type: "address" or "none" for now, as suggested by Pavel
Hrdina.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-03-01 17:56:52 -05:00
Marc-André Lureau
88942028b3 virtManager/ui: add opengl graphics option
Add an OpenGL checkbox to the Spice graphics options (only available if
SUPPORT_CONN_SPICE_GL).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-03-01 17:54:19 -05:00
Pino Toscano
ecd66a7df2 inspection: try harder to show a pkg summary
If a package has no summary, try to use the description (if available):
- if it is just one line (mostly because the package manager only has
  a single line as description of a package), then use it fully
- if it contains more lines, then take the first only, adding suspension
  dots to indicate it is longer than that
2017-03-01 16:32:57 -05:00
Pino Toscano
409ae0bcf4 inspection: add a way to refresh the inspection info
Introduce a 'Refresh' button in the 'Information' page of a VM, and
wire it up so a refresh of the inspection data for it is triggered.
2017-03-01 16:25:47 -05:00
Pino Toscano
436d4c544c details: refresh Information page on inspection data change
Refresh the 'Information' page when there are new inspection data
available, so they can be seen even without switching to a different
page and back.  This could be seen when starting virt-manager, and
opening quickly the 'Information' page of an uninspected guest.
2017-03-01 16:25:47 -05:00
Pino Toscano
45d0be9805 inspection: add vmmInspection.vm_refresh helper
Add a simple helper to force a new inspection of a VM.
2017-03-01 16:25:47 -05:00
Pino Toscano
67ed3e86df inspection: filter libguestfs VMs earlier
No need to do any job for them, so skip processing them altogether when
a new one is added.
2017-03-01 16:25:47 -05:00
Pino Toscano
d2ca54fce4 inspection: remove queue draining
Now we act for each item in the queue, so there is no more need to drain
it fully before doing anything.  Thus, turn _run into a simple
get+process+done loop.
2017-03-01 16:25:47 -05:00
Pino Toscano
7a696c8db8 inspection: handle duplicated conn-added signals
We might get 'conn-added' signals for the same connections more than
once, so make sure to skip a new connection notification when the
connection is already known.
2017-03-01 16:25:47 -05:00
Pino Toscano
ea5a6a3014 inspection: simplify VMs visit
Currently, the handling of the 'vm_added' element in the queue (added as
consequence of the 'vm-added' signal) is to act as trigger to rescan
every VM in every local connection; this operation is "fast" because
every VM except the newly added is already marked as visited. Still, it
is an not really efficient way to visit new VMs.

Instead, just push in the queue all the data we get in vm_added, so when
processing the queue we can process each VM straight away.  Because of
this, make sure to gracefully handle VMs that were removed while the
'vm_added' item for them was sitting in the queue (which is something
the old code did not handle properly).
2017-03-01 16:25:47 -05:00
Pino Toscano
0c019fb8e3 inspection: rename vmmInspection._process to _inspect_vm
It fits more the actual job of the function.
2017-03-01 16:25:47 -05:00
Pino Toscano
ad47e80ec2 inspection: extract vmmInspection._process_vm
Move the code that does the inspection handling of a VM to an own
function, so it can be used as-is later on.

It is just code motion.
2017-03-01 16:25:47 -05:00
Pavel Hrdina
b8dccf6aca virtManager/viewers: fix connection to remote SPICE with password
When connecting to remote SPICE we use ssh tunnel if the SPICE is
listening only on "localhost".  Our ssh tunnel scheduler uses locks
to serialize the requests for FD in order to not spam user for ssh
password.

However when the main_channel is connected and emits AUTH_ERROR
we ask user for password and request for new FD.  Unfortunately
after the new request is handled we didn't unlock the scheduler
and all other request would remain waiting for the lock.

We need to unlock every FD request for the SPICE main channel not
only the first one when the channel itself is created.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-02-10 09:43:20 +01:00
Pino Toscano
46f4abbb50 inspection: try low quality icons as fallback
When there is no high quality icon for a guest, try getting the low
quality icon.  This should make virt-manager show icons for Ubuntu and
Windows guests.
2017-02-09 16:29:27 -05:00
Pino Toscano
3c95d20994 inspection: consider also epoch for pkg version
When composing the string of the version of packages, prepend also the
epoch, as it is an important part of the package version.
2017-02-09 16:29:27 -05:00
Pino Toscano
ebf4ade208 inspection: show OS type in Inspection page
Show also a pretty label for the OS of the guest, in addition to
hostname and product name.
2017-02-09 16:29:27 -05:00
Pino Toscano
f7a726dc70 inspection: rename variable for OS type
'type' is ambiguous as name, it might conflict with the Python builtin.
Instead, rename it to 'os_type' to get rid of the issue altogether.
2017-02-09 16:29:27 -05:00