Re: [libvirt-users] Libvirt API for attaching volume to domain

2019-08-14 Thread Christian Kujau
On Wed, 14 Aug 2019, Varsha Verma wrote:
> Is there some documentation where I can get how to exactly call this
> function along with the arguments?

Documentation to various language bindings can be found here:

 https://libvirt.org/bindings.html

HTH,
C.
-- 
BOFH excuse #417:

Computer room being moved.  Our systems are down for the weekend.

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


Re: [libvirt-users] libvirt/dnsmasq is not adhering to static DHCP assignments

2019-08-08 Thread Christian Kujau
On Fri, 2 Aug 2019, Michal Privoznik wrote:
> On 8/1/19 4:21 AM, Christian Kujau wrote:
> >
> >
> 
> This is clearly a misconfiguration. 192.168.56.139 is not from
> 192.168.122.130/24 subnet. Libvirt should report an error in this case but it

Yes, thanks for pointing this out. A little while after my posting I 
noticed the same but failed to post the error to the mailing list.

> doesn't (tested right now with the current git HEAD), which is a bug. I
> believe if you'd s/56/122/ in the  you'll find it working again.

Indeed, this fixed the issue.

Sorry for the noise,
Christian.
-- 
BOFH excuse #353:

Second-system effect.

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


[libvirt-users] libvirt/dnsmasq is not adhering to static DHCP assignments

2019-07-31 Thread Christian Kujau
This is basically a continuation of an older posting[0] I found, but 
apparently no solution has been posted. So, I'm trying to setup static 
DHCP leases with dnsmasq that is being started by libvirtd:


---
$ sudo virsh net-dumpxml --network default

  [...]
  
  

  
  
---


And the domain is indeed being started with that hardware address:


---
$ virsh dumpxml --domain f30 | grep -B1 -A3 mac\ a

  
  
  
  
---
  


But for some reason the domain gets a different address assigned, albeit 
from the correct DHCP pool:


---
$ ssh 192.168.122.233 "ip addr show"
[...]
2: enp1s0:  mtu 1500 qdisc fq_codel state 
UP group default qlen 1000
link/ether 08:00:27:e2:81:39 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.233/24 brd 192.168.122.255 scope global dynamic enp1s0
---


See below for even more details. I've removed the virbr0.status file, 
restarted the network, still it gets this .233 address instead of the 
configured .139. Also, I'm not able to add a debug log to the 
libvirtd/dnsmasq instance, although it should be possible[1], the 
xmlns:dnsmasq stanza is overwritten as soon as the configuration is saved. 
Short of a debug (queries) log, strace on the libvirtd/dnsmasq process 
reveals that the client seems to request this strange IP address:

23002 19:01:59.053558 write(11, "<30>Jul 31 19:01:59 dnsmasq-dhcp[23002]: 
DHCPREQUEST(virbr0) 192.168.122.233 08:00:27:e2:81:39 ", 95) = 95
23002 19:01:59.054024 write(11, "<30>Jul 31 19:01:59 dnsmasq-dhcp[23002]: 
DHCPACK(virbr0) 192.168.122.233 08:00:27:e2:81:39 f30", 94) = 94

So I restarted the dhclient process in the domain (a freshly installed 
Fedora 30), removed all state files with "192.168.122.233" in them, but 
still the domains gets assigned the .233 instead of the .139 address.

The next step would be to disable libvirtd/dnsmasq altogether and run my 
own dnsmasq instance, but I wanted to avoid that. Any idead on where to 
look next?

Thanks,
Christian.

[0] https://www.redhat.com/archives/libvirt-users/2017-October/msg00070.html
[1] https://libvirt.org/formatnetwork.html#elementsNamespaces


# cd /var/lib/libvirt/dnsmasq/
# grep -r . . | fgrep -v \#
./default.conf:strict-order
./default.conf:port=0
./default.conf:pid-file=/var/run/libvirt/network/default.pid
./default.conf:except-interface=lo
./default.conf:bind-dynamic
./default.conf:interface=virbr0
./default.conf:dhcp-range=192.168.122.130,192.168.122.250,255.255.255.0
./default.conf:dhcp-no-override
./default.conf:dhcp-authoritative
./default.conf:dhcp-lease-max=121
./default.conf:dhcp-hostsfile=/var/lib/libvirt/dnsmasq/default.hostsfile
./default.hostsfile:08:00:27:e2:81:39,192.168.56.139,f30
./virbr0.status:[
./virbr0.status:  {
./virbr0.status:"ip-address": "192.168.122.233",
./virbr0.status:"mac-address": "08:00:27:e2:81:39",
./virbr0.status:"hostname": "f30",
./virbr0.status:"client-id": 
"ff:27:e2:81:39:00:04:8c:ad:c4:7d:04:e8:4b:de:93:4b:76:d8:75:82:86:c8",
./virbr0.status:"expiry-time": 1564628519
./virbr0.status:  }
./virbr0.status:]





-- 
BOFH excuse #40:

not enough memory, go get system upgrade

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users