In Python 2 comparison between int and None is allowed but in
Pyhton 3 it is not.
Example:
Pyhton 2
>>> None > 0
False
Python 3
>>> None > 0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: '>' not supported between instances of 'NoneType' and 'int'
libvirt 3.1.0 improves spice/GL support with rendernode options, file
cgroup/namespace rights etc, that are required for qemu:///system to
work without additional tweaking.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
There want be 1.3.6 version, libvirt switched to new release numbering, for more
information see <http://libvirt.org/downloads.html#numbering>.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This gives friendly XML output via virt-xml for clearxml=yes +
extra options: the XML block is editted in place, rather than removed
and with the newchanges appended
Libvirt started to put type='raw' by default for rbd volumes, which
changes our generated XML. Limit the test to only libvirt that supports
that check.
For many years virt-install has supported a bit of logic that maps
--cpuset=auto to a CPU pinning based on host NUMA topology; we look
for a NUMA node who's current free memory is closest to the requested
memory allocation. This isn't very useful though, since it's a one time
allocation, the conditions at VM creation time likely aren't the
conditions of the machine in the future.
Libvirt has supported a smarter option in vcpu placement=auto for a long
while, which will perform a similar operation but at every VM startup.
Convert cpuset=auto to use this functionality instead.
Following some discussion here:
https://bugzilla.redhat.com/show_bug.cgi?id=1171550
jfehlig suggested better defaults for modern xen. End result is:
- Drop the blktap check, since it's deprecated (yaay)
- If xen + block device, use driver_name=phy
- Otherwise if on modern enough libvirt + libxl, do the same thing we
do for qemu.
This feature is available in upstream Qemu since 2.0.0 but it was also
back-ported to downstream Qemu into qemu-kvm-1.5.3 released in RHEL-7.
Add a new check and enable hv_time also in RHEL systems if qemu new
enough.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
The image compression setting has a noticably detrimental effect on
spice graphics quality. It's meant to be used for spice VDI but the
vast majority of people don't use spice in a way that makes bandwidth
usage matter.
Boxes has already done this for a while as well:
https://mail.gnome.org/archives/commits-list/2013-March/msg14904.html
Turn it off by default if creating the VM on a local connection.
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>
libvirt commit 466b29c8c3593b2dac92acad5dd8ec923c428259
introduce btrfsCloneFile() for COW copy.
This patch add support for --reflink option for virt-clone.
When specified --reflink, if src and dst images all on a btrfs
fs, we could take advantage of COW copy.
If not, error out.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
We expose a simple combobox with two entries: BIOS, and UEFI. The
UEFI option is only selectable if 1) libvirt supports the necessary
domcapabilities bits, 2) it detects that qemu supports the necessary
command line options, and 3) libvirt detects a UEFI binary on the
host that maps to a known template via qemu.conf
If those conditions aren't met, we disable the UEFI option, and show
a small warning icon with an explanatory tooltip.
The option can only be changed via New VM->Customize Before Install.
For existing x86 VMs, it's a readonly label.
auto-clone cases use SUPPORT_CONN_BARE_BACKINGSTORE,
which check libvirt 1.2.4.
Change it to SUPPORT_CONN_LOADER_ROM(1.2.9)
and drop SUPPORT_CONN_BARE_BACKINGSTORE.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Read the list of CPU models trough getCPUModelNames instead of
accessing directly the file cpu_map.xml.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1060316
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>