How does the physical machine access the server on the virtual machine?

my server is arranged on the ubuntu of the virtual machine. I want to use the client on the physical machine to connect to the server. How should I set it?

the bridging network has been set up, but it failed to get the ip of the virtual machine through ifconfig to access the localhost of the virtual machine.
the ifconfig in the virtual machine is as follows:

localhos:8899


is the port not open?


know to do this: first set the connection method to network address translation, and then set the specific port and IP in port forwarding


can you elaborate on it? I also encountered this problem

Menu