Commit Graph

815 Commits

Author SHA1 Message Date
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