[libvirt-users] ceph rbd pool and libvirt manageability (virt-install)
by Jelle de Jong
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello everybody,
I created a rbd pool and activated it, but I can't seem to create
volumes in it with virsh or virt-install?
# virsh pool-dumpxml myrbdpool
<pool type='rbd'>
<name>myrbdpool</name>
<uuid>2d786f7a-2df3-4d79-ae60-1535bcf1c6b5</uuid>
<capacity unit='bytes'>6997998301184</capacity>
<allocation unit='bytes'>10309227031</allocation>
<available unit='bytes'>6977204658176</available>
<source>
<host name='ceph01.powercraft.nl' port='6789'/>
<host name='ceph02.powercraft.nl' port='6789'/>
<host name='ceph03.powercraft.nl' port='6789'/>
<name>libvirt-pool</name>
<auth type='ceph' username='libvirt'>
<secret uuid='029a334e-ed57-4293-bb99-ffafa8867122'/>
</auth>
</source>
</pool>
# virt-install --version
1.0.1
# virsh --version
1.2.9
I ended using virsh edit ceph-test.powercraft.nl and making creating
the disk manually.
<disk type='network' device='disk'>
<auth username='libvirt'>
<secret type='ceph' uuid='029a334e-ed57-4293-bb99-ffafa8867122'/>
</auth>
<source protocol='rbd' name='libvirt-pool/kvm01-storage'>
<host name='ceph01.powercraft.nl' port='6789'/>
<host name='ceph02.powercraft.nl' port='6789'/>
<host name='ceph03.powercraft.nl' port='6789'/>
</source>
<target dev='vdc' bus='virtio'/>
</disk>
I use virt-install a lot to define, import and undefine domains, how
can I use virt-install to manage my rdb disks?
Kind regards,
Jelle de Jong
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iJwEAQECAAYFAlV1xlQACgkQ1WclBW9j5HkbPQP+PjNrzvlqysslOp2Yk7wH4Mxy
2sh2dn96G0KOAHEeEn3BN6IWlnD1TADZbHdpTtMwkdv48Xwn0sP1s+3QDM4pb3gP
n+z+dVxS8FouDIy/eiso3IBCj3g4TWbEX8ZHqs3jKqe0lZgAXBzB9xYSUowcEBrZ
ddkPbr8p8ozWyOG+9V8=
=lkK7
-----END PGP SIGNATURE-----
6 years, 3 months
[libvirt-users] virRandomBits - not very random
by Brian Rak
I just ran into an issue where I had about 30 guests get duplicate mac
addresses assigned. These were scattered across 30 different machines.
Some debugging revealed that:
1) All the host machines were restarted within a couple seconds of each
other
2) All the host machines had fairly similar libvirtd pids (within ~100
PIDs of each other)
3) Libvirt seeds the RNG using 'time(NULL) ^ getpid()'
This perfectly explains why I saw so many duplicate mac addresses.
Why is the RNG seed such a predictable value? Surely there has to be a
better source of a random seed then the timestamp and the pid?
The PID seems to me to be a very bad source of any randomness. I just
ran a test across 60 of our hosts. 43 of them shared their PID with at
least one other machine.
6 years, 6 months
[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, 3 months
[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, 3 months
[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, 3 months
[libvirt-users] snapshot anomaly
by Doug Hughes
I'm not sure how this snapshot got created, but, I cannot delete it, and
its presence prevents me from creating other snapshots. I don't know if
it was created by a command gone amok or something else.
# virsh snapshot-list serv1r2
Name Creation Time State
------------------------------------------------------------
snap 2017-01-30 17:01:11 -0500 shutoff
# virsh snapshot-delete serv1r2 snap --disk-only
error: command 'snapshot-delete' doesn't support option --disk-only
# virsh snapshot-dumpxml serv1r2 snap
<domainsnapshot>
<name>snap</name>
<state>shutoff</state>
<creationTime>1485813671</creationTime>
<memory snapshot='no'/>
<disks>
<disk name='vda' snapshot='external' type='file'>
<driver type='qcow2'/>
<source file='/*var/lib/libvirt/images/serv1r2-savesnap.qcow2'/*>
</disk>
<disk name='fda' snapshot='no'/>
<disk name='hda' snapshot='no'/>
</disks>
# ls -l /var/lib/libvirt/images/serv1r2-savesnap.qcow2
ls: cannot access /var/lib/libvirt/images/serv1r2-savesnap.qcow2: No
such file or directory
# virsh snapshot-create-as --domain serv1r2 snap --diskspec
vda,file=/var/lib/libvirt/flashimages/serv1r2-snap.qcow2 --disk-only
--atomic --no-metadata --quiesce
error: internal error: unexpected domain snapshot snap already exists
# virsh snapshot-revert serv1r2 snap
error: unsupported configuration: revert to external snapshot not
supported yet
Any idea for breaking out of this box?
--
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)
7 years, 3 months
[libvirt-users] duplicated notifications for suspend and resume
by Naud, AntoineX
Hello,
I am using domain event notifications from libvirt-event API in my application and it seems to work fine, except for 'suspend' and 'resume' events where I keep receiving duplicated notifications.
Similarly, the example provided with libvirt (in examples/object-events/event-test) also produces twice as much notifications for 'suspend' and 'resume' than for other events. Here is the sequence of virsh commands and the output of event-test:
Virsh start Fed25
Virsh suspend Fed25
Virsh resume Fed25
Virsh shutdown Fed25
[~/libvirt-3.4.0/examples/object-events] ./event-test qemu:///system
Registering event callbacks
myNodeDeviceEventCallback EVENT: Node device net_vnet0_fe_54_00_a0_ba_61 Created 0
myDomainEventCallback1 EVENT: Domain Fed25(1) Resumed Unpaused
myDomainEventCallback2 EVENT: Domain Fed25(1) Resumed Unpaused
myDomainEventCallback1 EVENT: Domain Fed25(1) Started Booted
myDomainEventCallback2 EVENT: Domain Fed25(1) Started Booted
myDomainEventCallback1 EVENT: Domain Fed25(1) Suspended Paused
myDomainEventCallback2 EVENT: Domain Fed25(1) Suspended Paused
myDomainEventCallback1 EVENT: Domain Fed25(1) Suspended Paused
myDomainEventCallback2 EVENT: Domain Fed25(1) Suspended Paused
myDomainEventCallback1 EVENT: Domain Fed25(1) Resumed Unpaused
myDomainEventCallback2 EVENT: Domain Fed25(1) Resumed Unpaused
myDomainEventCallback1 EVENT: Domain Fed25(1) Resumed Unpaused
myDomainEventCallback2 EVENT: Domain Fed25(1) Resumed Unpaused
myDomainEventCallback1 EVENT: Domain Fed25(1) Shutdown Finished
myDomainEventCallback2 EVENT: Domain Fed25(1) Shutdown Finished
myNodeDeviceEventCallback EVENT: Node device net_vnet0_fe_54_00_a0_ba_61 Deleted 0
Note that the 2 lines printed for each event are ok since 2 callbacks are registered in the example.
Has anybody else faced this issue?
I am using libvirt-3.6.0 on Ubuntu 16.04.
Best regards,
Antoine
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
7 years, 3 months
[libvirt-users] libvirt event
by llilulu
libvirt
version: 3.4.0
When use libvirt event in program, if I create more than one thread loop call virEventRunDefaultImp(), Is this invocation correct. If correct ,what happen when event occur.is many thread process event?
If I invocation virEventRegisterDefault before any hypervisor connect, and invocation virEventRunDefaultImp.Then I connect a hypervisor(qemu) and register some event on this connection. I connect another hypervisor(lxc), before lxc connection, I reinvocation virEventRegisterDefault and virEventRunDefaultImp, Is this operate correct?What happen after that?
Thanks
7 years, 3 months
[libvirt-users] dump in virEventPollRunOnce
by llilulu
libvirt
version: 3.4.0
architecture: x86_64 ubuntu16.04-server
hypervisor: kvm,qemu
My program use libvirt event , the program is a module(.so) file in cloud application, when unload the module, program will dump in virEventPoolRunOnce call.
program frame
virInitialize
virEventAddTimeOut
virEventRunDefaultImpl
virConnectXXX
virConnectDomainEventRegisterAny
...
virConnectDomainEventDeregisterAny
...
when unload the module will dump , the gdb bt commad output is
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/lssa/bin/lssa -f'.
Program terminated with signal SIGSEGV, Segmentation fault.
---Type <return> to continue, or q <return> to quit---
#0 0x00007f9a3e9fc2f2 in ?? ()
[Current thread is 1 (Thread 0x7f9a39349700 (LWP 2897))]
(gdb) bt
#0 0x00007f9a3e9fc2f2 in ?? ()
#1 0x00007f9a3e1728bd in virEventPollRunOnce () from /usr/lib/libvirt.so.0
#2 0x00007f9a3e171391 in virEventRunDefaultImpl () from /usr/lib/libvirt.so.0
#3 0x00007f9a3e9fbc16 in ?? ()
#4 0x0000000000000000 in ?? ()
(gdb)
Thanks
7 years, 3 months
[libvirt-users] vm in qcow2 runs on host A but not on host B
by Marko Weber
hello,
a vm in format qcow2 on host A (Intel Xeon CPU E5-1650 v4)
do not start on host B ( Intel Core i7-2600 CPU @ 3.40GHz )
i get on host B by starting the vm "trap errors" Opcode.
anyone here has an idea how to solve this?
kind regards
marko
--
zbfmail - Mittendrin statt nur Datei!
OpenDKIM, SPF, DSPAM, Greylisting, POSTSCREEN, AMAVIS, Mailgateways
Mailfiltering, SMTP Service, Spam Abwehr, MX-Backup, Mailserver Backup
Redundante Mailgateways, HA Mailserver, Secure Mailserver
7 years, 3 months