[libvirt-users] Getting libvirt Error when setting IO tune read_bytes_sec value using libvirt API virDomainSetBlockIotune
by vikrant verma
Hi All,
I am setting the value for "read_bytes_sec" using the following API code
virDomainSetBlockIoTune(dom, "/mnt/tmpsdb/FileVM1", parainfoPtr, nparams,
2);
I am succesfully able to set this value and i can read it back using the API
virDomainGetBlockIoTune(dom,"/mnt/tmpsdb/FileVM1",parainfoPtr,&nparams,2);
But after setting this value when i shutdown my VM and start it again I am
getting following error -
ibvirtError: internal error Process exited while reading console log
output: qemu-system-x86_64: -drive
file=/mnt/tmpsdb/FileVM1,if=none,id=drive-ide0-1-1,format=raw,bps_rd=1048576:
Invalid parameter 'bps_rd'
Note - when i see dumpxml of the VM following lines are got added after
setting the iotunes for read_bytes_sec
<iotune>
<read_bytes_sec>1048576</read_bytes_sec>
</iotune>
Please help me. Also i wanted to know whether we can set block IO tune for
a VM using the above API. Is it same as the IO throttling provided by
cgroup?
11 years, 3 months
[libvirt-users] libvir: QEMU Driver error : internal error Cannot find suitable emulator for armv7l
by Clark Laughlin
Hello,
I am trying to run OpenStack (via devstack) on an Arndale board using Linaro's 13.04 release. I am getting a libvirt error that I was hoping someone could provide some more detail about:
libvir: QEMU Driver error : internal error Cannot find suitable emulator for armv7l
If this is coming from libvirt, what is it looking for for a suitable emulator? Or, is this something I need to search starting with QEMU?
Thank you in advance,
Clark L
11 years, 3 months
[libvirt-users] Pre-requisites to use Java bindings with QEMU
by Lior Vernia
Hello everyone,
I've been reading through the articles on the website trying to understand
what's needed to use the libvirt Java bindings with a QEMU hypervisor, but
still have some uncertainties/questions:
1. It is my understanding that libvirtd has to be running on the machine
hosting the hypervisor. Correct?
2. For libvirtd to communicate with QEMU, QEMU has to be installed on the
machine hosting the hypervisor. Correct? I guess what I'm really asking is
whether the libvirt QEMU "driver" includes the QEMU source code, or rather
communicates with pre-installed executables.
3. Assuming the answer to the two former questions is "yes", is there a way
to bypass libvirtd if the machine hosting the hypervisor is the same as the
one running the Java code? I'm asking because running libvirtd would
require privileged permissions, whereas QEMU itself can run with normal
user permissions. Is that a price I have to pay for the uniform interface
that libvirt presents?
Yours, Lior.
11 years, 3 months
[libvirt-users] Designing libvirt client
by arvind viswanathan
Hi,
I have a VMM application using a homegrown client for communicating with
hypervisor.
I am planning to migrate to libvirt because of the blocking nature of the
calls.
After going over the architecture, I would like to have a few doubts
clarified
1) Should my application be necessarily multi-threaded in order to make use
of the non-blocking calls in libvirt. [Are overlapping methods mainly used
by multithreaded clients].
2) I was wondering if there was any way to provide a callback along with
the methods to achieve non-blocking.[My application has event library so
it can receive events]
3) Is the libvirt RPC client multi-threaded. [i.e., does it internally use
multiple threads to dispatch requests to server and return response to the
application]
I can provide more information, if its not helpful.
Thanks
Arvind
11 years, 3 months
[libvirt-users] Error while compiling libvirt-1.0.5
by Javi Legido
Hi all.
I'm trying to compile libvirt-1.0.5 on a Debian 6.0, but I get an error
after "./configure" and then "make".
Info:
...
CCLD libvirt_parthelper
libvirt_parthelper-parthelper.o: In function `main':
/usr/local/src/libvirt-1.0.5/src/storage/parthelper.c:102: undefined
reference to `ped_device_get'
/usr/local/src/libvirt-1.0.5/src/storage/parthelper.c:116: undefined
reference to `ped_disk_new'
/usr/local/src/libvirt-1.0.5/src/storage/parthelper.c:122: undefined
reference to `ped_disk_next_partition'
/usr/local/src/libvirt-1.0.5/src/storage/parthelper.c:174: undefined
reference to `ped_disk_next_partition'
collect2: ld returned 1 exit status
make[3]: *** [libvirt_parthelper] Error 1
make[3]: Leaving directory `/usr/local/src/libvirt-1.0.5/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/src/libvirt-1.0.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/libvirt-1.0.5'
make: *** [all] Error 2
----
$ sudo dpkg -l | grep parted
ii libparted0-dev 2.3-5 The
GNU Parted disk partitioning library development files
ii libparted0debian1 2.3-5 The
GNU Parted disk partitioning shared library
ii libparted0debian1-dbg 2.3-5 The
GNU Parted disk partitioning library debug development files
ii parted 2.3-5 The
GNU Parted disk partition resizing program
Can somebody please help?
Thanks
11 years, 3 months
[libvirt-users] Unable to start LXC on Gentoo w/ libvirt 1.0.4 or 1.0.5. 1.0.3 works
by Dennis Jenkins
Hello.
I use libvirtd on my Gentoo development system to manage both QEMU and
LXC. When 1.0.3 came out, I updated to it from 1.0.3-r2, but 1.0.4 failed
to start my LXC containers. I did not research the issue at the time, so I
revert to 1.0.3-r2. Today I updated to 1.0.5 and my LXC containers still
fail to start. I have not changed my domain XML at all.
I am looking for suggestions on what to try to resolve the problem.
Maybe I'm missing a package or have something mus-configured for
libvirt-1.0.5. btw, A month ago I updates to the most recent "udev"
(udev-200). This required me to rename all of my network interfaces. My
QEMU and LXC containers continued to work. All of my VMs use bridged
networking on "br0" or "br1". Those virtual interfaces are not bridged to
any physical NIC. They exist only inside my host's kernel. I have
extensive iptables rules to filter traffic between my network segments
(physical + virtual).
TL;DR: this was burried in a log file: " error :
lxcContainerMountFSDevPTS:808 : Failed to mount
/.oldroot//var/run/libvirt/lxc/dwj-lnx-dev.devpts on /dev/pts: No such file
or directory". But that directory DOES exist in the container:
ostara ~ # ls -ld /vm/lxc/dwj-lnx-dev/dev/pts/
drwxr-xr-x 2 root root 4096 Apr 27 2011 /vm/lxc/dwj-lnx-dev/dev/pts/
If I revert to libvirt-1.0.3-r2, I can boot my LXC containers again.
But if possible, I'd like to keep my system current. I've ran the usual
Gentoo tools to verify that all package dependencies are installed,
revdep-rebuild reports that all ELFs link against the proper shared objects.
ostara ~ # virsh --version
1.0.5
ostara ~ # equery l libvirt
* Searching for libvirt ...
[IP-] [ ] app-emulation/libvirt-1.0.5:0
ostara ~ # equery -q u libvirt | xargs echo
-audit -avahi +caps -firewalld -fuse -iscsi +libvirtd +lvm +lxc +macvtap
+nfs +nls -numa -openvz -parted +pcap -phyp -policykit -python +qemu -rbd
+sasl +udev +uml +vepa +virt-network -virtualbox -xen
ostara ~ # virsh -c lxc:/// list --all
Id Name State
----------------------------------------------------
- dwj-lnx-dev shut off
- vm1 shut off
ostara ~ # virsh -c lxc:/// start dwj-lnx-dev
error: Failed to start domain dwj-lnx-dev
error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux
container=lxc-libvirt container_uuid=fbcd8c3a-9939-12b4-727d-5d3526bc448f
LIBVIRT_LXC_UUID=fbcd8c3a-9939-12b4-727d-5d3526bc448f
LIBVIRT_LXC_NAME=dwj-lnx-dev /sbin/init
error receiving signal from container: Input/output error
ostara ~ # tail -n 10 /var/log/libvirt/libvirtd.log
2013-05-14 13:03:47.549+0000: 22352: info : libvirt version: 1.0.5
2013-05-14 13:03:47.549+0000: 22352: error : virDBusGetSystemBus:86 :
internal error Unable to get DBus system bus connection: Failed to connect
to socket /var/run/dbus/system_bus_socket: No such file or directory
2013-05-14 13:03:47.549+0000: 22352: warning :
ebiptablesDriverInitCLITools:4233 : Could not find 'ip6tables' executable
2013-05-14 13:04:21.629+0000: 22341: error : virNetSocketReadWire:1362 :
Cannot recv data: Connection reset by peer
2013-05-14 13:04:21.729+0000: 22345: error : virLXCProcessStart:1285 :
internal error guest failed to start: PATH=/bin:/sbin TERM=linux
container=lxc-libvirt container_uuid=fbcd8c3a-9939-12b4-727d-5d3526bc448f
LIBVIRT_LXC_UUID=fbcd8c3a-9939-12b4-727d-5d3526bc448f
LIBVIRT_LXC_NAME=dwj-lnx-dev /sbin/init
error receiving signal from container: Input/output error
2013-05-14 13:04:21.731+0000: 22345: error : virNetDevSetOnline:544 :
Cannot get interface flags on 'veth0': No such device
2013-05-14 13:04:21.778+0000: 22345: error : virCommandWait:2353 : internal
error Child process (ip link del veth0) unexpected exit status 1: Cannot
find device "veth0"
2013-05-14 13:04:21.917+0000: 22345: error : virCommandWait:2353 : internal
error Child process (ip link del veth1) unexpected exit status 1: Cannot
find device "veth1"
ostara ~ # tail -n 10 /var/log/libvirt/lxc/dwj-lnx-dev.log
2013-05-14 13:04:20.894+0000: starting up
PATH=/bin:/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3:/usr/x86_64-pc-linux-gnu/i686-pc-mingw32/gcc-bin/4.7.2
LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc
--name dwj-lnx-dev --console 22 --security=none --handshake 25 --background
--veth veth1
PATH=/bin:/sbin TERM=linux container=lxc-libvirt
container_uuid=fbcd8c3a-9939-12b4-727d-5d3526bc448f
LIBVIRT_LXC_UUID=fbcd8c3a-9939-12b4-727d-5d3526bc448f
LIBVIRT_LXC_NAME=dwj-lnx-dev /sbin/init
2013-05-14 13:04:21.562+0000: 1: info : libvirt version: 1.0.5
2013-05-14 13:04:21.562+0000: 1: error : lxcContainerMountFSDevPTS:808 :
Failed to mount /.oldroot//var/run/libvirt/lxc/dwj-lnx-dev.devpts on
/dev/pts: No such file or directory
2013-05-14 13:04:21.562+0000: 22562: info : libvirt version: 1.0.5
2013-05-14 13:04:21.562+0000: 22562: error : virLXCControllerRun:1481 :
error receiving signal from container: Input/output error
error receiving signal from container: Input/output error
2013-05-14 13:04:21.628+0000: 22562: error : virCommandWait:2353 : internal
error Child process (ip link del veth1) unexpected exit status 1: Cannot
find device "veth1"
ostara ~ # virsh -c lxc:/// dumpxml dwj-lnx-dev
<domain type='lxc'>
<name>dwj-lnx-dev</name>
<uuid>fbcd8c3a-9939-12b4-727d-5d3526bc448f</uuid>
<memory unit='KiB'>500000</memory>
<currentMemory unit='KiB'>500000</currentMemory>
<vcpu placement='static'>2</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/vm/lxc/dwj-lnx-dev'/>
<target dir='/'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/usr/portage'/>
<target dir='/usr/portage'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/usr/src'/>
<target dir='/usr/src'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/home'/>
<target dir='/home'/>
</filesystem>
<interface type='bridge'>
<mac address='82:00:00:00:01:00'/>
<source bridge='br0'/>
</interface>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
</domain>
ostara ~ # ifconfig -a | egrep -v "(RX|TX) (packets|errors)"
br0: flags=4355<UP,BROADCAST,PROMISC,MULTICAST> mtu 1500
inet 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255
ether 00:00:00:00:00:00 txqueuelen 0 (Ethernet)
br1: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
inet 192.168.3.1 netmask 255.255.255.0 broadcast 192.168.3.255
ether 06:9b:23:fb:14:5f txqueuelen 0 (Ethernet)
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255
ether bc:ae:c5:16:6f:3b txqueuelen 1000 (Ethernet)
device interrupt 18 memory 0xfade0000-fae00000
enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xx.xx.xx.xx netmask 255.255.252.0 broadcast xx.xx.xx.xx
ether bc:ae:c5:16:70:3f txqueuelen 1000 (Ethernet)
device interrupt 19 memory 0xfaee0000-faf00000
enp6s2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.4.1 netmask 255.255.255.0 broadcast 192.168.4.255
ether 00:03:6d:14:78:30 txqueuelen 1000 (Ethernet)
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 0 (Local Loopback)
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether c2:ff:56:b7:a7:cd txqueuelen 0 (Ethernet)
11 years, 3 months
[libvirt-users] Libvirt 1.0.5 with Openvswitch 1.11.90: unable to add bridge br0 port vnet0 operation not supported
by Christopher Paggen (cpaggen)
Howdy,
Running the most recent OVS and libvirt I'm running into the following error message with virt-install:
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl -V
ovs-vsctl (Open vSwitch) 1.11.90
Compiled May 6 2013 22:37:22
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#>
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0
Starting install...
ERROR Unable to add bridge br0 port vnet0: Operation not supported
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start DSL2
otherwise, please restart your installation.
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl del-port br0 vnet0
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> libvirtd --version
libvirtd (libvirt) 1.0.5
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virsh --version
1.0.5
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:br0 --vnc --os-type=linux --cdrom /dev/sr0
Starting install...
ERROR Unable to add bridge br0 port vnet0: Operation not supported
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start DSL2
otherwise, please restart your installation.
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#>
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl show
b81788a2-f45d-4fad-aad2-f423e6e70bad
Bridge "br0"
Port "eth1"
Interface "eth1"
Port "br0"
Interface "br0"
type: internal
Port "tap0"
Interface "tap0"
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5>
Even if I create a new OVS switch I get the same result:
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> ovs-vsctl add-br b1
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#> virt-install --connect qemu:///system --name DSL2 --ram 1024 --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none --network=bridge:b1 --vnc --os-type=linux --cdrom /dev/sr0
Starting install...
ERROR Unable to add bridge b1 port vnet0: Operation not supported
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start DSL2
otherwise, please restart your installation.
root@qemu-kvm:~/libvirt-1.0.5#<mailto:root@qemu-kvm:~/libvirt-1.0.5#>
Nothing in the openvswitch log file (OVS itself works fine, I can start VMs with the kvm command line).
Any clues? I'm not too sure how to trace libvirt calls to OVS (according to the release notes, versions 1.0+ of libvirtd should work with OVS. Note: I am not using brcompat, I believe it's obsolete in the OVS version I'm running).
Thanks,
Chris.
11 years, 4 months