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

ubuntu/* and debian/* have no network #30

Open
marehr opened this issue Mar 2, 2023 · 2 comments
Open

ubuntu/* and debian/* have no network #30

marehr opened this issue Mar 2, 2023 · 2 comments
Assignees
Labels
bug Something isn't working investigating Investigating issue.

Comments

@marehr
Copy link

marehr commented Mar 2, 2023

I just tested ubuntu/focal, ubuntu/jammy, and debian/sid.

The images were installed like this:

nspawn -i ubuntu/focal/tar

machinectl start ubuntu-focal-tar

machinectl login ubuntu-focal-tar
➜  ~ sudo machinectl login ubuntu-focal-tar
Connected to machine ubuntu-focal-tar. Press ^] three times within 1s to exit session.

Ubuntu 20.04 LTS focal pts/1

focal login: root
Password: 
Welcome to Ubuntu 20.04 LTS (GNU/Linux 6.2.1-arch1-1 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@focal:~# ping www.google.de
ping: www.google.de: Temporary failure in name resolution

root@focal:~# apt update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done        
Building dependency tree       
Reading state information... Done
55 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

fedora-34-tar on the other hand worked. Maybe you can help :)

@Edu4rdSHL
Copy link
Member

It's an issue when using private networks, which I assume you are using as it's the default configuration. You can simply try setting up a MACVLAN or IPVLAN in your .nspawn file and it will work... honestly, it isn't clear why it doesn't work for specific distros, but I will continue investigating.

@Edu4rdSHL Edu4rdSHL self-assigned this Mar 2, 2023
@Edu4rdSHL Edu4rdSHL added bug Something isn't working investigating Investigating issue. labels Mar 2, 2023
@neitsab
Copy link

neitsab commented Sep 6, 2024

Just wanted to update this mentioning that it's the same situation with the arch container image, using default machinectl start command. I had to create /etc/systemd/nspawn/archlinux-archlinux-tar with the following content (taken from the Arch Wiki):

[Network]
VirtualEthernet=no

and after restarting the container it worked.

Maybe this could be documented in nspawn/nspawn's README and/or the website's FAQ for those less familiar with machinectl inner working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working investigating Investigating issue.
Projects
None yet
Development

No branches or pull requests

3 participants