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

ping localhost doesn't work in a vfkit vm? #2974

Open
rjkroege opened this issue Apr 26, 2024 · 2 comments
Open

ping localhost doesn't work in a vfkit vm? #2974

rjkroege opened this issue Apr 26, 2024 · 2 comments
Labels
Bug Stuff that's wrong

Comments

@rjkroege
Copy link
Contributor

Describe the bug
I create a Linux vm using vfkit on an Apple Silicon Mac. I booted such a vm using the test puipui kernel from Code-Hex/vz: Create virtual machines and run Linux-based operating systems in Go using Apple Virtualization.framework. and an initrd build with u-root.

To Reproduce
Boot the vm. ping 127.0.0.1. Note the following unexpected output

% ping 127.0.0.1
64 bytes from 127.0.0.1: icmp_seq=1 time=75.875µs
1970/01/01 00:01:38 ping failed: got seq 1; want 2

Expected behavior
I expect ping 127.0.0.1 to indicate that it's connected. For example, if I boot the puipui kernel (same kernel as above) with its associated initrd,

~ # ping 127.0.0.1
127.0.0.1 is alive!

So: ping from busy box works as expected while u-root ping does not where kernel, vm and vm launch configuration are held constant.

Conclusion: there is something not-right happening with my u-root to setup the network. Any helpful comments would be appreciated. Otherwise, I will continue to explore this and update the bug.

@rjkroege rjkroege added the Bug Stuff that's wrong label Apr 26, 2024
@binjip978
Copy link
Contributor

Yeah, this is a problem with u-root ping, this can be reproduced on any machine, you don't need a VM. To make it work on localhost is more tricky. It will work with -c=1 but no more.

@rjkroege
Copy link
Contributor Author

Ah. Thanks for the update.

I should probably note in passing that I discovered this bug while trying to make the network work in my vm and stopped at "if I can't even get ping to localhost to work, then there's no hope for more general networking"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Stuff that's wrong
Projects
None yet
Development

No branches or pull requests

2 participants