Commit d08e61c2 authored by Guido Günther's avatar Guido Günther

New upstream version 1.5.1

parent 9be20ca0
......@@ -13,9 +13,6 @@ Our pylint script uses a blacklist rather than a whitelist approach,
so it could throw some false positives or useless messages. If you think
your patch exposes one of these, bring it up on the mailing list.
If `python-coverage` is installed, you can run `coverage -r` after
`python setup.py test` finished to see a code coverage report.
'test*' have a `--debug` option if you are hitting problems.
For more options, use `python setup.py test --help`.
......
......@@ -8,6 +8,7 @@ exclude data/gschemas.compiled
recursive-include man *
recursive-include po *
recursive-include tests *
exclude tests/test_urls_manual.ini
recursive-include ui *
recursive-include virtManager *
recursive-include virtcli *
......
# Virtual Machine Manager News
## Release 1.5.1 (February 28, 2018)
- Bug fix release
- Fix potential crash with libxml2 error callbacks
- Fix disk/net/mem VM graphs
## Release 1.5.0 (February 06, 2018)
- python3 prep work (Radostin Stoyanov, Cole Robinson, Cédric Bosdonnat)
- Switch --location ISO to use isoinfo (Andrew Wong)
- virt-install: add --cpu numa distance handling (Menno Lageman)
- virt-install: fix --disk for rbd volumes with auth (Rauno Väli)
- virt-install: add --cputune vcpupin handling (Wim ten Have)
- details ui: Showing attached scsi devices per controller (Lin Ma)
- network ui: Show details about SR-IOV VF pool (Lin Ma)
- Greatly expand UI test suite coverage
## Release 1.4.3 (September 19, 2017)
- Improve install of debian/ubuntu non-x86 media (Viktor Mihajlovski, Andrew
Wong)
......@@ -10,7 +25,7 @@
## Release 1.4.2 (August 08, 2017)
- New VM wixard virt-bootstrap integration (Radostin Stoyanov)
- New VM wizard virt-bootstrap integration (Radostin Stoyanov)
- New VM wizard support for virtuozzo containers (Mikhail Feoktistov)
- network UI: add support to create SR-IOV VF pool (Lin Ma)
- Nicer OS list in New VM wizard (Pino Toscano)
......
Metadata-Version: 1.0
Name: virt-manager
Version: 1.4.3
Version: 1.5.1
Summary: UNKNOWN
Home-page: http://virt-manager.org
Author: Cole Robinson
......
......@@ -10,7 +10,7 @@ B<virt-convert> INPUT.vmx|INPUT.ovf|INPUT-DIR|INPUT.zip [OPTIONS]
=head1 DESCRIPTION
B<virt-convert> is a command line tool for converting VMX of OVF virtual
B<virt-convert> is a command line tool for converting VMX or OVF virtual
machines to native libvirt XML. Disk format conversion can also be done
at the same time.
......
......@@ -255,6 +255,16 @@ Example of passing through the host cpu's cache information.
Use --cpu=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsCPU>
=item B<--cputune> OPTIONS
Tune CPU parameters for the guest.
Configure which of the host's physical CPUs the domain VCPU will be pinned to. Example invocation
--cputune vpcupin0.vcpu=0,vpcupin0.cpuset=0-3,vpcupin1.vcpu=1,vpcupin1.cpuset=4-7
Use --cputune=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsCPUTuning>
=item B<--security> type=TYPE[,label=LABEL][,relabel=yes|no]
Configure domain security driver settings. Type can be either 'static' or
......@@ -724,7 +734,7 @@ WD-WMAP9A966149
=item B<startup_policy>
It defines what to do with the disk if the source file is not accessible. See
possible values in L<http://www.libvirt.org/formatdomain.html#elementsDisks>
possible values in L<http://www.libvirt.org/formatdomain.html#elementsDisks>, "startupPolicy" attribute of the <disk> element
=item B<snapshot_policy>
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -389,6 +389,8 @@ class TestBaseCommand(distutils.core.Command):
self._testfiles = []
self._dir = os.getcwd()
self.testfile = None
self._force_verbose = False
self._external_coverage = False
def finalize_options(self):
if self.debug and "DEBUG_TESTS" not in os.environ:
......@@ -419,28 +421,22 @@ class TestBaseCommand(distutils.core.Command):
return testfiles
def run(self):
try:
cov = None
if self.coverage:
import coverage
use_cov = True
except ImportError:
use_cov = False
cov = None
if use_cov:
# The latter is required to not give errors on f23, probably
# a temporary bug.
omit = ["/usr/*", "/*/tests/*", "/builddir/*"]
omit = ["/usr/*", "/*/tests/*"]
cov = coverage.coverage(omit=omit)
cov.erase()
cov.start()
if not self._external_coverage:
cov.start()
import tests as testsmodule
testsmodule.cov = cov
testsmodule.utils.REGENERATE_OUTPUT = bool(self.regenerate_output)
testsmodule.utils.clistate.regenerate_output = bool(
self.regenerate_output)
testsmodule.utils.clistate.use_coverage = bool(cov)
if hasattr(unittest, "installHandler"):
# Install the control-c handler.
unittest.installHandler()
# This makes the test runner report results before exiting from ctrl-c
unittest.installHandler()
tests = unittest.TestLoader().loadTestsFromNames(self._testfiles)
if self.only:
......@@ -460,20 +456,26 @@ class TestBaseCommand(distutils.core.Command):
print("%s" % test)
print("")
t = unittest.TextTestRunner(verbosity=self.debug and 2 or 1)
verbosity = 1
if self.debug or self._force_verbose:
verbosity = 2
t = unittest.TextTestRunner(verbosity=verbosity)
try:
result = t.run(tests)
except KeyboardInterrupt:
sys.exit(1)
if use_cov:
cov.stop()
cov.save()
if cov:
if self._external_coverage:
cov.load()
else:
cov.stop()
cov.save()
err = int(bool(len(result.failures) > 0 or
len(result.errors) > 0))
if not err and use_cov and self.coverage:
if cov and not err:
cov.report(show_missing=False)
sys.exit(err)
......@@ -481,13 +483,9 @@ class TestBaseCommand(distutils.core.Command):
class TestCommand(TestBaseCommand):
description = "Runs a quick unit test suite"
user_options = TestBaseCommand.user_options + [
("skipcli", None, "Skip CLI tests"),
]
def initialize_options(self):
TestBaseCommand.initialize_options(self)
self.skipcli = None
def finalize_options(self):
TestBaseCommand.finalize_options(self)
......@@ -497,8 +495,6 @@ class TestCommand(TestBaseCommand):
Finds all the tests modules in tests/, and runs them.
'''
excludes = ["test_urls.py", "test_inject.py"]
if self.skipcli:
excludes += ["clitest.py"]
testfiles = self._find_tests_in_dir("tests", excludes)
# Put clitest at the end, since it takes the longest
......@@ -511,7 +507,7 @@ class TestCommand(TestBaseCommand):
for f in testfiles[:]:
if "checkprops" in f:
testfiles.remove(f)
if not self.testfile and not self.skipcli:
if not self.testfile:
testfiles.append(f)
self._testfiles = testfiles
......@@ -523,17 +519,14 @@ class TestUI(TestBaseCommand):
def run(self):
self._testfiles = self._find_tests_in_dir("tests/uitests", [])
self._force_verbose = True
self._external_coverage = True
TestBaseCommand.run(self)
class TestURLFetch(TestBaseCommand):
description = "Test fetching kernels and isos from various distro trees"
user_options = TestBaseCommand.user_options + [
("path=", None, "Paths to local iso or directory or check"
" for installable distro. Comma separated"),
]
def initialize_options(self):
TestBaseCommand.initialize_options(self)
self.path = ""
......@@ -548,9 +541,6 @@ class TestURLFetch(TestBaseCommand):
def run(self):
self._testfiles = ["tests.test_urls"]
if self.path:
import tests
tests.URLTEST_LOCAL_MEDIA += self.path
TestBaseCommand.run(self)
......
......@@ -28,14 +28,10 @@ os.environ["VIRTINST_TEST_URL_DIR"] = os.path.abspath(
# pylint: disable=wrong-import-position
from virtcli import cliconfig
# This sets all the cli bits back to their defaults
reload(cliconfig)
imp.reload(cliconfig)
from tests import utils
# Variable used to store a local iso or dir path to check for a distro
# Specified via 'python setup.py test_urls --path"
URLTEST_LOCAL_MEDIA = []
virtinstall = None
virtclone = None
virtconvert = None
......
<domain type="kvm">
<name>foobar</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<memory>65536</memory>
<currentMemory>65536</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch="x86_64">hvm</type>
<kernel>/tmp/virtinst-vmlinuz.</kernel>
<initrd>/tmp/virtinst-initrd.img.</initrd>
<cmdline>method=nfs:example.com/fake</cmdline>
</os>
<features>
<acpi/>
<apic/>
<vmport state="off"/>
</features>
<cpu mode="custom" match="exact">
<model>Opteron_G4</model>
</cpu>
<clock offset="utc">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
</clock>
<on_reboot>destroy</on_reboot>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<controller type="usb" index="0" model="ich9-ehci1"/>
<controller type="usb" index="0" model="ich9-uhci1">
<master startport="0"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci2">
<master startport="2"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci3">
<master startport="4"/>
</controller>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<console type="pty"/>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<sound model="ich6"/>
<video>
<model type="qxl"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
</rng>
</devices>
</domain>
<domain type="kvm">
<name>foobar</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<memory>65536</memory>
<currentMemory>65536</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch="x86_64">hvm</type>
<boot dev="hd"/>
</os>
<features>
<acpi/>
<apic/>
<vmport state="off"/>
</features>
<cpu mode="custom" match="exact">
<model>Opteron_G4</model>
</cpu>
<clock offset="utc">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
</clock>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<controller type="usb" index="0" model="ich9-ehci1"/>
<controller type="usb" index="0" model="ich9-uhci1">
<master startport="0"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci2">
<master startport="2"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci3">
<master startport="4"/>
</controller>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<console type="pty"/>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<sound model="ich6"/>
<video>
<model type="qxl"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
</rng>
</devices>
</domain>
......@@ -84,8 +84,13 @@
</disk>
<disk type="network" device="disk">
<driver name="qemu" type="raw"/>
<auth username="admin">
<secret type="ceph" uuid="f65cc5a8-b77b-4254-9030-d50a528fb456"/>
</auth>
<source protocol="rbd" name="rbd/foobar">
<host name="ceph-mon-1.example.com" port="6789"/>
<host name="ceph-mon-2.example.com" port="6789"/>
<host name="ceph-mon-3.example.com" port="6789"/>
</source>
<target dev="vdh" bus="virtio"/>
</disk>
......@@ -235,12 +240,12 @@
<filetransfer enable="yes"/>
</graphics>
<graphics type="spice">
<gl enable="yes"/>
<gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:00:02.0-render"/>
<image compression="off"/>
<listen type="socket"/>
</graphics>
<graphics type="spice">
<gl enable="yes"/>
<gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:00:02.0-render"/>
<image compression="off"/>
<listen type="none"/>
</graphics>
......@@ -386,12 +391,12 @@
</panic>
</devices>
<qemu:commandline>
<qemu:env name="DISPLAY" value=":0.1"/>
<qemu:arg value="-display"/>
<qemu:arg value="gtk,gl=on"/>
<qemu:arg value="-device"/>
<qemu:arg value="vfio-pci,addr=05.0,sysfsdev=/sys/class/mdev_bus/0000:00:02.0/f321853c-c584-4a6b-b99a-3eee22a3919c"/>
<qemu:arg value="-set"/>
<qemu:arg value="device.video0.driver=virtio-vga"/>
<qemu:env name="DISPLAY" value=":0.1"/>
</qemu:commandline>
</domain>
......@@ -20,6 +20,7 @@
<target dev="sda" bus="scsi"/>
<readonly/>
</disk>
<controller type="scsi" index="0" model="virtio-scsi"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
......
......@@ -92,8 +92,18 @@
<feature policy="forbid" name="foo"/>
<feature policy="forbid" name="bar"/>
<numa>
<cell id="0" cpus="1,2,3" memory="1024"/>
<cell id="1" cpus="5-8" memory="256"/>
<cell id="0" cpus="1,2,3" memory="1024">
<distances>
<sibling id="0" value="10"/>
<sibling id="1" value="21"/>
</distances>
</cell>
<cell id="1" cpus="5-8" memory="256">
<distances>
<sibling id="0" value="21"/>
<sibling id="1" value="10"/>
</distances>
</cell>
</numa>
<cache mode="emulate" level="3"/>
</cpu>
......@@ -149,6 +159,9 @@
<label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
</seclabel>
<on_lockfailure>ignore</on_lockfailure>
<cputune>
<vcpupin vcpu="0" cpuset="0-3"/>
</cputune>
</domain>
<domain type="kvm">
<name>foobar</name>
......@@ -247,8 +260,18 @@
<feature policy="forbid" name="foo"/>
<feature policy="forbid" name="bar"/>
<numa>
<cell id="0" cpus="1,2,3" memory="1024"/>
<cell id="1" cpus="5-8" memory="256"/>
<cell id="0" cpus="1,2,3" memory="1024">
<distances>
<sibling id="0" value="10"/>
<sibling id="1" value="21"/>
</distances>
</cell>
<cell id="1" cpus="5-8" memory="256">
<distances>
<sibling id="0" value="21"/>
<sibling id="1" value="10"/>
</distances>
</cell>
</numa>
<cache mode="emulate" level="3"/>
</cpu>
......@@ -304,4 +327,7 @@
<label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
</seclabel>
<on_lockfailure>ignore</on_lockfailure>
<cputune>
<vcpupin vcpu="0" cpuset="0-3"/>
</cputune>
</domain>
......@@ -44,7 +44,7 @@
</interface>
<input type="tablet" bus="usb"/>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<gl enable="yes"/>
<gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:00:02.0-render"/>
<image compression="off"/>
</graphics>
<console type="pty"/>
......
......@@ -16,6 +16,8 @@
# MA 02110-1301 USA.
import atexit
from distutils.spawn import find_executable
import io
import logging
import os
import shlex
......@@ -23,7 +25,6 @@ import shutil
import sys
import traceback
import unittest
import StringIO
from virtinst import support
......@@ -40,6 +41,7 @@ os.environ["DISPLAY"] = ":3.4"
image_prefix = "/tmp/__virtinst_cli_"
xmldir = "tests/cli-test-xml"
treedir = "%s/faketree" % xmldir
fakeiso = "%s/fakefedora.iso" % xmldir
vcdir = "%s/virtconv" % xmldir
compare_xmldir = "%s/compare" % xmldir
virtconv_out = "/tmp/__virtinst_tests__virtconv-outdir"
......@@ -144,7 +146,7 @@ class Command(object):
oldstdin = sys.stdin
oldargv = sys.argv
try:
out = StringIO.StringIO()
out = io.BytesIO()
sys.stdout = out
sys.stderr = out
sys.argv = self.argv
......@@ -201,7 +203,10 @@ class Command(object):
if conn is None:
raise RuntimeError("skip check is not None, but conn is None")
if type(check) is str:
if isinstance(check, bool):
if not check:
return
elif isinstance(check, str):
# pylint: disable=protected-access
if support._check_version(conn, check):
return
......@@ -247,7 +252,8 @@ class Command(object):
# Generate test files that don't exist yet
filename = self.compare_file
if utils.REGENERATE_OUTPUT or not os.path.exists(filename):
if (utils.clistate.regenerate_output or
not os.path.exists(filename)):
open(filename, "w").write(output)
if "--print-diff" in self.argv and output.count("\n") > 3:
......@@ -416,7 +422,15 @@ c.add_compare(""" \
c.add_compare("""--pxe \
--memory 512,maxmemory=1024 \
--vcpus 4,cores=2,threads=2,sockets=2 \
--cpu foobar,+x2apic,+x2apicagain,-distest,forbid=foo,forbid=bar,disable=distest2,optional=opttest,require=reqtest,match=strict,vendor=meee,cell.id=0,cell.cpus=1,2,3,cell.memory=1024,cell1.id=1,cell1.memory=256,cell1.cpus=5-8,cache.mode=emulate,cache.level=3 \
--cpu foobar,+x2apic,+x2apicagain,-distest,forbid=foo,forbid=bar,disable=distest2,optional=opttest,require=reqtest,match=strict,vendor=meee,\
cell.id=0,cell.cpus=1,2,3,cell.memory=1024,\
cell1.id=1,cell1.memory=256,cell1.cpus=5-8,\
cell0.distances.sibling0.id=0,cell0.distances.sibling0.value=10,\
cell0.distances.sibling1.id=1,cell0.distances.sibling1.value=21,\
cell1.distances.sibling0.id=0,cell1.distances.sibling0.value=21,\
cell1.distances.sibling1.id=1,cell1.distances.sibling1.value=10,\
cache.mode=emulate,cache.level=3 \
--cputune vcpupin0.vcpu=0,vcpupin0.cpuset=0-3 \
--metadata title=my-title,description=my-description,uuid=00000000-1111-2222-3333-444444444444 \
--boot cdrom,fd,hd,network,menu=off,loader=/foo/bar \
--idmap uid_start=0,uid_target=1000,uid_count=10,gid_start=0,gid_target=1000,gid_count=10 \
......@@ -787,7 +801,8 @@ c.add_compare("--arch s390x --machine s390-ccw-virtio --connect %(URI-KVM-S390X-
c.add_compare("--connect %(URI-KVM-SESSION)s --disk size=8 --os-variant fedora21 --cdrom %(EXISTIMG1)s", "kvm-session-defaults")
# misc KVM config tests
c.add_compare("--disk none --location %(EXISTIMG3)s --nonetworks", "location-iso") # Using --location iso mounting
c.add_compare("--disk none --location %(EXISTIMG3)s --nonetworks", "location-iso", skip_check=not find_executable("isoinfo")) # Using --location iso mounting
c.add_compare("--disk none --location nfs:example.com/fake --nonetworks", "location-nfs") # Using --location nfs
c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel6.4", "kvm-rhel6") # RHEL6 defaults
c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel7.0", "kvm-rhel7") # RHEL7 defaults
c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant centos7.0", "kvm-centos7") # Centos 7 defaults
......@@ -1060,7 +1075,8 @@ def setup():
"""
Create initial test files/dirs
"""
for i in exist_files:
os.system("ln -s %s %s" % (os.path.abspath(fakeiso), exist_files[0]))
for i in exist_files[1:]:
os.system("touch %s" % i)
......
# Copyright (C) 2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hop