Commit Graph

56 Commits

Author SHA1 Message Date
Cole Robinson 21fb072d4a virt-install: Default to qcow2 for new images
Following along with virt-manager's change. It has all the features and
good enough performace, and is easy enough to override for people that
care.
2014-02-10 18:47:58 -05:00
Cole Robinson 032dd0cf21 clone: Show destination host if on a remote connection (bz 881099) 2014-02-01 18:59:10 -05:00
Cole Robinson 021ffd17e2 domain: Stop using UPDATE_CPU xml flag
Now that feature UI is gone, it doesn't do us any good. And actually
can cause issues if changing from host-model to a static model.
2014-01-31 10:48:45 -05:00
Cole Robinson 0a77093cbc console: Handle ipv6 addresses (bz 974126) 2014-01-29 11:02:54 -05:00
Cole Robinson 58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Martin Kletzander dc0b9bbaaf Rename hide_unsupported_rhel_options to stable_defaults and clean-up its usage
There were multiple problems with the setting and usage of
hide_unsupported_rhel_options.  Due to the fact that the option has
several diferent namings throughout the code, this patch is renaming
it to stable_defaults, which basically says what the option does and
makes it possible to use it without need for more than one negation
(where the old code had up to 4 of them in some places), which also
helps understanding it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-01-21 17:13:18 +01:00
Cole Robinson 7f66926721 Fix first time remote URL installs from virt-manager (bz 1049852)
On first run, the remote URL install handling creates a storage pool
for /var/lib/libvirt/boot on the remote host. After this, it clears
the VirtualConnection's object cache, so the next time all pools are
fetched, it returns an accurate list.

However that clear_cache call wasn't propagated up to virt-manager's
cache. Add a new cb to fix it.
2014-01-18 14:57:39 -05:00
Cole Robinson eb33bd34e7 Misc improvements to some debug messages 2013-11-09 18:17:29 -05:00
Giuseppe Scrivano 5798c5b9b4 virt-manager: prefer os.makedirs to os.mkdir when creating cache dir
Ensure the parent directories exist when attempting to create the
cache directory.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-11-05 18:15:11 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson 56b9f6187b Streamline support checks
Just use one function check_support
2013-10-06 10:08:04 -04:00
Cole Robinson 89646fe841 addhw: Filter root hubs out of USB device list 2013-10-05 14:40:38 -04:00
Cole Robinson a2cbb9f500 support: s/CONN_HV/CONN/g
We don't need to distinguish these days.
2013-10-02 16:41:23 -04:00
Cole Robinson 9194feb1f5 virt-manager: Default to qcow2 on kvm
qcow2 enables fancy features like snapshots and is generally more
desktopy, which we purport to be.

We only do this on not horribly old libvirt/qemu, and only on qemu
connections. This may work for xen but I'm not going to turn it on
until someone tests it.
2013-10-02 15:34:34 -04:00
Cole Robinson 868fbd9fc9 snapshots: Add screenshot support
Show a screenshot in the 'new snapshot' wizard. If we successfully create
that snapshot, save the screenshot in

~/.cache/virt-manager/$connuri/$vmuuid/snap-screenshot-$snapname.$ext

And show it in the snapshot details overview. We don't do any reaping
on snapshot delete, vm delete, etc, but that could be added later.
2013-10-01 10:14:51 -04:00
Cole Robinson 844a567e7b details: Don't silently drop managed save when renaming VM
Instead just error about it. Until there's an actual libvirt 'rename'
API we can't do much better than that.
2013-09-30 15:38:35 -04:00
Cole Robinson 98a95b2e2d network: Add install() command, remove function from vmmConnection
This is the pattern used by other virtinst objects
2013-09-30 15:38:34 -04:00
Cole Robinson 8f0bfb1ad6 host: Allow renaming a storage pool 2013-09-29 12:28:01 -04:00
Cole Robinson 369a17160a host: Allow renaming virtual networks 2013-09-29 12:14:00 -04:00
Cole Robinson cd7837bc4b domain: Clean up some support checks
We don't need to cache things since virtinst/connection does it for
us.
2013-09-29 09:58:31 -04:00
Cole Robinson 72058f2bbf support: Remove unused nodedev support checks 2013-09-29 09:19:56 -04:00
Cole Robinson 7a5dc7c544 devicedisk: path_in_use_by: Check backing stores as well
Plumb through a fetch_all_vols helper for this, and do all the
caching bits.
2013-09-28 21:07:18 -04:00
Cole Robinson a7b1414dc5 libvirtobject: Make parseclass non-optional
All libvirtobject child classes have an associated XMLBuilder now, so
make it mandatory.
2013-09-23 08:34:50 -04:00
Cole Robinson aff0ddb259 Use XMLBuilder for Storage object handling
Simplify the API a bunch while we are at it, add tests, etc.
2013-09-20 10:00:08 -04:00
Cole Robinson 7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -04:00
Cole Robinson 14103f175d VirtualConnection: Allow setting a display name for fake URIs 2013-07-23 17:34:32 -04:00
Cole Robinson 318ba7e474 VirtualConnection: Deal with Guest objects, not raw XML
We already do XML parsing, no need to open code it elsewhere
2013-07-10 20:09:51 -04:00
Cole Robinson 7a2caee6e1 VirtualConnection: Allow using virt-manager object caches
So when we call into virtinst it doesn't do a whole round of object
lookup and XML fetching.
2013-07-07 18:54:08 -04:00
Cole Robinson ee7d0b620d connection: Support listAll* object lookups
These calls save us a few API lookups, but are not supported by all
libvirt versions.

