How to set ip address
Hello! How do I assign an IP address to a virtual machine? For example, I may have the address 10.243.212.112 distributed to a guest machine on my host machine. How do I assign it?
The VM framework is assigning IP addresses automatically in the 192.168.64/24 subnet, so the VM is accessible at 192.168.64.xx where xx is incremental. You can find the IP address with arp -an. By default everything else is NATed so the guest can reach to the host and outside.
If you need a more complex networking setup, then you can use the unix target -- have a look at the slirp proxy (see networking in the README) which can give you a lot more control about how you expose the guest.
Can you show an example of how to run with a unix parameter?
For example, i run ./slirp_unix -p /opt/Management/macosvm/etalon -f 12345:12345
Then I run my vm: macosvm --net unix:"/opt/Management/macosvm/etalon" -g vm_sonoma.json
How can i get access into my vm from outside network?
In your example above simply with host:12345 where host is the IP address of the host since the proxy is proxying all traffic on the 12345 port to the VM.
For example, if you use slirp_unix -f 1022:22 then ssh -p 1022 host from the outside will connect to the ssh of VM instead of the host.