Closed trbtm closed 3 years ago
@conath Can you reproduce this?
After working with 18.04 VM for a while I noticed that the network / internet access stopped working completely, even in Console Only
mode. So if you try to reproduce this, use fresh VMs.
Does Emulated VLAN work?
I updated my answer with the findings from Emulated VLAN
. Short answer: No.
Interesting, maybe try one of the other network adapters? Maybe virtio works better for Linux?
Ubuntu 20.04 ARM64, command: dig @1.1.1.1 google.com
Full Graphics
+ Emulated VLAN
: Timeout
I tested all of these Network cards, it timed out every time.
Thanks, is this issue newly introduced in 2.2.x beta or does it also happen on 2.1.x? If it's new in 2.2, then does changing the display adapter do anything (I don't think it should have any effect).
I'll test this as well.
Thanks, is this issue newly introduced in 2.2.x beta or does it also happen on 2.1.x? If it's new in 2.2, then does changing the display adapter do anything (I don't think it should have any effect).
I honestly don't know for sure but I used UTM a couple months ago with an Ubuntu 20.04 VM and a desktop environment and I can't remember having any network issues.
Testing with 2.2.3 I can reproduce this.
Ubuntu 20.04 installed via console works (emulated network; I chose manual IPv4 setup so that I can be sure it's not changing on its own). Here's a debug log from when it is working in console mode. debug-consolemode.log
After shutting down the VM normally, changing to using graphics (default virtio-ramfb-gl
) and starting the VM again, it isn't working anymore.
debug-graphicsmode.log
Same on 2.2.2 and 2.2.1.
Actually, this also occurs on 2.1.2! So it might be a QEMU 6.0+ problem.
@conath If it's also an issue in 2.1.2, do you agree it shouldn't hold up the 2.2.x release?
I agree.
Also, it only happens when you switch graphics settings? i.e. a fresh install on graphics don't exhibit the error? Last I tried, network was working but I didn't use console mode.
It seems like switching between the two is what causes the issue. I just reinstalled Ubuntu 20.04 ARM in UTM 2.1.2 graphics mode, then switched to console mode, and that broke the networking.
What's weird is that there is no change between the networking parameters when switching between the modes. (I diffed the debug log, only the chardev and graphics parameters differ)
What I did notice is that it seems SPICE is not in use at all in console mode, could that be causing the issue?
I don't know; I can't see why SPICE would affect networking at all though... I do plan to move console mode to use SPICE as well (as a SPICE serial port) which would enable shared directories and other SPICE features, but that'll be a later milestone.
I can confirm that with 2.2.3, installed 20.04 in Full Graphics and the network works. Switched the mode to Console and now the network doesn't work in Console Mode.
I don't know; I can't see why SPICE would affect networking at all though... I do plan to move console mode to use SPICE as well (as a SPICE serial port) which would enable shared directories and other SPICE features, but that'll be a later milestone.
On my VMs I didn't install SPICE. So if it doesn't come preinstalled it should have no influence on the tests that I did.
@trbtm SPICE is a "behind the scenes" technology used by UTM. It doesn't get installed in the guest. (spice guest tools is something else)
@conath Thanks for pointing that out. I also tested some more and switched back and forth between Full Graphics and Console and it seems like the switching is breaks networking at some point. If I switch back and forth "enough" I send up with a VM that doesn't has networking in neither of the two modes.
I can reproduce this in a NixOS VM that I've been using since 2.1.something, created as console only.
Interestingly enough, I can't seem to reproduce it in an Alpine Linux VM that I created using this iso. Going back and forth between console and graphics and the network always works.
EDIT: In both VMs I'm using the virtio-ramfb-gl
adapter when in graphical mode and the shared network mode with the virtio-net-pci
card. Both systems are virt-6.1
.
For me, using Debian 11 (debian-11.0.0-arm64-netinst.iso) and UTM 2.2.4 in bridged mode, using dhcp, I was seeing similar behaviour - the mac mini m1 was unable to reliably ping the IP4 address of the VM when it was running the installer.
This turned out to be an IP6 duplicate address.
The quick workaround was to: echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
Not sure whether this is something specific to my home network setup or something else, but it changed the behaviour from mostly not able to be pinged from the mac mini m1 to being solid enough to do a network install.
====
The workaround can be made permanent by creating /etc/sysctl.d/50_disable_ipv6.conf that contains:
net.ipv6.conf.all.disable_ipv6 = 1
====
Testing above was done using virtio-net-device. First hour of playing with UTM so apologies if the IP6 issue is an FAQ. This thread was the first hit for the lack of networking during installation.
@trbtm in #3051 we resolved the issue because when the VM boots in GUI mode, the network interface got a different name and Ubuntu wasn't configured to use that interface. The fix was to modify /etc/netplan/00-installer-config.yaml
and add both interface names. Can you see if this fixes the issue for you as well?
Added the troubleshooting tip to https://mac.getutm.app/gallery/ubuntu-20-04#networking-is-unavailable-after-switching-between-console-only-and-full-graphics-modes
@trbtm in #3051 we resolved the issue because when the VM boots in GUI mode, the network interface got a different name and Ubuntu wasn't configured to use that interface. The fix was to modify
/etc/netplan/00-installer-config.yaml
and add both interface names. Can you see if this fixes the issue for you as well?
Yes that works, on Ubuntu 18.04 the file is called /etc/netplan/01-netcfg.yaml
, maybe you could add that to the troubleshooting tip, the rest is the same as on 20.04.
The
Full Graphics
display mode seems to break the networking. I stumbled upon this because I installed 18.04 where the installer only works inConsole Only
mode. After installing I randig @1.1.1.1 google.com
and it worked. After rebooting and enablingFull Graphics
it doesn't work anymore.This behaviour is independent of the network setting (I tested 'Shared Network' and 'Bridged (Advanced)'). I always used
virtio-ramfb-gl
Display Card inFull Graphics
setting, since the other Cards would either prevent the VM from booting or are terribly slow. Here are the results of my testing:https://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.5-server-arm64.iso Ubuntu 18.04 ARM64, command:
dig @1.1.1.1 google.com
Full Graphics
+Shared Network
: TimeoutFull Graphics
+Bridged (Advanced)'
: TimeoutFull Graphics
+Emulated VLAN
: TimeoutConsole Only
+Shared Network
: SuccessConsole Only
+Bridged (Advanced)
: SuccessConsole Only
+Emulated VLAN
: Successhttps://ubuntu.com/download/server/arm Ubuntu 20.04 ARM64, command:
dig @1.1.1.1 google.com
Full Graphics
+Shared Network
: TimeoutFull Graphics
+Bridged (Advanced)
: TimeoutFull Graphics
+Emulated VLAN
: TimeoutConsole Only
+Shared Network
: SuccessConsole Only
+Bridged (Advanced)
: SuccessConsole Only
+Emulated VLAN
: SuccessI followed this guide https://github.com/utmapp/UTM/wiki/Install-Ubuntu-ARM64-on-Apple-M1 to set them up.
Those settings are the only ones I changed in-between reboots. I think this is clearly a bug, because why would the graphics setting influence my networking, at least from a users perspective.
Kind regards, Thore
Configuration