[libvirt-users] How to configure dnsmasq using libvirt?
by Don Zickus
Hi,
I am working on a project, beaker, where they use anisble scripts to setup
an environment with 4 virtual machines. One acts as a server to the other
3.
We noticed after the network was setup, the domainname is not properly
reported with using the 'hostname' command. We believe that dnsmasq was not
correctly configured.
Is there a recommended way to setup dnsmasq using libvirt and ansible?
Thanks!
Cheers,
Don
ps - please cc me as I am not subscribed to the list
7 years, 1 month
[libvirt-users] Compile libvirt on OSX 10.12
by Homie Pawlowski
I'm having issues with compiling libvirt on OSX 10.12
~/Development/github/libvirt/ [master] make
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in .
Making all in gnulib/lib
/Library/Developer/CommandLineTools/usr/bin/make all-am
make[3]: Nothing to be done for `all-am'.
Making all in include/libvirt
make[2]: Nothing to be done for `all'.
Making all in src
/Library/Developer/CommandLineTools/usr/bin/make all-am
CC util/libvirt_util_la-virthread.lo
util/virthread.c:272:17: error: 'syscall' is deprecated: first deprecated
in macOS 10.12 - syscall(2) is unsupported;
please switch to a supported interface. For SYS_kdebug_trace use
kdebug_signpost().
[-Werror,-Wdeprecated-declarations]
pid_t tid = syscall(SYS_gettid);
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked
deprecated here
int syscall(int, ...);
^
1 error generated.
make[3]: *** [util/libvirt_util_la-virthread.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
Anyone have any suggestion on how to do so?
Thanks,
--
HOMERO PAWLOWSKI
CLOUD CONSULTANT
Red Hat
<https://www.redhat.com/>
140 Broadway 24th Floor
New York, NY 10005
hpawlows(a)redhat.com
<https://red.ht/sig>
7 years, 1 month
[libvirt-users] DHCP logging settings
by Shannon
I find that libvirt clogs up syslog with trivial DHCP notifications. I
know how to configure alternate logging with dnsmasq directly via
'log-facility' and/or 'quiet-dhcp' options but the XML format used by
libvirt appears to have no equivalent options. Is there a way to reduce
syslog spam from libvirt without switching to a system-wide dnsmasq service?
7 years, 1 month
[libvirt-users] network configuration for guest specific dns-servers
by David Ayers
Hello,
similar to how one can configure guest specific IP addresses via mac
addresses:
<ip address="192.168.122.1" netmask="255.255.255.0" localPtr="yes">
<dhcp>
<range start="192.168.122.100" end="192.168.122.254"/>
<host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10"/>
<host mac="00:16:3e:3e:a9:1a" name="bar.example.com" ip="192.168.122.11"/>
</dhcp>
</ip>
We would like to configure guest specific dns-servers as would be done
with the --dhcp-option of dnsmasq. I was expecting to be able to do
something like:
<host mac="00:16:3e:77:e2:ed"
name="foo.example.com"
ip="192.168.122.10"
dhcp-option="dns-server,127.0.0.1" />
but it seems that this isn't the correct approach, as virsh net-edit
default removes that attribute definition.
Could someone point me to the correct documentation?
Thank you!
David Ayers
--
David Ayers - Team Austria
Free Software Foundation Europe (FSFE) [] (http://www.fsfe.org)
Join the Fellowship of FSFE! [][][] (https://fsfe.org/join)
Your donation powers our work! || (http://fsfe.org/donate)
7 years, 1 month
[libvirt-users] external snapshot is missing object secrets
by Markus Schade
Hello,
I have virtual machines running with a ceph storage backend.
When creating an external qcow2 snapshot with a libvirt version without
support for the new object secret passing, the backing file info would
list the ceph secret in plain,e.g.
# virsh snapshot-create-as vm-123 --no-metadata --disk-only --diskspec
sda,file=/var/lib/libvirt/qemu/snapshot/vm-123-wrapper.qcow2
# qemu-img info /var/lib/libvirt/qemu/snapshot/vm-123-wrapper.qcow2
...
backing file:
rbd:vms_pool0/disk-123:id=libvirt:key=SECRET:auth_supported=cephx\;none:mon_host=192.168.1.1\:6789\;192.168.1.11\:6789\;192.168.1.21\:6789
While this is problematic from a security perspective (and one of the
reasons for the new method), it enabled starting the virtual machine
again in case it died or got powered off.
With the newer libvirt object secret passing the backing file
of the qcow image only references the secret id.
# qemu-img info /var/lib/libvirt/qemu/snapshot/vm-123-wrapper.qcow2
...
backing file: json:{"driver": "raw", "file": {"password-secret":
"scsi0-0-0-0-secret0", "pool": "vms_pool", "image": "disk-123",
"driver": "rbd", "user": "libvirt", "=keyvalue-pairs":
"[\"auth_supported\", \"cephx;none\", \"mon_host\",
\"192.168.1.1:6789;192.168.1.11:6789;192.168.1.21:6789\"]"}}
This is fine as long as the virtual machine is running and with
qemu-2.10 it is even possible to block-commit this external snapshot
(Yeah!).
However, should the VM die or be powered off, it is now longer possible
to start the domain or at least recover the data:
Could not open backing file: No secret with id 'scsi0-0-0-0-secret0'
I guess this problems happens with any disk type that is accessed with
object secrets, which is why I would consider this a bug.
The question is, should/can this be fixed in libvirt or qemu?
I think libvirt should create the snapshot file with the object secret
stored in a persistent file (and reference this file in the backing file
definition)
Best regards,
Markus
7 years, 1 month
[libvirt-users] Regarding Libvirt Java Bindings
by Kartik Vaishnav
I am developing a Java Application using Libvirt. I found that the Java
Bindings are not in active development.
I need to obtain the IP Address of the Domain. In C, it may relate to
virDomainInterfaceAddresses. Is there any way to implement it in Java.
7 years, 1 month
[libvirt-users] Failed building wheel for libvirt-python
by Silvia Fichera
Hi all,
I'm installing Openstack using devstack netwon branch in my PC with Ubuntu
16.04 and I have this error.
Could someone of you help me please?
Thanks
Collecting libvirt-python===2.1.0 (from -c
/opt/stack/requirements/upper-constraints.txt (line 169))
Using cached libvirt-python-2.1.0.tar.gz
Building wheels for collected packages: libvirt-python
Running setup.py bdist_wheel for libvirt-python ... error
Complete output from command /usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-g9ai0P/libvirt-python/setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d
/tmp/tmpsHlvcmpip-wheel- --python-tag cp27:
running bdist_wheel
running build
/usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/bin/python generator.py libvirt
/usr/share/libvirt/api/libvirt-api.xml
Found 415 functions in /usr/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 344 wrapper functions
Missing type converters:
virConnectNodeDeviceEventGenericCallback:1
ERROR: failed virConnectNodeDeviceEventRegisterAny
error: command '/usr/bin/python' failed with exit status 1
----------------------------------------
Failed building wheel for libvirt-python
Running setup.py clean for libvirt-python
Failed to build libvirt-python
Installing collected packages: libvirt-python
Running setup.py install for libvirt-python ... error
Complete output from command /usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-g9ai0P/libvirt-python/setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
/tmp/pip-0i4vHi-record/install-record.txt
--single-version-externally-managed --compile:
running install
running build
/usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/bin/python generator.py libvirt
/usr/share/libvirt/api/libvirt-api.xml
Found 415 functions in /usr/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 344 wrapper functions
Missing type converters:
virConnectNodeDeviceEventGenericCallback:1
ERROR: failed virConnectNodeDeviceEventRegisterAny
error: command '/usr/bin/python' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-g9ai0P/libvirt-python/setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
/tmp/pip-0i4vHi-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/tmp/pip-build-g9ai0P/libvirt-python/
+inc/python:pip_install:1 exit_trap
+./stack.sh:exit_trap:494 local r=1
++./stack.sh:exit_trap:495 jobs -p
+./stack.sh:exit_trap:495 jobs=
+./stack.sh:exit_trap:498 [[ -n '' ]]
+./stack.sh:exit_trap:504 kill_spinner
+./stack.sh:kill_spinner:390 '[' '!' -z '' ']'
+./stack.sh:exit_trap:506 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:507 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:508 generate-subunit 1504797369 129
fail
+./stack.sh:exit_trap:509 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:512
/home/onossona/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2017-09-07-151818.txt for
details
+./stack.sh:exit_trap:518 exit 1
--
Silvia Fichera
7 years, 1 month