Skip to content
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

no IP address found for Ubuntu VM #912

Closed
barkingfoodog opened this issue Sep 30, 2024 · 7 comments · Fixed by cirruslabs/linux-image-templates#38
Closed

no IP address found for Ubuntu VM #912

barkingfoodog opened this issue Sep 30, 2024 · 7 comments · Fixed by cirruslabs/linux-image-templates#38

Comments

@barkingfoodog
Copy link
Contributor

I'm running tart 2.18.4 on macOS Sequoia 15.0. Tart works fine with a macOS image, and I'm trying to get an Ubuntu VM going for the first time.

I followed the basic steps from https://tart.run/quick-start/:

tart clone ghcr.io/cirruslabs/ubuntu:latest ubuntu
tart set ubuntu --disk-size 50
tart run ubuntu

The VM downloads, boots up, and I can log into through the tart GUI. However, I'm unable to get the VM IP using tart ip ubuntu. Instead I get:

no IP address found

I found #632 and tried the workaround from #657 but that doesn't help. After clearing /var/db/dhcpd_leases and restarting the VM I get output that looks legit in /var/db/dhcpd_leases:

{
	name=ubuntu
	ip_address=192.168.64.2
	hw_address=ff,f1:f5:dd:7f:0:2:0:0:ab:11:b5:58:a4:8e:38:af:82:b9
	identifier=ff,f1:f5:dd:7f:0:2:0:0:ab:11:b5:58:a4:8e:38:af:82:b9
	lease=0x66fa772c
}

This matches the IP inside the VM (confirmed using ifconfig).

I have an OpenVPN Connect VPN running, but disabling it doesn't seem to make any difference. I don't have any issues getting the IP address from a macOS VM running under tart.

Any compatibility issues with macOS 15 or other troubleshooting ideas for how to get tart ip ubuntu returning the VM's IP address?

@edigaryev
Copy link
Collaborator

edigaryev commented Sep 30, 2024

Looks like a bug in the macOS DHCP server:

Screenshot 2024-09-30 at 14 28 41

It uses the client ID not just in the identifier= field, but also in hw_address= field, yet this field's name hints that it should only contain a MAC-address.

I've created cirruslabs/linux-image-templates#38 to address this in our Linux VM images.

@barkingfoodog
Copy link
Contributor Author

Thank you! I'll watch for the next Linux VM build and confirm the fix before closing this.

@barkingfoodog
Copy link
Contributor Author

@edigaryev I saw new builds come through a couple days ago at https://github.com/cirruslabs/linux-image-templates/pkgs/container/ubuntu. I pulled a fresh copy of the 22.04 image and I'm still not getting an IP from tart ip ubuntu.

Should those images have the fix from cirruslabs/linux-image-templates#38?

@edigaryev
Copy link
Collaborator

edigaryev commented Oct 8, 2024

@barkingfoodog my bad, I was testing the fix on the initial boot, which still used the network-config provided to the Cloud Init.

I've created cirruslabs/linux-image-templates#39 to fix this and will initiate a re-build of base images once it gets merged 🙌

@edigaryev
Copy link
Collaborator

Should work now, tested with the latest versions of:

  • ghcr.io/cirruslabs/ubuntu:latest
  • ghcr.io/cirruslabs/ubuntu:24.04
  • ghcr.io/cirruslabs/debian:latest
  • ghcr.io/cirruslabs/fedora:latest (AFAIR this one worked before the fix)

@barkingfoodog
Copy link
Contributor Author

@edigaryev I can confirm this works now with ghcr.io/cirruslabs/ubuntu:latest using Tart 2.18.4 on macOS Sequoia 15.0.1. Thank you!

@GregOriol
Copy link

Thank you for documenting this: it helped me with utmapp/UTM#3294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants