-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instance names not resolved on hyperkit #853
Comments
We are having the same issue. It works fine with multipass on Ubuntu out of the box, but on Mac the .multipass-domain isn't configured. I'm not sure what's required for this to work. Is there a workaround? A cloud-init configuration? Hosts-file isn't really a viable option - even if it works. A workaround or some pointers to make it work through Ubuntu configuration would be really helpful until multipass supports this. Thanks ;) Edit: |
@maxramqvist did you find a workaround? I was reading at https://askubuntu.com/questions/1224343/multipass-instances-cannot-resolve-each-others-name-but-can-resolve-external-n that the solution is to add Edit: I figured out why my |
Problem was never resolved, we just stopped using multipass. :/ @NerdsvilleCEO |
@maxramqvist for a quick resolution it could be scripted using awk and a bash script |
This was bugging me so I developed a workaround.. it's ugly but works for now #!/bin/bash
if ! multipass list | grep workstation; then
multipass launch -n workstation -c 1 -m 1G -d 10G --cloud-init cloud.cfg
else
multipass start workstation
fi
cat <<EOF > hosts
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
EOF
multipass list | egrep -v "Name|\-\-" | awk '{var=sprintf("%s\t%s.multipass",$3,$1); print var}' >> hosts
multipass transfer hosts workstation:/home/ubuntu/hosts
multipass exec workstation sudo mv hosts /etc/hosts |
Upvote +1. Still no-one assigned to this issue? 😞 |
Multipass 1.5.0+mac, just hit this, was really surprised that inter-instance DNS was not offered by this otherwise well-functioning platform. |
Still same issue in |
I'll actually mark this duplicate, here's a workaround you can employ: |
Duplicate of #1830 |
@Saviq I'm not sure this workaround is relevant. So from the macOS terminal I would like to be able to: But it does not resolve: The workaround you mentioned seems to be relevant to Linux host, not Mac, am I missing something? |
@haim-ari you need to enable it on the Linux instances, but you'll be able to resolve |
Test (This is not the excepted IP)
Available interfaces in the launched instance are:
The cloud-init (I used interface write_files:
- path: /etc/systemd/resolved.conf
append: true
content: |
MulticastDNS=yes
- path: /etc/systemd/system/[email protected]
content: |
[Service]
Type=oneshot
ExecStart=/usr/bin/systemd-resolve --set-mdns=yes --interface=%i
After=sys-subsystem-net-devices-%i.device
[Install]
WantedBy=sys-subsystem-net-devices-%i.device
runcmd:
- systemctl restart systemd-resolved.service
- systemctl start [email protected]
- systemctl enable [email protected] from cloud-init log:
From the host (Mac): |
@haim-ari right, this recipe worked for a single interface case. On VirtualBox you get the extra interface, but Not sure if/how you can convince systemd-resolved to announce the other IP, and announce over the external interface. But! Since your external IP is given by your router, did you try That, or you could use the new |
|
@haim-ari you could change your router configuration to resolve client hostnames. Otherwise you'd need to dig into systemd-resolved settings to expose the right IP on the external interface. |
@Saviq |
@haim-ari this issue was about |
$ systemd-resolve --status
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 22 (vethwepla3dc978)
Current Scopes: none
$ systemd-resolve kube-node1.multipass kube-master.multipass
kube-node1.multipass: resolve call failed: 'kube-node1.multipass' not found
kube-master.multipass: resolve call failed: 'kube-master.multipass' not found
Originally posted by @sciabarracom in #666 (comment)
The text was updated successfully, but these errors were encountered: