When using UTM on a Mac with a Ubuntu guest in it, I need to obtain the host IP address (of my Mac) from the guest to mount its file system by sshfs (or any other mount). It runs UTM based on QEMU. I searched the internet on it, but only found the other way around: the guest IP address which is easy.
Asked
Active
Viewed 1,355 times
1
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 20 '22 at 10:22
-
You could write the IP address of the host into a file & mount the file onto guest os? – harshavmb Mar 20 '22 at 11:12
-
Why not use the hostname instead of the IP? – mashuptwice Mar 20 '22 at 12:10
1 Answers
0
I can think of a couple of options here::
- Write the IP address of the host into a file & mount the file onto guest OS
- Install hypervisor-specific RPMs on guest VM like
vmtoolsdfor VMware,hypervkvpdfor HyperV, etc., With these packages, you could fetch a few required attributes from a host like a hostname, IP address, etc.,
harshavmb
- 121
- 1
- 4
-
1Indeed using a hostname like `hostname.local` works, as this is always visible within the same network, as long I use 'bridged network' in UTM / QEMU or VirtualBox (the latter on an Intel Mac). – user513667 Mar 20 '22 at 21:20