Since these bits were getting quite large, move them all to a separate
pollhelpers file.

However listAllInterfaces is returning an empty list for now, so we
disable the check: https://bugzilla.redhat.com/show_bug.cgi?id=982014
2013-07-07 15:06:09 -04:00
Cole Robinson 5e9e444dec connection: Do non-VM polling on demand
The goal here is to reduce the amount of tick() polling that we do by default.
For things like pools, networks, and interfaces, the constant polling is
not very helpful and causes CPU churn and slowness for remote connections.

Switch to a more on demand style. Pages that want new information for
these objects now request a priority tick that only refreshes the info
we want.

This isn't perfect, but neither was the previous solution in the face of
things like XML updates behind our back. The real solution here is libvirt
event support across the board.
2013-07-07 12:17:54 -04:00
Cole Robinson 149e19da64 connection: Pass nostatsupdate through to VM tick
When kicking off a priority tick, we want to update domain status but not
update stats listing.
2013-07-07 09:42:21 -04:00
Cole Robinson b044dd94c7 Various cleanup and sync between libvirtobject classes 2013-07-07 09:05:01 -04:00
Cole Robinson ed5e67485c domain: Don't pass timestamp to domain tick()
Since we might not poll stats info until a decent amount of time after
this timestamp, it messes up VM stats reporting.

Our usage still isn't correct because we use a later timestamp for
calculating total host usage. We could fix it by averaging out the
timestamp of each VM but I don't care that much at the moment.
2013-07-07 08:44:46 -04:00
Cole Robinson b7ee86541d virtManager: connection: Switch to tick() paradigm for all objects
This is going to be much slower than what we currently do, but we
will be trying to fix that shortly.
2013-07-07 08:44:46 -04:00
Cole Robinson 2e47d2e5fa connection: Only overwrite master lists in main thread 2013-07-07 08:44:46 -04:00
Cole Robinson 141ad96298 connection: Remove some dead code 2013-07-06 21:41:27 -04:00
Cole Robinson 76887c9a32 engine: Switch tick threading model to use queues
And allow other parts of the API to request a priority tick that is
dispatched from the main tick thread.
2013-07-06 21:24:38 -04:00
Cole Robinson ead31139b0 virtManager: Emit state change signals from objects
This is a step towards supporting listAll*() API and domain events.

We still proxy these signals through vmmConnection so that we don't
need to rework the dependent code yet.
2013-07-06 20:09:18 -04:00
Cole Robinson eb53a6770b vmmConnection: Minor cleanups to libvirt polling 2013-07-06 17:49:42 -04:00
Cole Robinson 125cbc4541 virtManager: connection: Clean up some inconsistent API 2013-07-06 17:24:51 -04:00
Cole Robinson 94f8d4cfa9 VirtualConnection: cache capabilities XML
This means we can drop passing around the pre-parsed caps info everywhere.
2013-07-06 14:12:13 -04:00
Cole Robinson ba3aa9ecca Drop conn_max_vcpus validation
Let's just let libvirt throw an error in the rare occasion that we
exceed max vcpus.
2013-07-06 12:40:24 -04:00
Cole Robinson 492a039f7d VirtualConnection: proxy virtinst.support API
Simplifies the lives of callers, and will allow us to do caching later
2013-07-06 12:40:24 -04:00
Cole Robinson ec734191fc virtinst: connection: Absorb all scattered URI helpers 2013-07-06 12:40:24 -04:00
Cole Robinson be2d9ddcb4 Add base conn object and bump minimum libvirt version to 0.6.0
This base connection object will be used to simplify the API in various
places, reduce libvirt API calls, and better share code between virtinst
and virt-manager. For now it just centralizes connection opening.

This also exposed various places where our handling for older libvirt
was busted, so raise our minimum host version to 0.6.0, the first
version that supports threaded client requests.
2013-07-05 16:42:19 -04:00
Cole Robinson 255ba11079 virt-manager: Drop remnants of read-only connection support
Haven't supported it for a while
2013-07-05 09:00:31 -04:00
Guannan Ren 32f0781531 addhardware: differentiate duplicate usb devices by bus/addr
When there are multiple usb devices with same vendor/product
in the host device list, the bus/addr is going to be used when
attaching one of usb devices.

Currently is_dup flag is only useful to VirtualHostDeviceUSB.

I put get_nodedevs_number() in connection.py, so the startup
hooks can use it.
2013-05-09 13:48:18 -04:00
Guannan Ren 15f72a84ab check cpu host-model mode support
UPDATE_CPU flag exists after v0.8.0, so libvirt that
supports HOST_MODEL should support UPDATE_CPU,
the earliest version we are going to check is v0.9.10.
2013-04-20 16:04:43 -04:00
Cole Robinson 7e23244096 Port from gconf to gsettings
This unfortunately has a decent amount of fallout: add a wrapper class
in config.py that reduces much of the churn.

Another big piece is that gsettings can't accept arbitrary paths like
gconf would, everything needs to be described in the schema.

Also do a bunch more RPM spec modernizing
2013-04-18 12:43:16 -04:00
Cole Robinson c60ad16b3b Convert all DBus usage to Gio GDBUS
And drop a whole bunch of legacy dbus fallback stuff. Now that we
are bumping the host dependencies to very recent gtk, none of the
back compat should matter.
2013-04-16 15:22:09 -04:00