VMware Horizon Community
cjabates
Contributor
Contributor
Jump to solution

update Windows 'hosts' file w/ AppStack?

I've got one group of users that need to have additional entries in the hosts file on their View workstations to support the applications installed.

I made the changes to the hosts file when I created the AppStack, but when it attaches, the VDI doesn't refer to the 'new' hosts file.  Instead, it uses the original file, now named 'hosts.bak'.  I figured that out by adding a couple of the entries into the hosts.bak file and testing.

The users won't have that option (they aren't admins), so does anyone have a suggestion on getting the 'new' hosts file to be read by the system after the AppStack attaches?

AppVolumes 2.10

UEM 9.1

Win10 x64 build 1511

0 Kudos
1 Solution

Accepted Solutions
fdrietatns
Enthusiast
Enthusiast
Jump to solution

So your appstack has 'hosts' and 'hosts.bak'? Is there a need to have the hosts.bak? The original hosts file is all commented out anyway.

I just made an appstack that makes the hosts file r/w for everyone and it works fine.

Did you issue a ipconfig /flushdns on those machines? Any change to a host file for an address that has already been visited won't take effect until the DNS cache is cleared.

# I changed google.com to go to 127.0.0.1 in my host appstack

Pinging google.com [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

View solution in original post

0 Kudos
3 Replies
fdrietatns
Enthusiast
Enthusiast
Jump to solution

So your appstack has 'hosts' and 'hosts.bak'? Is there a need to have the hosts.bak? The original hosts file is all commented out anyway.

I just made an appstack that makes the hosts file r/w for everyone and it works fine.

Did you issue a ipconfig /flushdns on those machines? Any change to a host file for an address that has already been visited won't take effect until the DNS cache is cleared.

# I changed google.com to go to 127.0.0.1 in my host appstack

Pinging google.com [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

0 Kudos
cjabates
Contributor
Contributor
Jump to solution

Apparently, the  hosts.bak file is rebuilt by Windows, as I had removed it during a test, and after a reboot of the provisioning box it returned.

@fdrietatns-

Your suggestion to do 'ipconfig /flushdns' did the trick, though.  Once I did that, the entries in the hosts file started being read.

Thanks.

0 Kudos
fdrietatns
Enthusiast
Enthusiast
Jump to solution

Great!

In case you're not aware,

You can have the AppStack run the ipconfig command when it attaches by adding it to one of the volume's batch files.

I'd recommend shellstart.bat.

0 Kudos