Commit Graph

970 Commits

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