mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
conf: Use correct type for balloon stats period
We're parsing memballoon status period as unsigned int, but when we're
trying to set it, both we and qemu use signed int. That means large
values will get wrapped around to negative one resulting in error.
Basically the same problem as commit e3a7b874 was dealing with when
updating live domain.
QEMU changed the accepted value to int64 in commit 1f9296b5, but even
values as INT_MAX don't make sense since the value passed means seconds.
Hence adding capability flag for this change isn't worth it.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140958
Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
+11
-12
@@ -5618,18 +5618,17 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<dt><code>period</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The optional <code>period</code> allows the QEMU virtio memory
|
||||
balloon driver to provide statistics through the <code>virsh
|
||||
dommemstat [domain]</code> command. By default, collection is
|
||||
not enabled. In order to enable, use the <code>virsh dommemstat
|
||||
[domain] --period [number]</code> command or <code>virsh edit</code>
|
||||
command to add the option to the XML definition.
|
||||
The <code>virsh dommemstat</code> will accept the options
|
||||
<code>--live</code>, <code>--current</code>, or <code>--config</code>.
|
||||
If an option is not provided, the change for a running domain will
|
||||
only be made to the active guest.
|
||||
If the QEMU driver is not at the right
|
||||
revision, the attempt to set the period will fail.
|
||||
The optional <code>period</code> allows the QEMU virtio memory balloon
|
||||
driver to provide statistics through the <code>virsh dommemstat
|
||||
[domain]</code> command. By default, collection is not enabled. In
|
||||
order to enable, use the <code>virsh dommemstat [domain] --period
|
||||
[number]</code> command or <code>virsh edit</code> command to add the
|
||||
option to the XML definition. The <code>virsh dommemstat</code> will
|
||||
accept the options <code>--live</code>, <code>--current</code>,
|
||||
or <code>--config</code>. If an option is not provided, the change
|
||||
for a running domain will only be made to the active guest. If the
|
||||
QEMU driver is not at the right revision, the attempt to set the
|
||||
period will fail. Large values (e.g. many years) might be ignored.
|
||||
<span class='since'>Since 1.1.1, requires QEMU 1.5</span>
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
Reference in New Issue
Block a user