utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.85k stars 1.34k forks source link

Can not reach network #530

Closed leeeboo closed 3 years ago

leeeboo commented 3 years ago

I use both https://github.com/utmapp/vm-downloads/releases/tag/archlinux-arm64 and my own created vm install centos. I can not reach network. The dev ens4 is up, dhcp works fine, the client ip is 10.0.2.15 host is 10.0.2.2 ping 10.0.2.2 works fine I changed the nameserver to 8.8.8.8 the ping to 8.8.8.8 or any other domain ar not reachable. curl is not work at all.

osy commented 3 years ago

Ping does not work as a limitation of QEMU. Curl should work though. Is your device from the China region?

leeeboo commented 3 years ago

Ping does not work as a limitation of QEMU. Curl should work though. Is your device from the China region?

curl is not work my device is ipad pro 2020 12.9 bought from china

leeeboo commented 3 years ago

Ping does not work as a limitation of QEMU. Curl should work though. Is your device from the China region?

I have the experience use UTM last version on ipados 13 with the same device. At that time, network works good

osy commented 3 years ago

What version are you using? 2.0.9?

leeeboo commented 3 years ago

What version are you using? 2.0.9?

yes, the latest version.

tycho commented 3 years ago

Networking doesn't seem to behave with macOS 11 and Windows 10 ARM64 guest either. Followed the instructions here:

https://gist.github.com/osy86/10d0ac0210f0eb99474ae31cf8d6dd9e

It has a NIC, and it shows a SLIRP-assigned IP, but traffic can't get out of guest-land for some reason. It can ping the SLIRP default gateway, but it can't resolve any hostnames.

sebdanielsson commented 3 years ago

Did anyone manage to get networking on Arch ARM or Windows 10 ARM? Tested both on ny M1 Mac running macOS 11.2.1 and the latest UTM 20.0.22 without luck.

conath commented 3 years ago

Did anyone manage to get networking on Arch ARM or Windows 10 ARM? Tested both on ny M1 Mac running macOS 11.2.1 and the latest UTM 20.0.22 without luck.

Yes, I have working network and web browsing but with the limitation that Windows shows as "No Internet Access" in taskbar and Settings. You need to set DNS to manual in Windows (e. g. 1.1.1.1 as server) to get web browsing to work.

saimurali619 commented 3 years ago

Did anyone manage to get networking on Arch ARM or Windows 10 ARM? Tested both on ny M1 Mac running macOS 11.2.1 and the latest UTM 20.0.22 without luck.

Yes, I have working network and web browsing but with the limitation that Windows shows as "No Internet Access" in taskbar and Settings. You need to set DNS to manual in Windows (e. g. 1.1.1.1 as server) to get web browsing to work.

I'm using Mac M1 and have installed Window 10 ARM installed using UTM and installed Oracle database which is running on 1521 port number and I'm trying to do ssh into guest windows from host terminal but it isn't working (My idea is to use oracle database from host terminal using ssh protocol to windows). Can help me identify the issue pls.

Screenshot 2021-07-26 at 10 45 49 AM Screenshot 2021-07-26 at 10 48 45 AM
saimurali619 commented 3 years ago
Screenshot 2021-07-26 at 10 51 12 AM

Host IP details

conath commented 3 years ago

I'm using Mac M1 and have installed Window 10 ARM installed using UTM and installed Oracle database which is running on 1521 port number and I'm trying to do ssh into guest windows from host terminal but it isn't working (My idea is to use oracle database from host terminal using ssh protocol to windows). Can help me identify the issue pls.

The guest VM is in its own virtual subnet, as UTM doesn't currently offer bridge mode networking. Please remove all IPs from your guest network configuration in UTM. Then start the VM and change the Windows network settings to use your preferred DNS.

To reach your VM's port that you forwarded, access it as localhost:2200 on the host.

saimurali619 commented 3 years ago

