Commit Graph

1174 Commits

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