Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
New upstream version 6.0.0
· 33890b9d
Guido Günther
authored
Jan 17, 2020
33890b9d
Document changes and release 6.0.0~rc1-1
· bb523e36
Guido Günther
authored
Jan 18, 2020
bb523e36
Merge tag 'upstream/6.0.0' into debian/experimental
· c5bb040d
Guido Günther
authored
Jan 18, 2020
Upstream version 6.0.0
c5bb040d
Hide whitespace changes
Inline
Side-by-side
AUTHORS
View file @
c5bb040d
...
...
@@ -423,6 +423,7 @@ Michael Chapman <mike@very.puzzling.org>
Michael Ellerman <michael@ellerman.id.au>
Michael R. Hines <mrhines@us.ibm.com>
Michael Santos <michael.santos@gmail.com>
Michael Weiser <michael.weiser@gmx.de>
Michael Wood <esiotrot@gmail.com>
Michal Dubiel <md@semihalf.com>
Michal Koutný <mkoutny@suse.com>
...
...
NEWS
View file @
c5bb040d
libvirt releases
================
# v6.0.0 (
unreleased
)
# v6.0.0 (
2020-01-15
)
* New features
* Packaging changes
- support for python2 is removed
Libvirt is no longer able to be built using the Python 2 binary. Python
3 must be used instead.
- docs: the python docutils toolset is now required
The use of rst2html has been introduced for the website build process
since docs are now being written in the RST as an alternative to HTML.
* New features
- new PCI hostdev address type: unassigned
A new PCI hostdev address type 'unassigned' is introduced. An
unassigned PCI hostdev behaves like any regular PCI hostdev inside
...
...
@@ -17,6 +23,40 @@ libvirt releases
hostdevs in the domain XML but allowing just a subset of them to be
assigned to the guest.
- Provide init scripts for sub-deaemons
So far libvirt shipped systemd unit files for sub-daemons. With this
release, init scripts are available too. Package maintainers can choose
which one to install via --with-init-script configure option.
- qemu: Support cold-unplug of sound devices
- qemu: Implement VIR_MIGRATE_PARAM_TLS_DESTINATION
This flag, which can be enabled using virsh's --tls-destination option,
allows migration to succeed in situations where there is a mismatch
between the destination's hostname and the information stored in its
TLS certificate.
- qemu: Support reporting memory bandwidth usage stats
Implement Intel RDT-MBM in libvirt. The stats can be obtained via virsh
domstats --memory.
- qemu: Allow accessing NVMe disks directly
Before this release there were two ways to configure a NVMe disk for a
domain. The first was using <disk/> with the <source/> pointing to the
/dev/nvmeXXXX. The other was using PCI assignment via <hostdev/>
element. Both have their disadvantages: the former adds latency of file
system and block layers of the host kernel, the latter prohibits domain
migration. In this release the third way of configuring NVMe disk is
added which combines the advantages and drops disadvantages of the
previous two ways. It's accessible via <disk type='nvme'/>.
* Removed features
- 'phyp' Power Hypervisor driver removed
The 'phyp' Power Hypervisor driver has not seen active development
since 2011 and does not seem to have any real world usage. It has now
been removed.
* Improvements
- qemu: xz save image compression is faster
...
...
@@ -28,18 +68,34 @@ libvirt releases
running time, at cost of the larest compressed size, lzop should be
used.
* Bug fixes
- domain: Improve job stat handling
It is now possible to retrieve stats for completed and failed jobs.
* Removed features
- qemu: Don't hold monitor and agent job at the same time
Before this change, a malicious (or buggy) qemu-guest-agent running in
the guest could make other libvirt APIs unavailable for an unbounded
amount of time.
- support for python2 is removed
Libvirt is no longer able to be built using the Python 2 binary. Python
3 must be used instead.
* Bug fixes
- 'phyp' Power Hypervisor driver removed
The 'phyp' Power Hypervisor driver has not seen active development
since 2011 and does not seem to have any real world usage. It has now
been removed.
- qemu: Report error if backing image format is not specified explicitly
For a long time libvirt was assuming that a backing file is RAW when
the format was not specified. This didn't pose a problem until blockdev
support was enabled in last release. Libvirt now requires that the
format is specified in the image metadata or domain XML and the VM will
refuse to start otherwise. Additionally the error message now links to
the knowledge base which summarizes how to fix the images.
- qemu: Fix non-shared storage migration over NBD
- qemu: Generate a single MAC address for hotplugged network devices
Since libvirt 4.6.0, when hotplugging a network device that didn't have
a MAC address already assigned by the user, two separate addresses
would be generated: one for the live configuration, which would show up
immediately, and one for the inactive configuration, which would show
up after the first reboot. This situation was clearly undesirable, so a
single MAC address is now generated and used both for the live
configuration and the inactive one.
# v5.10.0 (2019-12-02)
...
...
@@ -95,11 +151,6 @@ libvirt releases
and things like that. To bring the number of languages used down, these
scripts were rewritten into Python.
- Provide init scripts for sub-deaemons
So far libvirt shipped systemd unit files for sub-daemons. With this
release, init scripts are available too. Package maintainers can choose
which one to install via --with-init-script configure option.
* Bug fixes
- Warn verbosely if using old loader:nvram pairs
...
...
debian/changelog
View file @
c5bb040d
libvirt (6.0.0~rc1-1) experimental; urgency=medium
[ Guido Günther ]
* [443fae0] New upstream version 6.0.0~rc1
* [70c5676] Bump symbol versions
* [eb6c6c1] gitlab-ci: Build package.
We unfortunately can't use salsa-ci's prebuilt pipeline since
that hangs on large jobs:
https://salsa.debian.org/salsa/support/issues/180
We redirct output to a file to work around:
https://salsa.debian.org/salsa/support/issues/191
[ Christian Ehrhardt ]
* [cc6b955] refresh d/p/* for v6.0.0
* [5639ffb] d/control: bump build dep to python3
* [dc99d35] d/rules: set enable-dependency-tracking to avoid FTBFS.
* [af131c7] d/rules: drop the no more existing xen configure option
* [84367d9] d/control: add python3-docutils as build dependency
* [37f0a5c] d/libvirt-doc.doc: install rendered docs
* [880f00e] d/libvirt-daemon-system.examples: Drop examples that are now
conf files
* [671aeca] d/libvirt-doc.doc-base.libvirt-doc: adapt doc base to new file
placement
-- Guido Günther <agx@sigxcpu.org> Sat, 18 Jan 2020 18:16:20 +0100
libvirt (5.6.0-4) experimental; urgency=medium
* [d88536d] Introduce libvirt-daemon-system-{systemd,sysv} Move init scripts
...
...
docs/manpages/virsh.rst
View file @
c5bb040d
...
...
@@ -577,7 +577,7 @@ from the domain's XML <os/> element and <type/> subelement or one from a
list of machines from the ``virsh capabilities`` output for a specific
architecture and domain type.
For the
qemu
hypervisor, a *virttype* of either 'qemu' or 'kvm' must be
For the
QEMU
hypervisor, a *virttype* of either 'qemu' or 'kvm' must be
supplied along with either the *emulatorbin* or *arch* in order to
generate output for the default *machine*. Supplying a *machine*
value will generate output for the specific machine.
...
...
@@ -1072,7 +1072,7 @@ read I/O operations limit.
write I/O operations limit.
*--size-iops-sec* specifies size I/O operations limit per second.
*--group-name* specifies group name to share I/O quota between multiple drives.
For a
qemu
domain, if no name is provided, then the default is to have a single
For a
QEMU
domain, if no name is provided, then the default is to have a single
group for each *device*.
Older versions of virsh only accepted these options with underscore
...
...
@@ -1084,7 +1084,7 @@ An explicit 0 also clears any limit. A non-zero value for a given total
cannot be mixed with non-zero values for read or write.
It is up to the hypervisor to determine how to handle the length values.
For the
qemu
hypervisor, if an I/O limit value or maximum value is set,
For the
QEMU
hypervisor, if an I/O limit value or maximum value is set,
then the default value of 1 second will be displayed. Supplying a 0 will
reset the value back to the default.
...
...
@@ -1211,7 +1211,7 @@ to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to *domain* (see
also ``domblklist`` for listing these names).
*bandwidth* specifies copying bandwidth limit in MiB/s, although for
qemu
, it may be non-zero only for an online domain. For further information
QEMU
, it may be non-zero only for an online domain. For further information
on the *bandwidth* argument see the corresponding section for the ``blockjob``
command.
...
...
@@ -1642,7 +1642,7 @@ domblkstat
Get device block stats for a running domain. A *block-device* corresponds
to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to *domain* (see
also ``domblklist`` for listing these names). On a
lxc
or
qemu
domain,
also ``domblklist`` for listing these names). On a
LXC
or
QEMU
domain,
omitting the *block-device* yields device block stats summarily for the
entire domain.
...
...
@@ -3182,7 +3182,7 @@ Providing *--tls* causes the migration to use the host configured TLS setup
the migration of the domain. Usage requires proper TLS setup for both source
and target. Normally the TLS certificate from the destination host must match
+the host's name for TLS verification to succeed. When the certificate does not
+match the destination hostname and the expected cetificate's hostname is
+match the destination hostname and the expected ce
r
tificate's hostname is
+known, *--tls-destination* can be used to pass the expected *hostname* when
+starting the migration.
...
...
@@ -3265,7 +3265,7 @@ destination). Some hypervisors do not support this feature and will return an
error if this parameter is used.
Optional *disks-port* sets the port that hypervisor on destination side should
bind to for incoming disks traffic. Currently it is supported only by
qemu
.
bind to for incoming disks traffic. Currently it is supported only by
QEMU
.
migrate-compcache
...
...
@@ -6970,21 +6970,30 @@ no vm state leaves the domain in an inactive state. Passing either the
transient domains cannot be inactive, it is required to use one of these
flags when reverting to a disk snapshot of a transient domain.
There are two cases where a snapshot revert involves extra risk, which
requires the use of *--force* to proceed. One is the case of a
snapshot that lacks full domain information for reverting
configuration (such as snapshots created prior to libvirt 0.9.5);
since libvirt cannot prove that the current configuration matches what
was in use at the time of the snapshot, supplying *--force* assures
libvirt that the snapshot is compatible with the current configuration
(and if it is not, the domain will likely fail to run). The other is
the case of reverting from a running domain to an active state where a
new hypervisor has to be created rather than reusing the existing
hypervisor, because it implies drawbacks such as breaking any existing
VNC or Spice connections; this condition happens with an active
snapshot that uses a provably incompatible configuration, as well as
with an inactive snapshot that is combined with the *--start* or
*--pause* flag.
There are a number of cases where a snapshot revert involves extra risk, which
requires the use of *--force* to proceed:
* One is the case of a snapshot that lacks full domain information for
reverting configuration (such as snapshots created prior to libvirt
0.9.5); since libvirt cannot prove that the current configuration matches
what was in use at the time of the snapshot, supplying *--force* assures
libvirt that the snapshot is compatible with the current configuration
(and if it is not, the domain will likely fail to run).
* Another is the case of reverting from a running domain to an active
state where a new hypervisor has to be created rather than reusing the
existing hypervisor, because it implies drawbacks such as breaking any
existing VNC or Spice connections; this condition happens with an active
snapshot that uses a provably incompatible configuration, as well as with
an inactive snapshot that is combined with the *--start* or *--pause*
flag.
* Also, libvirt will refuse to restore snapshots of inactive QEMU domains
while there is managed saved state. This is because those snapshots do not
contain memory state and will therefore not replace the existing memory
state. This ends up switching a disk underneath a running system and will
likely cause extensive filesystem corruption or crashes due to swap content
mismatches when run.
snapshot-delete
...
...
@@ -7457,7 +7466,7 @@ qemu-monitor-command
qemu-monitor-command domain { [--hmp] | [--pretty] } command...
Send an arbitrary monitor command *command* to domain *domain* through the
qemu
monitor. The results of the command will be printed on stdout. If
QEMU
monitor. The results of the command will be printed on stdout. If
*--hmp* is passed, the command is considered to be a human monitor command
and libvirt will automatically convert it into QMP if needed. In that case
the result will also be converted back from QMP. If *--pretty* is given,
...
...
@@ -7476,7 +7485,7 @@ qemu-agent-command
qemu-agent-command domain [--timeout seconds | --async | --block] command...
Send an arbitrary guest agent command *command* to domain *domain* through
qemu
agent.
QEMU
agent.
*--timeout*, *--async* and *--block* options are exclusive.
*--timeout* requires timeout seconds *seconds* and it must be positive.
When *--aysnc* is given, the command waits for timeout whether success or
...
...
docs/news.xml
View file @
c5bb040d
...
...
@@ -42,8 +42,17 @@
-->
<libvirt>
<release
version=
"v6.0.0"
date=
"unreleased"
>
<section
title=
"New features"
>
<release
version=
"v6.0.0"
date=
"2020-01-15"
>
<section
title=
"Packaging changes"
>
<change>
<summary>
support for python2 is removed
</summary>
<description>
Libvirt is no longer able to be built using the
Python 2 binary. Python 3 must be used instead.
</description>
</change>
<change>
<summary>
docs: the python docutils toolset is now required
...
...
@@ -54,6 +63,8 @@
written in the RST as an alternative to HTML.
</description>
</change>
</section>
<section
title=
"New features"
>
<change>
<summary>
new PCI hostdev address type: unassigned
...
...
@@ -68,6 +79,70 @@
guest.
</description>
</change>
<change>
<summary>
Provide init scripts for sub-deaemons
</summary>
<description>
So far libvirt shipped systemd unit files for sub-daemons. With this
release, init scripts are available too. Package maintainers can
choose which one to install via
<code>
--with-init-script
</code>
configure option.
</description>
</change>
<change>
<summary>
qemu: Support cold-unplug of sound devices
</summary>
</change>
<change>
<summary>
qemu: Implement VIR_MIGRATE_PARAM_TLS_DESTINATION
</summary>
<description>
This flag, which can be enabled using
<code>
virsh
</code>
's
<code>
--tls-destination
</code>
option, allows migration to succeed
in situations where there is a mismatch between the destination's
hostname and the information stored in its TLS certificate.
</description>
</change>
<change>
<summary>
qemu: Support reporting memory bandwidth usage stats
</summary>
<description>
Implement Intel RDT-MBM in libvirt. The stats can be obtained via
<code>
virsh domstats --memory
</code>
.
</description>
</change>
<change>
<summary>
qemu: Allow accessing NVMe disks directly
</summary>
<description>
Before this release there were two ways to configure a NVMe disk for
a domain. The first was using
<
disk/
>
with the
<
source/
>
pointing to the
<code>
/dev/nvmeXXXX
</code>
. The other was using PCI
assignment via
<
hostdev/
>
element. Both have their
disadvantages: the former adds latency of file system and block
layers of the host kernel, the latter prohibits domain migration. In
this release the third way of configuring NVMe disk is added which
combines the advantages and drops disadvantages of the previous two
ways. It's accessible via
<
disk type='nvme'/
>
.
</description>
</change>
</section>
<section
title=
"Removed features"
>
<change>
<summary>
'phyp' Power Hypervisor driver removed
</summary>
<description>
The 'phyp' Power Hypervisor driver has not seen active development
since 2011 and does not seem to have any real world usage. It
has now been removed.
</description>
</change>
</section>
<section
title=
"Improvements"
>
<change>
...
...
@@ -86,27 +161,56 @@
lzop should be used.
</description>
</change>
<change>
<summary>
domain: Improve job stat handling
</summary>
<description>
It is now possible to retrieve stats for completed and failed jobs.
</description>
</change>
<change>
<summary>
qemu: Don't hold monitor and agent job at the same time
</summary>
<description>
Before this change, a malicious (or buggy)
<code>
qemu-guest-agent
</code>
running in the guest could make other
libvirt APIs unavailable for an unbounded amount of time.
</description>
</change>
</section>
<section
title=
"Bug fixes"
>
</section>
<section
title=
"Removed features"
>
<change>
<summary>
support for python2 is removed
qemu: Report error if backing image format is not specified explicitly
</summary>
<description>
Libvirt is no longer able to be built using the
Python 2 binary. Python 3 must be used instead.
For a long time libvirt was assuming that a backing file is RAW when
the format was not specified. This didn't pose a problem until blockdev
support was enabled in last release. Libvirt now requires that
the format is specified in the image metadata or domain XML and the
VM will refuse to start otherwise. Additionally the error message
now links to the knowledge base which summarizes how to fix the images.
</description>
</change>
<change>
<summary>
'phyp' Power Hypervisor driver removed
qemu: Fix non-shared storage migration over NBD
</summary>
</change>
<change>
<summary>
qemu: Generate a single MAC address for hotplugged network devices
</summary>
<description>
The 'phyp' Power Hypervisor driver has not seen active development
since 2011 and does not seem to have any real world usage. It
has now been removed.
Since libvirt 4.6.0, when hotplugging a network device that didn't
have a MAC address already assigned by the user, two separate
addresses would be generated: one for the live configuration, which
would show up immediately, and one for the inactive configuration,
which would show up after the first reboot. This situation was
clearly undesirable, so a single MAC address is now generated and
used both for the live configuration and the inactive one.
</description>
</change>
</section>
...
...
@@ -211,17 +315,6 @@
down, these scripts were rewritten into Python.
</description>
</change>
<change>
<summary>
Provide init scripts for sub-deaemons
</summary>
<description>
So far libvirt shipped systemd unit files for sub-daemons. With this
release, init scripts are available too. Package maintainers can
choose which one to install via
<code>
--with-init-script
</code>
configure option.
</description>
</change>
</section>
<section
title=
"Bug fixes"
>
<change>
...
...
include/libvirt/libvirt-domain.h
View file @
c5bb040d
...
...
@@ -1059,7 +1059,7 @@ typedef enum {
*
* Normally the TLS certificate from the destination host must match the host's
* name for TLS verification to succeed. When the certificate does not match
* the destination hostname and the expected cetificate's hostname is known,
* the destination hostname and the expected ce
r
tificate's hostname is known,
* this parameter can be used to pass this expected hostname when starting
* the migration.
*/
...
...
libvirt.spec
View file @
c5bb040d
...
...
@@ -218,14 +218,14 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 6.0.0
Release:
0rc
1%{?dist}
%{?extra_release}
Release: 1%{?dist}
License: LGPLv2+
URL: https://libvirt.org/
%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
%define mainturl stable_updates/
%endif
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}
-rc1
.tar.xz
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
...
...
libvirt.spec.in
View file @
c5bb040d
...
...
@@ -218,14 +218,14 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: @VERSION@
Release:
0rc
1%{?dist}
%{?extra_release}
Release: 1%{?dist}
License: LGPLv2+
URL: https://libvirt.org/
%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
%define mainturl stable_updates/
%endif
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}
-rc1
.tar.xz
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
...
...
scripts/apibuild.py
View file @
c5bb040d
...
...
@@ -1657,6 +1657,13 @@ class CParser:
token
=
(
"
name
"
,
"
virloginit
"
)
return
token
elif
token
[
0
]
==
"
name
"
and
token
[
1
]
==
"
G_STATIC_ASSERT
"
:
# skip whole line
while
token
is
not
None
and
not
(
token
[
0
]
==
"
sep
"
and
token
[
1
]
==
"
;
"
):
token
=
self
.
token
()
return
self
.
token
()
elif
token
[
0
]
==
"
name
"
:
if
self
.
type
==
""
:
self
.
type
=
token
[
1
]
...
...
src/conf/backup_conf.c
View file @
c5bb040d
...
...
@@ -338,7 +338,7 @@ virDomainBackupDiskDefFormat(virBufferPtr buf,
virStorageFileFormatTypeToString
(
disk
->
store
->
format
));
if
(
virDomainDiskSourceFormat
(
&
childBuf
,
disk
->
store
,
sourcename
,
0
,
false
,
storageSourceFormatFlags
,
NULL
)
<
0
)
0
,
false
,
storageSourceFormatFlags
,
true
,
NULL
)
<
0
)
return
-
1
;
}
...
...
src/conf/domain_conf.c
View file @
c5bb040d
...
...
@@ -13428,6 +13428,8 @@ virDomainInputDefParseXML(virDomainXMLOptionPtr xmlopt,
def->type == VIR_DOMAIN_INPUT_TYPE_KBD) &&
(ARCH_IS_X86(dom->os.arch) || dom->os.arch == VIR_ARCH_NONE)) {
def->bus = VIR_DOMAIN_INPUT_BUS_PS2;
} else if (ARCH_IS_S390(dom->os.arch)) {
def->bus = VIR_DOMAIN_INPUT_BUS_VIRTIO;
} else {
def->bus = VIR_DOMAIN_INPUT_BUS_USB;
}
...
...
@@ -24189,6 +24191,8 @@ virDomainDiskSourceFormatPrivateData(virBufferPtr buf,
* @policy: startup policy attribute value, if necessary
* @attrIndex: the 'index' attribute of <source> is formatted if true
* @flags: XML formatter flags
* @formatsecrets: Force formatting of <auth> and <encryption> under <source>
* regardless of the original definition state
* @xmlopt: XML formatter callbacks
*
* Formats @src into a <source> element. Note that this doesn't format the
...
...
@@ -24201,6 +24205,7 @@ virDomainDiskSourceFormat(virBufferPtr buf,
int policy,
bool attrIndex,
unsigned int flags,
bool formatsecrets,
virDomainXMLOptionPtr xmlopt)
{
g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
...
...
@@ -24257,13 +24262,13 @@ virDomainDiskSourceFormat(virBufferPtr buf,
* <auth> for a volume source type. The <auth> information is
* kept in the storage pool and would be overwritten anyway.
* So avoid formatting it for volumes. */
if (src->auth && src->authInherited &&
if (src->auth &&
(
src->authInherited
|| formatsecrets)
&&
src->type != VIR_STORAGE_TYPE_VOLUME)
virStorageAuthDefFormat(&childBuf, src->auth);
/* If we found encryption as a child of <source>, then format it
* as we found it. */
if (src->encryption && src->encryptionInherited &&
if (src->encryption &&
(
src->encryptionInherited
|| formatsecrets)
&&
virStorageEncryptionFormat(&childBuf, src->encryption) < 0)
return -1;
...
...
@@ -24324,7 +24329,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
virBufferAsprintf(&childBuf, "<format type='%s'/>\n",
virStorageFileFormatTypeToString(backingStore->format));
if (virDomainDiskSourceFormat(&childBuf, backingStore, "source", 0, false,
flags, xmlopt) < 0)
flags,
true,
xmlopt) < 0)
return -1;
if (virDomainDiskBackingStoreFormat(&childBuf, backingStore, xmlopt, flags) < 0)
...
...
@@ -24486,7 +24491,7 @@ virDomainDiskDefFormatMirror(virBufferPtr buf,
virBufferEscapeString(&childBuf, "<format type='%s'/>\n", formatStr);
if (virDomainDiskSourceFormat(&childBuf, disk->mirror, "source", 0, true,
flags, xmlopt) < 0)
flags,
true,
xmlopt) < 0)
return -1;
if (virDomainDiskBackingStoreFormat(&childBuf, disk->mirror, xmlopt, flags) < 0)
...
...
@@ -24585,7 +24590,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
virStorageAuthDefFormat(buf, def->src->auth);
if (virDomainDiskSourceFormat(buf, def->src, "source", def->startupPolicy,
true, flags, xmlopt) < 0)
true, flags,
false,
xmlopt) < 0)
return -1;
/* Don't format backingStore to inactive XMLs until the code for
...
...
src/conf/domain_conf.h
View file @
c5bb040d
...
...
@@ -3118,6 +3118,7 @@ int virDomainDiskSourceFormat(virBufferPtr buf,
int
policy
,
bool
attrIndex
,
unsigned
int
flags
,
bool
formatsecrets
,
virDomainXMLOptionPtr
xmlopt
);
int
...
...
src/conf/snapshot_conf.c
View file @
c5bb040d
...
...
@@ -818,7 +818,7 @@ virDomainSnapshotDiskDefFormat(virBufferPtr buf,
if
(
disk
->
src
->
format
>
0
)
virBufferEscapeString
(
buf
,
"<driver type='%s'/>
\n
"
,
virStorageFileFormatTypeToString
(
disk
->
src
->
format
));
if
(
virDomainDiskSourceFormat
(
buf
,
disk
->
src
,
"source"
,
0
,
false
,
0
,
if
(
virDomainDiskSourceFormat
(
buf
,
disk
->
src
,
"source"
,
0
,
false
,
0
,
true
,
xmlopt
)
<
0
)
return
-
1
;
...
...
src/qemu/qemu_capabilities.c
View file @
c5bb040d
...
...
@@ -5674,10 +5674,21 @@ virQEMUCapsFillDomainDeviceHostdevCaps(virQEMUCapsPtr qemuCaps,
VIR_DOMAIN_STARTUP_POLICY_OPTIONAL
);
VIR_DOMAIN_CAPS_ENUM_SET
(
hostdev
->
subsysType
,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB
,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI
,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI
);
if
(
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_PIIX3_USB_UHCI
)
||
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_PIIX4_USB_UHCI
)
||
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_USB_EHCI
)
||
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_ICH9_USB_EHCI1
)
||
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_VT82C686B_USB_UHCI
)
||
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_PCI_OHCI
)
||
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_NEC_USB_XHCI
)
||
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_DEVICE_QEMU_XHCI
))
{
VIR_DOMAIN_CAPS_ENUM_SET
(
hostdev
->
subsysType
,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB
);
}
/* No virDomainHostdevCapsType for QEMU */
virDomainCapsEnumClear
(
&
hostdev
->
capsType
);
...
...
src/qemu/qemu_domain.c
View file @
c5bb040d
...
...
@@ -2547,7 +2547,7 @@ qemuDomainObjPrivateXMLFormatBlockjobFormatSource(virBufferPtr buf,
virStorageTypeToString(src->type),
virStorageFileFormatTypeToString(src->format));
if (virDomainDiskSourceFormat(&childBuf, src, "source", 0, true, xmlflags, xmlopt) < 0)
if (virDomainDiskSourceFormat(&childBuf, src, "source", 0, true, xmlflags,
true,
xmlopt) < 0)
return -1;
if (chain &&
...
...
@@ -2746,7 +2746,7 @@ qemuDomainObjPrivateXMLFormatNBDMigrationSource(virBufferPtr buf,
virStorageFileFormatTypeToString(src->format));
if (virDomainDiskSourceFormat(&childBuf, src, "source", 0, false,
VIR_DOMAIN_DEF_FORMAT_STATUS, xmlopt) < 0)
VIR_DOMAIN_DEF_FORMAT_STATUS,
true,
xmlopt) < 0)
return -1;
virXMLFormatElement(buf, "migrationSource", &attrBuf, &childBuf);
...
...
src/qemu/qemu_driver.c
View file @
c5bb040d
...
...
@@ -16636,6 +16636,15 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
_("must respawn qemu to start inactive snapshot"));
goto endjob;
}
if (vm->hasManagedSave &&
!(snapdef->state == VIR_DOMAIN_SNAPSHOT_RUNNING ||
snapdef->state == VIR_DOMAIN_SNAPSHOT_PAUSED)) {
virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY, "%s",
_("snapshot without memory state, removal of "
"existing managed saved state strongly "
"recommended to avoid corruption"));
goto endjob;
}
}
if (snap->def->dom) {
...
...
src/util/vircgroupv2devices.c
View file @
c5bb040d
...
...
@@ -311,6 +311,11 @@ virCgroupV2DevicesAttachProg(virCgroupPtr group,
VIR_FORCE_CLOSE
(
group
->
unified
.
devices
.
progfd
);
}
if
(
group
->
unified
.
devices
.
mapfd
>
0
)
{
VIR_DEBUG
(
"Closing existing map that was replaced by new one."
);
VIR_FORCE_CLOSE
(
group
->
unified
.
devices
.
mapfd
);
}
group
->
unified
.
devices
.
progfd
=
progfd
;
group
->
unified
.
devices
.
mapfd
=
mapfd
;
group
->
unified
.
devices
.
max
=
max
;
...
...
src/util/virerror.c
View file @
c5bb040d
...
...
@@ -910,7 +910,7 @@ typedef struct {
}
virErrorMsgTuple
;
const
virErrorMsgTuple
virErrorMsgStrings
[
VIR_ERR_NUMBER_LAST
]
=
{
static
const
virErrorMsgTuple
virErrorMsgStrings
[]
=
{
[
VIR_ERR_OK
]
=
{
NULL
,
NULL
},
[
VIR_ERR_INTERNAL_ERROR
]
=
{
N_
(
"internal error"
),
...
...
@@ -1235,6 +1235,8 @@ const virErrorMsgTuple virErrorMsgStrings[VIR_ERR_NUMBER_LAST] = {
N_
(
"network port not found: %s"
)
},
};
G_STATIC_ASSERT
(
G_N_ELEMENTS
(
virErrorMsgStrings
)
==
VIR_ERR_NUMBER_LAST
);
/**
* virErrorMsg:
...
...
src/util/virstoragefile.c
View file @
c5bb040d
...
...
@@ -4979,7 +4979,8 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src,
*/
if
(
report_broken
)
{
virReportError
(
VIR_ERR_OPERATION_INVALID
,
_
(
"format of backing image '%s' of image '%s' was not specified in the image metadata"
),
_
(
"format of backing image '%s' of image '%s' was not specified in the image metadata "
"(See https://libvirt.org/kbase/backing_chains.html for troubleshooting)"
),
src
->
backingStoreRaw
,
NULLSTR
(
src
->
path
));
return
-
1
;
}
...
...
tests/domaincapsdata/qemu_2.10.0.s390x.xml
View file @
c5bb040d
...
...
@@ -168,7 +168,6 @@
<value>
optional
</value>
</enum>
<enum
name=
'subsysType'
>
<value>
usb
</value>
<value>
pci
</value>
<value>
scsi
</value>
</enum>
...
...
Prev
1
2
Next