I'm using Mac M1 and have installed Window 10 ARM installed using UTM and installed Oracle database which is running on 1521 port number and I'm trying to do ssh into guest windows from host terminal but it isn't working (My idea is to use oracle database from host terminal using ssh protocol to windows). Can help me identify the issue pls.

The guest VM is in its own virtual subnet, as UTM doesn't currently offer bridge mode networking. Please remove all IPs from your guest network configuration in UTM. Then start the VM and change the Windows network settings to use your preferred DNS.

To reach your VM's port that you forwarded, access it as localhost:2200 on the host.

I did what you told me but the ping or ssh is not working to the host ip that is set in windows vm. See below.

Screenshot 2021-07-26 at 12 54 57 PM Screenshot 2021-07-26 at 12 55 28 PM
conath commented 3 years ago

I said:

To reach your VM's port that you forwarded, access it as localhost:2200 on the host.

and you:

I did what you told me but the ping or ssh is not working to the host ip that is set in windows vm. See below.

Screenshot 2021-07-26 at 12 54 57 PM Screenshot 2021-07-26 at 12 55 28 PM

Please use 127.0.0.1:2200 instead of the VM’s IP. As I said, the VM is not in your laptop’s subnet.

saimurali619 commented 3 years ago

My mistake, that was wrong screenshot. See this, it isn't working.

muralichava@Muralis-MacBook-Air ~ % ssh localhost:2200 ssh: Could not resolve hostname localhost:2200: nodename nor servname provided, or not known muralichava@Muralis-MacBook-Air ~ % muralichava@Muralis-MacBook-Air ~ % muralichava@Muralis-MacBook-Air ~ % ssh 127.0.0.1:2200 ssh: Could not resolve hostname 127.0.0.1:2200: nodename nor servname provided, or not known

I said:

To reach your VM's port that you forwarded, access it as localhost:2200 on the host.

and you:

I did what you told me but the ping or ssh is not working to the host ip that is set in windows vm. See below.

Screenshot 2021-07-26 at 12 54 57 PM Screenshot 2021-07-26 at 12 55 28 PM

Please use 127.0.0.1:2200 instead of the VM’s IP. As I said, the VM is not in your laptop’s subnet.

My mistake, that was wrong screenshot. See this, it isn't working.

muralichava@Muralis-MacBook-Air ~ % ssh localhost:2200 ssh: Could not resolve hostname localhost:2200: nodename nor servname provided, or not known muralichava@Muralis-MacBook-Air ~ % muralichava@Muralis-MacBook-Air ~ % muralichava@Muralis-MacBook-Air ~ % ssh 127.0.0.1:2200 ssh: Could not resolve hostname 127.0.0.1:2200: nodename nor servname provided, or not known

conath commented 3 years ago

Ah sorry, I didn’t realize you’re trying to use ssh. To specify a port for ssh you need to use the -p flag like this: ssh user@127.0.0.1 -p 2200

Replace user with the ssh username you want to use.

saimurali619 commented 3 years ago

Ah sorry, I didn’t realize you’re trying to use ssh. To specify a port for ssh you need to use the -p flag like this: ssh user@127.0.0.1 -p 2200

Replace user with the ssh username you want to use.

Probably there is still network configuration error, could you pls advise?

muralichava@Muralis-MacBook-Air ~ % ssh murali@localhost -p 2200

kex_exchange_identification: read: Connection reset by peer

Without ping success none of the other things work right?

muralichava@Muralis-MacBook-Air ~ % ping 192.168.0.59 PING 192.168.0.59 (192.168.0.59): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 ^C --- 192.168.0.59 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss

conath commented 3 years ago

Connection reset by peer

I see you’ve been able to resolve the original problem by using the correct ssh command. The Connection reset issue has occurred on here before but no solution, apparently. https://github.com/utmapp/UTM/discussions/2535

osy commented 3 years ago

Duplicate of #2353

