[libvirt] [PATCH 0/2] improve auto complete in virsh
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
Chen Hanxiao (2):
[libvirt]virsh: introduce member exclude_option in vshCmdOptDef and
improve auto complete with it
[libvirt]virsh: set --shareable and --mode's new member:
exclude_option
tools/virsh-domain.c | 6 ++++--
tools/virsh.c | 8 ++++++++
tools/virsh.h | 1 +
3 files changed, 13 insertions(+), 2 deletions(-)
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH]doc: fix a typo in formatdomain
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
s/no/not
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
docs/formatdomain.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8ad755b..aa90701 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3163,7 +3163,7 @@
parameters in its <code><parameters></code> element -
an <code>interfaceid</code> which is a standard uuid used to
uniquely identify this particular interface to Open vSwitch (if
- you do no specify one, a random interfaceid will be generated
+ you do not specify one, a random interfaceid will be generated
for you when you first define the interface), and an
optional <code>profileid</code> which is sent to Open vSwitch as
the interfaces "port-profile".
--
1.8.2.1
11 years, 6 months
[libvirt] [PATCH 0/3] Add complete blkiotune support for per-device with blkio cgroup
by Guan Qiang
From: Guan Qiang <hzguanqiang(a)corp.netease.com>
The patches add a complete blkiotune support per-device with blkio cgroup
for both lxc or qemu driver, by extending the existed 'domainSetBlkioParameters'
and 'domainGetBlkioParameters' interface.
Beside device weight, read/write bps and iops throttle can be set per-device
with these patches.
Virsh command 'blkiotune' is extended to support the above function too.
Guan Qiang (3):
qemu: add blkiotune support for device iops and bps throttle setting
lxc: add blkiotune support for per device
blkiotune: add virsh support for blkiotune interface
docs/formatdomain.html.in | 8 +
docs/schemas/domaincommon.rng | 28 +-
include/libvirt/libvirt.h.in | 40 ++
src/conf/domain_conf.c | 115 ++-
src/conf/domain_conf.h | 16 +-
src/libvirt_private.syms | 4 +-
src/lxc/lxc_cgroup.c | 9 +-
src/lxc/lxc_driver.c | 743 +++++++++++++++++++-
src/qemu/qemu_cgroup.c | 10 +-
src/qemu/qemu_driver.c | 579 +++++++++++++--
src/util/vircgroup.c | 79 ++-
src/util/vircgroup.h | 8 +-
.../qemuxml2argv-blkiotune-device.xml | 4 +
tools/virsh-domain.c | 64 ++
tools/virsh.pod | 32 +-
15 files changed, 1614 insertions(+), 125 deletions(-)
--
1.7.9.5
11 years, 6 months
Re: [libvirt] [Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE
by Eric Blake
On 10/22/2013 04:25 AM, Lei Li wrote:
> Introduce new RanState RAN_STATE_FLIPPING_MIGRATE and
> add it to runstate_needs_reset().
>
> Signed-off-by: Lei Li <lilei(a)linux.vnet.ibm.com>
> ---
> qapi-schema.json | 11 +++++++----
> vl.c | 12 +++++++++++-
> 2 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 523a5b2..8178d0c 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -176,12 +176,15 @@
> # @watchdog: the watchdog action is configured to pause and has been triggered
> #
> # @guest-panicked: guest has been panicked as a result of guest OS panic
> +#
> +# @flipping-migrate: guest is paused to start unix_page_flipping migration
> +# process
We probably ought to enhance the docs to mention '(since 1.8)' for this
field (and likewise for other enum values added after the original
introduction of the enum).
Last time we added a new user-visible runstate, it broke migration with
older libvirt versions that weren't prepared to see the new state (hmm,
I need to check if libvirt has fixed that in the meantime; adding a
cc...). Paolo's advice at the time was that it is okay to require a new
libvirt when using a new qemu, and that libvirt should be taught to
treat all unknown RunState as if they were 'running'; although for this
particular addition it might be nicer to have libvirt lump 'inmigrate'
and 'flipping-migrate' to the same usage.
> ##
> { 'enum': 'RunState',
> - 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
> - 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
> - 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
> - 'guest-panicked' ] }
> + 'data': [ 'debug', 'flipping-migrate', 'inmigrate', 'internal-error',
> + 'io-error', 'paused', 'postmigrate', 'prelaunch', 'finish-migrate',
> + 'restore-vm', 'running', 'save-vm', 'shutdown', 'suspended',
> + 'watchdog', 'guest-panicked' ] }
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
11 years, 6 months
Re: [libvirt] [Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE
by Eric Blake
On 10/22/2013 07:28 AM, Lei Li wrote:
>>> # @guest-panicked: guest has been panicked as a result of guest OS
>>> panic
>>> +#
>>> +# @flipping-migrate: guest is paused to start unix_page_flipping
>>> migration
>>> +# process
>> We probably ought to enhance the docs to mention '(since 1.8)' for this
>> field (and likewise for other enum values added after the original
>> introduction of the enum).
>
> Hi Eric,
>
> Sure, will do.
>
> BTW, I was hoping this feature could be accepted and merged to QEMU 1.7
> release.
http://wiki.qemu.org/Planning/1.7
Soft freeze has already happened, so it's up to the maintainers whether
there is still time to be adding this feature in 1.7 - but yes, that
would affect the tag you list in your docs.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
11 years, 6 months
[libvirt] [PATCH] Avoid Coverity DEADCODE warning
by John Ferlan
Commit '922b7fda' resulted in two DEADCODE warnings from Coverity in
remoteDispatchAuthPolkit and virAccessDriverPolkitFormatProcess.
Commit '604ae657' modified the daemon.c code to remove the deadcode
issue, but did not do so for viracessdriverpolkit.c. This just mimics
the same changes
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/access/viraccessdriverpolkit.c | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/access/viraccessdriverpolkit.c b/src/access/viraccessdriverpolkit.c
index ff82583..b9907ba 100644
--- a/src/access/viraccessdriverpolkit.c
+++ b/src/access/viraccessdriverpolkit.c
@@ -76,8 +76,9 @@ virAccessDriverPolkitFormatProcess(const char *actionid)
const char *callerTime = NULL;
const char *callerUid = NULL;
char *ret = NULL;
- bool supportsuid = false;
- static bool polkitInsecureWarned;
+#ifndef PKCHECK_SUPPORTS_UID
+ static bool polkitInsecureWarned = false;
+#endif
if (!identity) {
virAccessError(VIR_ERR_ACCESS_DENIED,
@@ -109,19 +110,17 @@ virAccessDriverPolkitFormatProcess(const char *actionid)
}
#ifdef PKCHECK_SUPPORTS_UID
- supportsuid = true;
-#endif
- if (supportsuid) {
- if (virAsprintf(&ret, "%s,%s,%s", callerPid, callerTime, callerUid) < 0)
- goto cleanup;
- } else {
- if (!polkitInsecureWarned) {
- VIR_WARN("No support for caller UID with pkcheck. This deployment is known to be insecure.");
- polkitInsecureWarned = true;
- }
- if (virAsprintf(&ret, "%s,%s", callerPid, callerTime) < 0)
- goto cleanup;
+ if (virAsprintf(&ret, "%s,%s,%s", callerPid, callerTime, callerUid) < 0)
+ goto cleanup;
+#else
+ if (!polkitInsecureWarned) {
+ VIR_WARN("No support for caller UID with pkcheck. "
+ "This deployment is known to be insecure.");
+ polkitInsecureWarned = true;
}
+ if (virAsprintf(&ret, "%s,%s", callerPid, callerTime) < 0)
+ goto cleanup;
+#endif
cleanup:
virObjectUnref(identity);
--
1.8.3.1
11 years, 6 months
[libvirt] [PATCH] libxl: Fix possible invalid read
by Martin Kletzander
According to the following valgrind output, there seems to be a
invalid limit for the iterator (captured on Fedora 19):
==3945== Invalid read of size 1
==3945== at 0x1E1FA410: libxlVmStart (libxl_driver.c:475)
==3945== by 0x1E1FAD9A: libxlDomainCreateWithFlags (libxl_driver.c:2633)
==3945== by 0x5187D46: virDomainCreate (libvirt.c:9439)
==3945== by 0x13BAA6: remoteDispatchDomainCreateHelper (remote_dispatch.h:2910)
==3945== by 0x51DE5B9: virNetServerProgramDispatch (virnetserverprogram.c:435)
==3945== by 0x51D93E7: virNetServerHandleJob (virnetserver.c:165)
==3945== by 0x50F5BF4: virThreadPoolWorker (virthreadpool.c:144)
==3945== by 0x50F5670: virThreadHelper (virthreadpthread.c:161)
==3945== by 0x8046C52: start_thread (pthread_create.c:308)
==3945== by 0x8758E1C: clone (clone.S:113)
==3945== Address 0x23424d81 is 0 bytes after a block of size 1 alloc'd
==3945== at 0x4A08121: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3945== by 0x50B1F8C: virAllocN (viralloc.c:189)
==3945== by 0x1E1FA3CA: libxlVmStart (libxl_driver.c:468)
==3945== by 0x1E1FAD9A: libxlDomainCreateWithFlags (libxl_driver.c:2633)
==3945== by 0x5187D46: virDomainCreate (libvirt.c:9439)
==3945== by 0x13BAA6: remoteDispatchDomainCreateHelper (remote_dispatch.h:2910)
==3945== by 0x51DE5B9: virNetServerProgramDispatch (virnetserverprogram.c:435)
==3945== by 0x51D93E7: virNetServerHandleJob (virnetserver.c:165)
==3945== by 0x50F5BF4: virThreadPoolWorker (virthreadpool.c:144)
==3945== by 0x50F5670: virThreadHelper (virthreadpthread.c:161)
==3945== by 0x8046C52: start_thread (pthread_create.c:308)
==3945== by 0x8758E1C: clone (clone.S:113)
==3945==
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1013045
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/libxl/libxl_driver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index e2a6d44..4928695 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -454,6 +454,7 @@ libxlDomainSetVcpuAffinities(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
size_t cpumaplen;
int vcpu;
size_t i;
+ size_t limit;
int ret = -1;
if (libxlDoNodeGetInfo(driver, &nodeinfo) < 0)
@@ -470,7 +471,8 @@ libxlDomainSetVcpuAffinities(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
cpumask = (uint8_t*) def->cputune.vcpupin[vcpu]->cpumask;
- for (i = 0; i < VIR_DOMAIN_CPUMASK_LEN; ++i) {
+ limit = MIN(VIR_DOMAIN_CPUMASK_LEN, cpumaplen);
+ for (i = 0; i < limit; ++i) {
if (cpumask[i])
VIR_USE_CPU(cpumap, i);
}
--
1.8.4
11 years, 6 months
[libvirt] failed to write to disk on vm with lvm pool
by Vasiliy Tolstov
Hi all. Today i can't mkfs.ext3 inside virual machine while install it
(ubuntu 13.04).
Why this happening? On other node i see that
virSecurityDACSetOwnership sets perms on /dev/vg/xxx and /dev/dm-xxx,
but in this host this not happening.
Libvirt logs:
2013-10-24 07:50:15.639+0000: 3700: info : virNetDevProbeVnetHdr:94 :
Enabling IFF_VNET_HDR
2013-10-24 07:50:15.782+0000: 3700: info :
virSecurityDACSetOwnership:271 : Setting DAC user and group on
'/dev/vg/402' to '108:102'
2013-10-24 07:50:15.783+0000: 3700: info :
virSecurityDACSetOwnership:271 : Setting DAC user and group on
'/srv/ubuntu/13.04/kernel' to '108:102'
2013-10-24 07:50:15.783+0000: 3700: info :
virSecurityDACSetOwnership:271 : Setting DAC user and group on
'/srv/ubuntu/13.04/initrd' to '108:102'
2013-10-24 07:50:16.386+0000: 3700: warning : virCgroupMoveTask:887 :
no vm cgroup in controller 3
2013-10-24 07:50:16.386+0000: 3700: warning : virCgroupMoveTask:887 :
no vm cgroup in controller 4
2013-10-24 07:50:16.386+0000: 3700: warning : virCgroupMoveTask:887 :
no vm cgroup in controller 6
domainxml disk:
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'
ioeventfd='on' event_idx='off'/>
<source dev='/dev/vg/402'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</disk>
pool xml
<pool type='logical'>
<name>default</name>
<uuid>2a135e38-dd92-1b4d-bd82-3aafd369d207</uuid>
<capacity unit='bytes'>3000454086656</capacity>
<allocation unit='bytes'>386547056640</allocation>
<available unit='bytes'>2613907030016</available>
<source>
<device path='/dev/bcache0'/>
<name>vg</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/vg</path>
<permissions>
<mode>0711</mode>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</pool>
qemu.log:
2013-10-24 07:50:15.777+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -name 402 -S -M pc-1.0
-enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -uuid
0ee50ad7-8c2b-57e9-5bee-0000571d77c1 -no-user-config -nodefaults
-chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/402.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-reboot -no-shutdown -kernel /srv/ubuntu/13.04/kernel -initrd
/srv/ubuntu/13.04/initrd -append ks=file:///ks.cfg -device
piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive
file=/dev/vg/402,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
-device virtio-blk-pci,ioeventfd=on,event_idx=off,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device
ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
tap,fd=22,id=hostnet0,vhost=on,vhostfd=23 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:00:01:55,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
spicevmc,id=charchannel0,name=vdagent -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
-chardev socket,id=charchannel1,path=/var/lib/libvirt/qemu/402.agent,server,nowait
-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.mighost.agent.0
-vnc 0.0.0.0:0,password -vga std -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
char device redirected to /dev/pts/0 (label charserial0)
--
Vasiliy Tolstov,
e-mail: v.tolstov(a)selfip.ru
jabber: vase(a)selfip.ru
11 years, 6 months