[libvirt] [PATCH v2 0/2] Allow usernet to have an address
by Michal Privoznik
diff to v1:
- moved the <ip/> directly under <interface/>
- enhanced the test
- tuned some error messages
Michal Privoznik (2):
conf: Allow usernet to have an address
qemu: Implement usernet address
docs/formatdomain.html.in | 8 +++-
src/qemu/qemu_command.c | 22 +++++++++
src/qemu/qemu_domain.c | 53 +++++++++++++++++++++-
.../qemuxml2argv-net-user-addr.args | 26 +++++++++++
.../qemuxml2argv-net-user-addr.xml | 41 +++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
.../qemuxml2xmlout-net-user-addr.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
8 files changed, 151 insertions(+), 2 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-user-addr.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-user-addr.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-net-user-addr.xml
--
2.13.5
7 years, 2 months
[libvirt] [PATCH go-xml 0/2] DomainAddress parsing fix
by Dean Smith
*** BLURB HERE ***
I have taken Anton Kryukovs fix from #13 on github and am submitting
along with addition of 1.8 and 1.9 as travis go version targets
Example of failing running on 1.9, which passes on 1.7 can be found
at
git@github.com:deasmi/libvirt-go-xml.git
branch parsefailtest
Anton Kryukov (1):
Add support for hex values in DomainAddress struct
Dean Smith (1):
Adding go 1.8 and 1.9 to travis tests
.travis.yml | 2 ++
domain.go | 27 ++++++++++++++++++---------
domain_test.go | 10 +++++-----
3 files changed, 25 insertions(+), 14 deletions(-)
--
1.8.3.1
7 years, 2 months
[libvirt] [PATCH 0/3] qemu: Remove support for downstream-only blockjob
by Peter Krempa
See patch 1/3
Peter Krempa (3):
qemu: Remove support for legacy block jobs
qemu: monitor: Remove support for "legacy" block jobs
qemu: caps: Deprecate QEMU_CAPS_BLOCKJOB_SYNC
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_domain.c | 13 +++-------
src/qemu/qemu_domain.h | 2 +-
src/qemu/qemu_driver.c | 61 +++++++++++---------------------------------
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_monitor.c | 24 ++++++++---------
src/qemu/qemu_monitor.h | 9 +++----
src/qemu/qemu_monitor_json.c | 17 +++++-------
src/qemu/qemu_monitor_json.h | 9 +++----
10 files changed, 44 insertions(+), 96 deletions(-)
--
2.14.1
7 years, 2 months
[libvirt] [PATCH 0/2] Use secret objects to pass iSCSI passwords
by John Ferlan
Fairly simple exercise since similar processing is used for RBD,
just needed to check for the proper capabililty and then use it
and test that it works.
NB 1: Depending on order of submit either this patch will need to
add the capability flag into caps_2.10.0 or the other patch
will need to add it... Plan is to wait for the other patch
to be ACK'd and then add the capability here
NB 2: "Theoretically speaking" one could/should also consider the
<auth> for the JSON virstoragefile source parse backing code;
however, <auth> is not a <source> property rather it is a
<disk> property and thus stored in QEMU_DOMAIN_DISK_PRIVATE.
But for both RBD and iSCSI the "user" and "password-secret"
options are -drive properties that could be parsed and
handled (ok well mostly handled). In any case, the RBD code
doesn't handle it (for now), so neither will the iSCSI code.
John Ferlan (2):
qemu: Get capabilities for iscsi usage of password-secret argument
qemu: Use secret objects to pass iSCSI passwords
src/qemu/qemu_capabilities.c | 4 ++
src/qemu/qemu_capabilities.h | 3 ++
src/qemu/qemu_command.c | 19 ++++++++-
src/qemu/qemu_domain.c | 4 ++
tests/qemucapabilitiesdata/caps_2.9.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
...xml2argv-disk-drive-network-iscsi-auth-AES.args | 39 ++++++++++++++++++
...uxml2argv-disk-drive-network-iscsi-auth-AES.xml | 43 +++++++++++++++++++
...ml2argv-hostdev-scsi-virtio-iscsi-auth-AES.args | 35 ++++++++++++++++
...xml2argv-hostdev-scsi-virtio-iscsi-auth-AES.xml | 48 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 10 +++++
12 files changed, 206 insertions(+), 2 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-AES.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-AES.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-AES.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-AES.xml
--
2.9.5
7 years, 2 months
[libvirt] [PATCH] news: document spice rendernode DAC changes
by Cole Robinson
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
docs/news.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 483f9d6d1..17f00a25e 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -37,6 +37,17 @@
<section title="New features">
</section>
<section title="Improvements">
+ <change>
+ <summary>
+ qemu: DAC permissions properly set for spice renderndoe
+ </summary>
+ <description>
+ When a rendernode= path is set for spice GL on qemu:///system,
+ we now correctly set DAC permissions on the device at VM startup.
+ This is the last remaining hurdle to let spice GL work for
+ qemu:///system without any external host changes.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
</section>
--
2.13.5
7 years, 2 months
[libvirt] [PATCH] virsh.pod: Fix units for dommemstat and domstats
by Michal Privoznik
The documentation mistakenly states that the unit for returned
values is kB (multiple of 1000), while in fact we are returning
KiB (multiple of 1024).
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Oops, I forgot to send this one,
tools/virsh.pod | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 01453be60..4331c76fc 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -810,16 +810,16 @@ missing from the output. Other fields may appear if communicating with a newer
version of libvirtd.
B<Explanation of fields>:
- swap_in - The amount of data read from swap space (in kB)
- swap_out - The amount of memory written out to swap space (in kB)
+ swap_in - The amount of data read from swap space (in KiB)
+ swap_out - The amount of memory written out to swap space (in KiB)
major_fault - The number of page faults where disk IO was required
minor_fault - The number of other page faults
- unused - The amount of memory left unused by the system (in kB)
- available - The amount of usable memory as seen by the domain (in kB)
- actual - Current balloon value (in KB)
- rss - Resident Set Size of the running domain's process (in kB)
+ unused - The amount of memory left unused by the system (in KiB)
+ available - The amount of usable memory as seen by the domain (in KiB)
+ actual - Current balloon value (in KiB)
+ rss - Resident Set Size of the running domain's process (in KiB)
usable - The amount of memory which can be reclaimed by balloon
-without causing host swapping (in KB)
+without causing host swapping (in KiB)
last-update - Timestamp of the last update of statistics (in seconds)
For QEMU/KVM with a memory balloon, setting the optional I<--period> to a
@@ -906,22 +906,22 @@ I<--cpu-total> returns:
I<--balloon> returns:
- "balloon.current" - the memory in kiB currently used
- "balloon.maximum" - the maximum memory in kiB allowed
- "balloon.swap_in" - the amount of data read from swap space (in kB)
+ "balloon.current" - the memory in KiB currently used
+ "balloon.maximum" - the maximum memory in KiB allowed
+ "balloon.swap_in" - the amount of data read from swap space (in KiB)
"balloon.swap_out" - the amount of memory written out to swap
- space (in kB)
+ space (in KiB)
"balloon.major_fault" - the number of page faults then disk IO
was required
"balloon.minor_fault" - the number of other page faults
"balloon.unused" - the amount of memory left unused by the
- system (in kB)
+ system (in KiB)
"balloon.available" - the amount of usable memory as seen by
- the domain (in kB)
+ the domain (in KiB)
"balloon.rss" - Resident Set Size of running domain's process
- (in kB)
+ (in KiB)
"balloon.usable" - the amount of memory which can be reclaimed by
- balloon without causing host swapping (in KB)
+ balloon without causing host swapping (in KiB)
"balloon.last-update" - timestamp of the last update of statistics
(in seconds)
--
2.13.5
7 years, 2 months
[libvirt] [PATCH] qemu: Clean up qemuDomainSecretPrepare
by John Ferlan
No need to pass a @driver parameter since all that's done is deref
the @cfg especially since the only caller can just pass an already
referenced @cfg.
Also, looks like commit id '0298531b' at one time had a different
name for the API, so I took the liberty of fixing the comments too
since I would already be updating them for the @cfg variable.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Saw this while doing some updates for the recently posted VxHS series.
src/qemu/qemu_domain.c | 11 ++++-------
src/qemu/qemu_domain.h | 2 +-
src/qemu/qemu_process.c | 2 +-
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index cbee151..4cd0087 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7454,7 +7454,7 @@ qemuDomainPrepareChannel(virDomainChrDefPtr channel,
}
-/* qemuProcessPrepareDomainChardevSourceTLS:
+/* qemuDomainPrepareChardevSourceTLS:
* @source: pointer to host interface data for char devices
* @cfg: driver configuration
*
@@ -7478,19 +7478,18 @@ qemuDomainPrepareChardevSourceTLS(virDomainChrSourceDefPtr source,
}
-/* qemuProcessPrepareDomainChardevSource:
+/* qemuDomainPrepareChardevSource:
* @def: live domain definition
- * @driver: qemu driver
+ * @cfg: driver configuration
*
* Iterate through all devices that use virDomainChrSourceDefPtr as host
* interface part.
*/
void
qemuDomainPrepareChardevSource(virDomainDefPtr def,
- virQEMUDriverPtr driver)
+ virQEMUDriverConfigPtr cfg)
{
size_t i;
- virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
for (i = 0; i < def->nserials; i++)
qemuDomainPrepareChardevSourceTLS(def->serials[i]->source, cfg);
@@ -7515,8 +7514,6 @@ qemuDomainPrepareChardevSource(virDomainDefPtr def,
for (i = 0; i < def->nredirdevs; i++)
qemuDomainPrepareChardevSourceTLS(def->redirdevs[i]->source, cfg);
-
- virObjectUnref(cfg);
}
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index f93b09b..4b030ae 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -842,7 +842,7 @@ void qemuDomainPrepareChardevSourceTLS(virDomainChrSourceDefPtr source,
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
void qemuDomainPrepareChardevSource(virDomainDefPtr def,
- virQEMUDriverPtr driver)
+ virQEMUDriverConfigPtr cfg)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int qemuDomainPrepareShmemChardev(virDomainShmemDefPtr shmem)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 364c359..44df858 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5327,7 +5327,7 @@ qemuProcessPrepareDomain(virConnectPtr conn,
goto cleanup;
VIR_DEBUG("Prepare chardev source backends for TLS");
- qemuDomainPrepareChardevSource(vm->def, driver);
+ qemuDomainPrepareChardevSource(vm->def, cfg);
VIR_DEBUG("Add secrets to disks, hostdevs, and chardevs");
if (qemuDomainSecretPrepare(conn, driver, vm) < 0)
--
2.9.5
7 years, 2 months
[libvirt] external snapshots bug
by Khasan Khafizov
Suppose we have a disk with several external snapshots of it. This disk is
attached to some domain. I found that after destroying and starting the
domain the xml of attached disk doesn't contain all backingStore that it
has to.
Before the restart the part of domain xml that relates to attached disk
looks like this:
<disk type='file' device='disk'>
> <driver name='qemu' type='qcow2'/>
> <source file='...'/>
> <backingStore type='file' index='1'>
> <format type='qcow2'/> <!-- here is qcow2 -->
> <source file='...'/>
> <backingStore type='file' index='2'>
> <format type='qcow2'/>
> <source file='...'/>
> <backingStore type='file' index='3'>
> <format type='qcow2'/>
> <source file='...'/>
> <backingStore/>
> </backingStore>
> </backingStore>
> </backingStore>
> </disk>
And after the restart like this:
<disk type='file' device='disk'>
> <driver name='qemu' type='qcow2'/>
> <source file='...'/>
> <backingStore type='file' index='1'>
> <format type='raw'/> <!-- here is raw -->
> <source file='...'/>
> <backingStore/>
> </backingStore>
> </disk>
So, the difference in two xml not only in depth of backing stores but in
format type also.
The result of it is that you can't run blockcommit that will commit overlay
into base image if they don't have direct relations (if for example overlay
is child of child of base image). Virsh says it can't find base in chain (
exception
<https://github.com/libvirt/libvirt/blob/cdecfbed027ab242467580a897a636be8...>
).
Then I got that libvirt stops calling virStorageFileGetMetadataRecurse
<https://github.com/libvirt/libvirt/blob/ed8661a309c96e4a1573dc0ca2c76ea7f...>
function
after first call because it thinks that format of first backingStore of
disk is raw instead of qcow2. I solved it by adding to the qemu config
the following line:
> allow_disk_format_probing = 1
But in qemu config it was marked as secure hole.
Idea of fix is that we can try assume that backing store of qcow is qcow
insted of raw, but I really don't know what to do to implement this idea if
it at all possible
Thanks!
7 years, 2 months
[libvirt] [PATCH] domain: add limit description of parameter 'size' for blockPeek and memoryPeek
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
We had 'size' limits for virDomainMemoryPeek
and virDomainBlockPeek by macro
REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX and
REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX.
The descriptions of the two functions only emphasized
RPC buffer size.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/libvirt-domain.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index ca5a153..646ce72 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -5802,6 +5802,9 @@ virDomainMemoryStats(virDomainPtr dom, virDomainMemoryStatPtr stats,
* within the device or file. 'size' may be 0 to test if the
* call would succeed.
*
+ * 'size' should be <= 1048576(1M). Since v1.0.5, 'size' had been
+ * raised up to 4194304(4M).
+ *
* 'buffer' is the return buffer and must be at least 'size' bytes.
*
* NB. The remote driver imposes a 64K byte limit on 'size'.
@@ -5941,6 +5944,9 @@ virDomainBlockResize(virDomainPtr dom,
* 'buffer' is the return buffer and must be at least 'size' bytes.
* 'size' may be 0 to test if the call would succeed.
*
+ * 'size' should be <= 1048576(1M). Since v1.0.5, 'size' had been
+ * raised up to 4194304(4M).
+ *
* NB. The remote driver imposes a 64K byte limit on 'size'.
* For your program to be able to work reliably over a remote
* connection you should split large requests to <= 65536 bytes.
--
2.7.5
7 years, 2 months
[libvirt] [PATCH] qemu: blockcopy: Probe image format only with VIR_DOMAIN_BLOCK_COPY_REUSE_EXT
by Peter Krempa
Commit 703abf1d7 changed the logic so that we don't attempt to re-create
the image if it's a block device. This was done by modifying the
'reuse' variable. Unfortunately after modifying it one of the uses was
to infer whether we should probe the disk format. After changes in the
commit mentioned above we would attempt the probe if the target of the
copy is a block device and the format was not provided explicitly rather
than using the format of the disk.
Fix it by explicitly checking whether the user requested a reuse of the
disk rather than the modified boolean flag.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1490826
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 70cdc88e1..23a51359d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16988,7 +16988,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
goto endjob;
if (!mirror->format) {
- if (!reuse) {
+ if (!(flags & VIR_DOMAIN_BLOCK_COPY_REUSE_EXT)) {
mirror->format = disk->src->format;
} else {
/* If the user passed the REUSE_EXT flag, then either they
--
2.14.1
7 years, 2 months