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

0.ipaddr is not generated #9

Open
hyoo opened this issue Jan 24, 2021 · 14 comments
Open

0.ipaddr is not generated #9

hyoo opened this issue Jan 24, 2021 · 14 comments

Comments

@hyoo
Copy link

hyoo commented Jan 24, 2021

when i start a vm, it boots up except the SSH server,

[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
         Starting LSB: automatic crash report generation...
         Starting Deferred execution scheduler...
         Starting Availability of block devices...
[  OK  ] Started Regular background program processing daemon.
         Starting Pollinate to seed…udo random number generator...
         Starting Service for snap application lxd.activate...
         Starting Permit User Sessions...
[  OK  ] Finished Remove Stale Onli…ext4 Metadata Check Snapshots.
[  OK  ] Started Deferred execution scheduler.
[  OK  ] Finished Availability of block devices.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started System Logging Service.
[  OK  ] Finished GRUB failed boot detection.
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...
[  OK  ] Finished Hold until boot process finishes up.
[  OK  ] Started Serial Getty on hvc0.
         Starting Set console scheme...
[  OK  ] Finished Terminate Plymouth Boot Screen.
[  OK  ] Started LSB: automatic crash report generation.
[  OK  ] Finished Set console scheme.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started LSB: Record successful boot for GRUB.
[  OK  ] Started Login Service.
[  OK  ] Started Unattended Upgrades Shutdown.
         Starting Authorization Manager...
[  OK  ] Started Authorization Manager.
[  OK  ] Started Accounts Service.
[  OK  ] Finished Pollinate to seed…seudo random number generator.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Started Dispatcher daemon for systemd-networkd.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Started Snap Daemon.
         Starting Wait until snapd is fully seeded...
[  OK  ] Stopped OpenBSD Secure Shell server.
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Finished Wait until snapd is fully seeded.
[  OK  ] Finished Service for snap application lxd.activate.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Finished Update UTMP about System Runlevel Changes.

Ubuntu 20.04.1 LTS ubuntu hvc0

ubuntu login:

and it seems like 0.macaddr is created, but not 0.ipaddr.

BTW, my internet sharing is already off.

How can i debug further ?

@djohnsson
Copy link

I'm not sure if this is the same issue I just ran into, but when I have the built-in firewall turned on I am unable to get a working network connection inside the VM - which took me longer than I would like to admit to find out.

I'm on wi-fi + nat.

@ChangheeOh
Copy link

I have successfully run a ubuntu vm by vmctl before upgrade MacOS 11.2.2.
After upgrading my MBA to Big Sur 11.2.2, the existing VM can not start with the same status you mentioned.

@gyf304
Copy link
Owner

gyf304 commented Mar 1, 2021

I have successfully run a ubuntu vm by vmctl before upgrade MacOS 11.2.2.
After upgrading my MBA to Big Sur 11.2.2, the existing VM can not start with the same status you mentioned.

Is there any error? What does vmctl attach ubuntu show?

@ChangheeOh
Copy link

ChangheeOh commented Mar 1, 2021 via email

@MartinPrescriba
Copy link

I'm not sure if this is the same issue I just ran into, but when I have the built-in firewall turned on I am unable to get a working network connection inside the VM - which took me longer than I would like to admit to find out.

I'm on wi-fi + nat.

Is there any way we can avoid having to turn off the macOS built-in firewall each time we start/reboot the vm?

I have tried adding vmcli to the allow list but it doesn't help.

Screenshot 2021-03-03 at 11 50 07

@ChangheeOh
Copy link

@MartinPrescriba , Thanks for your comment.
I have successfully run and ssh into my VM with the firewall turned off.
After a VM successfully started, I even can ssh into the VM my firewall turned on.

@gyf304 , Please check this issue and follow up.

@gyf304
Copy link
Owner

gyf304 commented Mar 3, 2021

Unfortunately, I can't yet reproduce this issue. I'll keep following this issue though.

@ChangheeOh
Copy link

ChangheeOh commented Mar 3, 2021 via email

@paul-hammant
Copy link

My firewall is off, but I still get:

$ vmctl ssh ubuntu
cat: /Users/paul/VMs/ubuntu/0.ipaddr: No such file or directory

@gyf304
Copy link
Owner

gyf304 commented Mar 23, 2021

My firewall is off, but I still get:

$ vmctl ssh ubuntu
cat: /Users/paul/VMs/ubuntu/0.ipaddr: No such file or directory

This usually means the network adapter is not working on the client.
Are there errors during bootup? (you can check using vmctl attach ubuntu)

Additionally, Virtual Machine cannot be started with networking when InternetSharing is already enabled, see #5 .

@paul-hammant
Copy link

InternetSharing is off. If I do vmctl attach ubuntu I'm not quick enough to see the network stuff in the log:

[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Finished GRUB failed boot detection.
[  OK  ] Started Authorization Manager.
[  OK  ] Started Accounts Service.
[  OK  ] Started Login Service.
[  OK  ] Started Unattended Upgrades Shutdown.
[  OK  ] Started LSB: automatic crash report generation.
[  OK  ] Finished Pollinate to seed…seudo random number generator.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started Dispatcher daemon for systemd-networkd.
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Started Snap Daemon.
         Starting Wait until snapd is fully seeded...
[  OK  ] Stopped OpenBSD Secure Shell server.
[FAILED] Failed to start OpenBSD Secure Shell server.
See 'systemctl status ssh.service' for details.
[  OK  ] Finished Wait until snapd is fully seeded.
[  OK  ] Finished Service for snap application lxd.activate.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Finished Update UTMP about System Runlevel Changes.

@gyf304
Copy link
Owner

gyf304 commented Mar 25, 2021

You can scroll back the screen per instructions here:
https://unix.stackexchange.com/questions/40242/scroll-inside-screen-or-pause-output

It will be also useful to check logs in the MacOS console:
https://support.apple.com/guide/console/find-log-messages-and-activities-cnslbf30b61a/mac

@ruyrybeyro
Copy link

ruyrybeyro commented Nov 2, 2021

See my issue #24, I am in 12.0.1 ; I also did not have 0.ipaddr because my interface was not configured, not up. Had to login via vmctl attach and create a netplan configuration file. Your logs seems identical to my situation.

@jriddy
Copy link

jriddy commented Apr 18, 2024

I ran into this issue, and it does appear to be firewall settings interfering with the interface in the VM come up, likely the bootpd service being blocked. canonical/multipass#2387 has a remedy that worked for me

        sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
        sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd

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

No branches or pull requests

8 participants