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 network inside Linux guest #185

Open
horacelau opened this issue Dec 22, 2019 · 7 comments
Open

No network inside Linux guest #185

horacelau opened this issue Dec 22, 2019 · 7 comments

Comments

@horacelau
Copy link

horacelau commented Dec 22, 2019

Host is MacOS 10.14.6.

I've tried TinyCoreLinux and Ubuntu (16.04.6-server-amd64). Guest unable to get DHCP response. Tried manually configuring network with IP in 192.168.64.x subnet (i.e., 192.168.64.5) but unable to ping host and host also unable to ping guest.

Tried both virtio-net and e1000.

Using brew xhyve (HEAD-1f46a3d).

Here's ifconfig with Linux guest booted:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
	inet 127.0.0.1 netmask 0xff000000 
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
XHC0: flags=0<> mtu 0
XHC20: flags=0<> mtu 0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 8c:85:90:41:b9:de 
	inet 192.168.1.44 netmask 0xffffff00 broadcast 192.168.1.255
	media: autoselect
	status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
	ether 0e:85:90:41:b9:de 
	media: autoselect
	status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
	ether ce:28:12:46:df:6a 
	inet6 fe80::cc28:12ff:fe46:df6a%awdl0 prefixlen 64 scopeid 0x8 
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=60<TSO4,TSO6>
	ether 1a:00:00:d1:86:01 
	media: autoselect <full-duplex>
	status: inactive
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=60<TSO4,TSO6>
	ether 1a:00:00:d1:86:00 
	media: autoselect <full-duplex>
	status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=63<RXCSUM,TXCSUM,TSO4,TSO6>
	ether 1a:00:00:d1:86:00 
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x2
	member: en1 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 10 priority 0 path cost 0
	member: en2 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 9 priority 0 path cost 0
	media: <unknown type>
	status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
	inet6 fe80::fb0f:de05:5f1b:1b16%utun0 prefixlen 64 scopeid 0xc 
	nd6 options=201<PERFORMNUD,DAD>
en10: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	ether 62:01:2e:77:e7:61 
	media: autoselect
	status: active
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=3<RXCSUM,TXCSUM>
	ether 8e:85:90:14:45:64 
	inet 192.168.64.1 netmask 0xffffff00 broadcast 192.168.64.255
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x2
	member: en10 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 13 priority 0 path cost 0
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active
@horacelau
Copy link
Author

No one has any ideas on how to debug this issue?

@xpepermint
Copy link

+1

@xpepermint
Copy link

@horacelau I figured this out:

  1. You need to run it with sudo.
  2. You need to add -s 2,virtio-net,tap0 into the executable.

@horacelau
Copy link
Author

@horacelau I figured this out:

You need to run it with sudo.
You need to add -s 2,virtio-net,tap0 into the executable.

Thanks @xpepermint, but that doesn't seem to fix my problem.

@dijitaltrix
Copy link

@horacelau FWIW I had to install my guest with the -U ... option before it could see out

@horacelau
Copy link
Author

@horacelau FWIW I had to install my guest with the -U ... option before it could see out

Can you provide details on exactly what you did?

@dijitaltrix
Copy link

@horacelau Create a UUID (from a Mac shell prompt use uuid), copy that into your vm startup script, then run the VM and install the guest OS. You'll need to run it with sudo, I've added an example run script (for FreeBSD) here https://gist.github.com/dijitaltrix/2986ec7953600217933e5af504a09352

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

3 participants