utmapp / UTM

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

Clarify "Shared network" #6568

Open nirs opened 3 weeks ago

nirs commented 3 weeks ago

Describe the issue

According to network-mode:

Traffic is routed directly by the host operating system and the guest shares a VLAN with the host. Services running on the guest and the host can see each other without additional configuration. This is recommended for new virtual machines.

The docs do no not mention access between VMs, but the term Shared Network is a hint that this should work.

I'm trying to access one VM from another VM, using Apple virtualization in both, and it looks like there this works only with Bridged network. Is this expected?

When both vms are using Shared network, I can access the VM from the host, or the host from the VM, but I cannot access to another VM (tested with iperf3).

When both VMs are using Bridged network, I have have network access between the VMs.

Is shared network using VZNATNetworkDeviceAttachment and bridged network using VZBridgedNetworkDeviceAttachment? In this case it is clear why this does not work.

This looks like a documentation issue, the docs should help users that need access between VMs to choose the right network mode.

Also the Network page for a VM could have a simple description of each mode, or a link to the section in the docs for each type. The only thing we have is "Shared Network" and "Bridged (advanced)". These names do not help users that do not know the way networking is implemented in UTM.

Configuration

osy commented 3 weeks ago

Is shared network using VZNATNetworkDeviceAttachment and bridged network using VZBridgedNetworkDeviceAttachment? In this case it is clear why this does not work.

This is true

Also the Network page for a VM could have a simple description of each mode, or a link to the section in the docs for each type. The only thing we have is "Shared Network" and "Bridged (advanced)". These names do not help users that do not know the way networking is implemented in UTM.

What would you recommend the names be?

nirs commented 3 weeks ago

Also the Network page for a VM could have a simple description of each mode, or a link to the section in the docs for each type. The only thing we have is "Shared Network" and "Bridged (advanced)". These names do not help users that do not know the way networking is implemented in UTM.

What would you recommend the names be?

Bridged is pretty good name, it described the network and it matches names used in other projects like libvirt. A short description can help people that need more help. For longer description a link to the docs would be useful.

Shared network is confusing since in other projects (e.g. lima) this is used to create user network providing access from host to vms and from vm to vm (like bridge, but 30 times slower). We can call it NAT (matching the underlying implementation) but I don't know if this will be more helpful to most users. Also in Libvirt NAT is used to describe an local network (192.168.122.0/24) allowing access from host to vms and between vms, so NAT can create more confusion. Since the name is more confusing, adding short description in the dialog is even more important.

When a user selects the network, they need to know the differences. Can I access the one vm from another? can I access a vm from another machine? The dialog should make this clear.

The dialog has lot of whitespace so adding a short description of the selected network mode is possible. Adding a (?) button linking to the docs or local help will be familiar to users.