uxora-com / xpenology-docker

Docker configured to run a KVM VirtualMachine of Xpenology dsm 6.2.3 ( and 7.0.1 with redpill)
43 stars 12 forks source link

Bug: IPv6 DNS addresses causes dnsmasq to fail #20

Closed kroese closed 1 year ago

kroese commented 1 year ago

I'm getting the following during startup:

INFO: Xpenology docker V0.9 is starting [pid:7] ...
INFO: Little dirty trick ...
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in manual mode
INFO: ALT bootloader file found: copy to /xpy/diskvm/bootloader.img
INFO: SKIP download URL: bootloader file already exists: /xpy/diskvm/bootloader.img
INFO: Downloaded file seems bootable! Good good!
INFO: Backing up bootloader: /xpy/diskvm/bootloader.img.tar.gz
INFO: Modification of grub.cfg ...
INFO: ddReplace for: vid=0x46f4
INFO: ... No need to change: value is the same!
INFO: ... No need to change: value is the same!
INFO: ddReplace for: pid=0x0001
INFO: ... No need to change: value is the same!
INFO: ... No need to change: value is the same!
INFO: ddReplace for: sn=1330LWN026769
WARNING: ... Nb of char is not equal: 16 =/= sn=0
WARNING: ... Nb of char is not equal: 16 =/= sn=0
WARNING: ... Nb of char is not equal: 16 =/= sn=tn
WARNING: ... Nb of char is not equal: 16 =/= sn=ht
WARNING: ... Nb of char is not equal: 16 =/= sn=C7LWN09761
WARNING: ... Nb of char is not equal: 16 =/= sn=C7LWN09761
WARNING: ... Nb of char is not equal: 16 =/= sn=z
INFO: ddReplace for: mac1=0011322CA785
INFO: ... No need to change: value is the same!
INFO: ... No need to change: value is the same!
INFO: Bootloader convertion ...
INFO: ... SUCCESS: Bootloader has been converted to qcow2: /xpy/diskvm/bootloader.qcow2
INFO: Adding snapshot disk ...
Formatting '/xpy/diskvm/vm-disk-snapshot.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=8388608 lazy_refcounts=off refcount_bits=16
INFO: ... SUCCESS: snapshot disk created: /xpy/diskvm/vm-disk-snapshot.qcow2
INFO: Adding bootloader as USB ...
INFO: Adding vm disk(s)  ...
Formatting '/xpy/diskvm/vm-disk-data0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=17179869184 lazy_refcounts=off refcount_bits=16
INFO: ... SUCCESS: qcow2 disk created: /xpy/diskvm/vm-disk-data0.qcow2
INFO: Adding 9p sharefolders ...
INFO: ... path=/xpy/share9p , mount_tag=hostdata0
INFO: KVM acceleration enabled
INFO: Configuring network ...
INFO: ... NAT Network (_VmNatTap) to 20.20.20.21
INFO: DHCP configured to serve IP 20.20.20.21/24 via dockerbridge
INFO: ... Lauching dnsmasq
DEBUG: dnsmasq options:  --dhcp-range=20.20.20.21,20.20.20.21 --dhcp-host=00:11:32:2C:A7:85,,20.20.20.21,VirtualMachine,infinite --dhcp-option=option:netmask,255.255.255.0                                         --dhcp-option=option:dns-server,10.0.0.191,10.0.0.190,2001:4860:4860::8888        --dhcp-option=option:router,20.20.20.1                           --dhcp-option=option:domain-search,.                 --dhcp-option=option:domain-name,. 

dnsmasq: bad command line options: bad IP address

It seems it has a problem passing the right parameters to dnsmasq?

Could it be because on my local machine I have an IPv6 DNS server configured?

EDIT: Yes.. I added to --dns 8.8.8.8 to the docker run command so it replaces the /etc/resolved.conf from the host, and now the container boots.

So the bug is that the script does not filter out any IPv6 addresses before passing them to dnsmasq.