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

Unclear when to use port forwarding and what the network modes mean #3342

Open
adagioNeo opened this issue Nov 26, 2021 · 9 comments
Open

Unclear when to use port forwarding and what the network modes mean #3342

adagioNeo opened this issue Nov 26, 2021 · 9 comments
Labels
interface Design, UX/UI issues

Comments

@adagioNeo
Copy link

adagioNeo commented Nov 26, 2021

UTM is awesome but the Guest to Host as well as Host to Guest seem to have issues when connecting, and there is no proper documentation since I am using it in my new M1 Mac

I am trying to run docker in ubuntu since I cannot run x86_64 based images on my PC. I wanted to use UTM for running docker containers in Guest OS on a specific port (Eg: 8000) and access this service from the HOST OS (viz, MacOS). Even though I got the docker container to be Up and Healthy, the services are not accessible by the Host OS, I have tried almost all configuration and don't seem to find any resolution

@conath
Copy link
Contributor

conath commented Nov 28, 2021

If you choose "bridged" network mode, your VM will get an IP on your Mac's LAN and you will need to access your guest's services via that IP.

It you choose "emulated VLAN" network mode, the VM will get a virtual LAN and IP in the 10.0.2.X range. To access services in it you will need to use the Port Forwarding section in the Network config.

Hope this helps! Agree on lack of documentation for this.

@conath conath changed the title Setting Bridged, Shared or Emulated VLAN don't seem to work for port forwarding Unclear when to use port forwarding and what the network modes mean Nov 28, 2021
@conath conath added the interface Design, UX/UI issues label Nov 28, 2021
@adagioNeo
Copy link
Author

adagioNeo commented Nov 29, 2021

So I have Ubuntu 18 Server version installed in my UTM

  • when using emulated LAN, I run docker run -p 2000:xxxx image and forwarding Ports :3000(host) to :2000(Guest) throws the docker to Unhealthy status.
  • when using Bridged LAN, the VM crashes sometimes with QEMU crashed unexpectedly error when I run the docker, other times docker container just goes into Exited status

@conath
Copy link
Contributor

conath commented Nov 30, 2021

@adagioNeo Thanks for testing the network modes.

Please create a new issue for each of the new problems, including logs from Docker, QEMU crash log (if available) and UTM Debug Log. Regarding the Bridged Mode: please include in your issue whether the crash/exited happens randomly or depending on what steps you take in the guest. Thank you!

@ap46281
Copy link

ap46281 commented Jun 6, 2022

It you choose "emulated VLAN" network mode, the VM will get a virtual LAN and IP in the 10.0.2.X range. To access services in it you will need to use the Port Forwarding section in the Network config.

When you say "to access services in it," what does that entail? I see where IP Configuration and Port Forward is in Network Settings, but what would I change 10.02.XX to to actually connect?

@unphased
Copy link

@conath Can you describe what the difference is between "Emulated VLAN" and "Shared Network"?

@conath
Copy link
Contributor

conath commented Jul 1, 2022

@unphased If you choose "bridged" network mode, your VM will get an IP on your Mac's LAN and you will need to access your guest's services via that IP.

If you choose "shared" network mode, your VM will get a private IP in a virtual subnet, but will be able to access the host and the internet. It will not be visible to other computers on the host LAN and vice versa.

It you choose "emulated VLAN" network mode (QEMU backend only), the VM will get a virtual LAN and IP in the 10.0.2.X range. To access services in it you will need to use the Port Forwarding section in the Network config.

@martinsagat
Copy link

I am running Ubuntu 22.04 on the new Mac M1 via UTM, and when I connect to VPN via Open VPN, on my physical machine, it does not share the connection with the Ubuntu VM, any idea how this can be achieved? Cheers

@GeoSD
Copy link

GeoSD commented Jan 30, 2023

I am running Ubuntu 22.04 on the new Mac M1 via UTM, and when I connect to VPN via Open VPN, on my physical machine, it does not share the connection with the Ubuntu VM, any idea how this can be achieved? Cheers

Hey! Did you find any solution? I'm totally stuck with this issue. At this moment I'm trying to use emulated VLAN, but looks like it works intermittently. And another issue is I'm not able to reach my VM server from local (WiFi) network.
That is drive me crazy, so I'm almost buy mini-PC for this purpose.

@david11yf29
Copy link

david11yf29 commented Dec 11, 2023

I am running Ubuntu 22.04 on the new Mac M1 via UTM, and when I connect to VPN via Open VPN, on my physical machine, it does not share the connection with the Ubuntu VM, any idea how this can be achieved? Cheers

This is what I found on the website CLICK which works for me for ssh connection from my M1 terminal after I set up a ubuntu virtual machine through UTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface Design, UX/UI issues
Projects
None yet
Development

No branches or pull requests

7 participants