libguestfs adds an atexit handler to clean up handles on exit. This
is convenient in single-threaded programs, but causes problems in
multithreaded programs, for example:
https://bugzilla.redhat.com/show_bug.cgi?id=1043520
Disable the atexit handler for all guestfs handles created by
virt-manager.
Note this change requires libguestfs >= 1.20. However the change to
config.py should ensure that if an earlier version of libguestfs is
installed it should silently fall back to not using inspection.
Normally, setting cache=none is required in order to ensure a consistent view
of storage between the source and destination migration hosts. However, some
configurations have that quality without resorting to the use of an O_DIRECT
open (which is what cache=none does), and hence cache=none wouldn't be
necessary.
Unfortunately, libvirt is not able to determine on it's own all the
configurations which require cache=none for migration but in the interest of
safety enforces it when it isn't otherwise able to determine migration safety.
For this reason the libvirt api has an 'unsafe' option which allows the user
to override the safety migration checks.
This patch adds a checkbox to allow unsafe migration to the 'Advanced options'
portion of the migration dialog.
Signed-off-by: Charles Arnold <carnold@suse.com>
virt-manager is one of those tools that people will often install when
no traditional desktop is present. dbus-x11 is pulled in by desktop
environments, but not by gtk3 for (presumably) legitimate reasons.
But we need it to do anything worthwhile with dbus.
It makes clearer to the user to pick the last version available for an
OS when a newer version is not listed by virt-manager/virt-install.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
We could copy host CPU config by
button 'Copy host CPU configuration'.
If we regret to do this or the host CPU config
caused VM starting failure, we need a button to
help us clear CPU feature.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If libguestfs fails to inspect the guest then show a warning.
Now the "Operating System" and "Applications" frames are visible
only when the guest inspection is available.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=755869
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
LXC container could use in-memory filesystem,
which do not have source section.
Currently, virt-manager will complain if
dev.source is null.
This patch will fix this issue.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
"cpus" might no be the only child element in the "cell" element, so be
sure to check all children.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1032320
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Prefer the user specified in the host capabilities to the default one
when checking for the access to disk images.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Since these days we have to import Gtk _after_ forking, _and_ Gtk
doesn't raise a nice error for us, we need to postpone dropping stdio
so the user has any chance of seeing the error. Also try to add an
explicit error about DISPLAY again, since we don't get it from Gtk
these days.
This patch makes virt-manager usable again without systemd (or dbus).
When started without systemd, but with libvirtd properly working,
there was error reported, and virt-manager didn't even try to connect
to the destination.
This patch modifies the behavior in two ways. When connection is
added with "do_start=False" it will still try to connect, but won't
error out when unsuccessful. The second modification is that upon
startup, the idle_connect() function will error out only if we failed
starting libvirtd _and_ we couldn't connect to the uri. So if we
failed starting libvirtd, but could connect, there is no disruption
for the user.
Remove backend_mode from VirtualRNGDevice and allow to directly specify
bind and connect sources.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Updated by this script:
find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\) \(.*[^#]\)$|\1 \2|g" \{\} \;
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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>