SugarRayLua commented 2 years ago

IMG_0826

@conath , I just went back to try using UTM SE on my iPad Pro since I can’t get Jitterbug to pen UTM to activate JIT and open UTM since I updated to iOS 15.3 (separate issued filed under Jitterbug). Unfortunately, when I tried to install two Debian ARM VMs (Debian 10 XFCE from the Gallery and Debian 11 LXQT from the official Debian download isos), I’m having difficulty connecting to the internet to download packages from the Debian repository (see attached screenshot). My VM shows it has an Ethernet connection, but can’t download any packages. Previously (many months ago), I had UTM SE working with the same Gallery Debian 10 XFCE VM (but have long ago deleted that VM when was using primarily UTM).

I’ve tried the things you’ve posted including changing the DNS servers inside the host to 1.1.1.1, 8.8.8.8 and even disabling automatic DHCP and setting manual address as 10.0.2.0, net mask 24, and gateway at 10.0.2.2.

Any suggestions? If you have an iPad can you test internet connection on UTM SE (perhaps on lower iOS 15.2 if don’t want to risk iOS 15.3 deactivating JIT if you also run UTM on the same device.

My setup: iPad OS 15.3 iPad Pro 11 inch, 3rd Gen UTM 3.0.4 build 46 Testing Debian ARM64 XFCE from Gallery and Debian 11 ARM LXQT from Debian downloaded iso.

Thanks!

conath commented 2 years ago

@SugarRayLua Please try dig @1.1.1.1 duckduckgo.com and see if it times out. If it does, your VM’s IP settings air configuration are incorrect (try disabling the networking, start the VM and shut down again, the enable the network card again). If it doesn’t time out, your DNS settings are at fault.

SugarRayLua commented 2 years ago

@conath , thanks so much— I got it working after realizing your point that one can try enabling and disabling the network card to see if that resets something to get the network working again (sorry I didn’t think to try something that basic on my own). I couldn’t actually dig since dig isn’t part of the baseline Debian installations, and since I couldn’t get a fully functioning network connection, I couldn’t download dig. However, it turned out that when I went to try out both Debian ARM VMs today, all of sudden the internet connections were working, and I could finish downloading all repositories and packages I needed (Debian 10 and Debian 11 VM). It seems like there must be some software configuration that sometimes gets unexpectedly changed on the VMs that disables full function from the network card; if I seem to recall in the past the same thing has happened around the time I was installing a new VM (which I was also doing over the weekend when this happen). No other variables had changed— was on my same home Wifi and later my same iPad Verizon 5G cellular network, and my VM internet couldn’t work fully with either of them (despite my iPad host being able to use the internet fine on both networks) and turning on and off my iPad (but not the network card). Yet, today when I turned on the iPad and went to try your suggestions on the same Verizon 5G network, the internet was fully working without my making any changes. My take home message from this and your and advice and for others then is:

If internet suddenly seems to not be working in the VM but is working in the host, and one hasn’t changed any of the VM setting, try resetting the network card as you mentioned.

Have a good night and rest of your week.

mondimohamed commented 2 years ago

turn off the guest firewall , it works with me

ncastrohub commented 1 year ago

Hi everyone, I know it is a closed discussion, but I could connect to a simple python HTTP server inside my windows11 arm UTM VM running in a M1 Pro machine. I disabled the firewall inside the VM and the IP is the ipv4 address that you can see inside your windows11 VM

I hope this helps anyone because I didn't find this simple example on any other discussion or site

Sorry again if this is considered spam is my case was http://192.168.64.2 and the port 8080

image
richard-aoede commented 7 months ago

For me, had problems with VPN. When I turn off VPN it allows me to access internet. If VPN on, I get 100% packet loss.

For my use case, Network Mode: Bridged Connection worked best rather than the Emulated VLAN

My issue discussed here: https://github.com/utmapp/UTM/issues/3238

In the top-right settings!

image