How to add alias to guest VM in mac hosts file

Discussion in 'Installation and Configuration of Parallels Desktop' started by VicC, Dec 26, 2020.

  1. VicC

    VicC Bit poster

    Messages:
    7
    i am using parallels desktop 16 and have a windows 10 vm. I have a project running under visual studio on the windows vm for which I have set up a local alias. The vm is using shared networking.

    Adding the local alias to the windows host file is no issue. so it looks like

    10.x.x.x name.local

    I am running vs code on the mac and want to access the windows hosted server via the same local alias.

    The mac hosts file looks something like

    10.211.x.x windows-10-prof-visual-studio.shared windows-10-prof-visual-studio name.local #prl_hostonly shared

    I understand this entry gets added/removed to/from the mac hosts file revery time the VM is started and stopped, but it also seems to periodically refresh when the VM is up. So if I add name.local as an alias in the mac hosts, it gets removed again and again.

    Is there any way I can set this up once and keep the same line in the mac hosts file across restarts of the VM without losing my edits?
     
    Sulaiman1 likes this.

Share This Page