VMware Horizon Community
mclark
Expert
Expert

Static IP question

I need to set static IPs for certain users (not based on machines). Up to now I have been using linked clones with a dedicated user assignment, running a script at login for the specific users that sets the IP and reboots the machine if necessary. That works fine. Now, I am testing the use of Persona Management with floating desktops rather than dedicated assignments. I will need to set the static IP for whichever desktop is given to these users each time. Is there some way to set the static IP once the user logs in, then disconnect the session (leaving them logged in) and then just let them connect again getting their desktop with the static IP? Is there any other way to do this that would work better? This process is completely based on the user logging in, not based on the computer. Each user has a specific IP they need, which lets them through the network firewall to the services they need. I have logged in and tried running a script that changes the IP, then disconnecting from the session (not logging out) and logging in again, but the desktop goes to "Agent Unreachable" in View Manager and the user is given a different desktop.

Reply
0 Kudos
4 Replies
Sergei13
Enthusiast
Enthusiast

Hi,

I have the exact same problem as you do (don't help you much so far Smiley Wink).

I have been testing a few combinations of mix between 2nd network card, scripts (gpo and vmwaretoolboxcmd) and sysprep parameters.

Unfortunattely, the sysprep doesn't leave many options since it enables all the network cards and reset the names to default values.

Also I didn't manage yet to clearly identify in which order the processes are run between toolbox scripts and gposand when the poweron script was run.

All together I get something that works connected as an admin and running the scripts manually. Automatically this is a different story.

The solution that got me the closest is based on a 2nd network card and scripts to disable it and then based on username enable and set the ip .

Unfortunetally, in that scenario, I didn't manage to identify which nic holds the communication between the vm and the server which means connection lost ! :smileyangry:

Apparently, there would some registry key to set the nic the agent should be using that would let playing with the 2nd. I didn't manage to find yet any doc on this.

I should be running some more tests tomorrow and hope to come back with good news !!!

Cheers

S

Reply
0 Kudos
Sergei13
Enthusiast
Enthusiast

OK, nearly there !!!!

The registry key is of no help for me because specify the subnet for the discussion between the VM and the server. Since in my case, this is the same on both cards ...

So this is where I am now.

1) Sysprep enables both network card. There are both set in dhcp mode.

2) poweron script with vmwaretoolboxcmd to disable the 2nd network card (not really sure when this is executed but looks OK)

3) GPO with a script that

   a) checks the existing IP address

   b) activates the 2nd network card

   c) browse the netcards looking for the one with a different Ip address than the one already seen.

   d) changes the IP address of the identified network card based on the %username%

This works, but only if I am connected as a user with admin rights on the VM, otherwise Smiley Sad

I just "need" now to find a way to run this user's GPO script with some privileges and it should be :smileycool:

Cheers

mclark
Expert
Expert

Thanks for sharing your progress. When you get something fully working, I hope you'll consider sharing a step-by-step document/list along with any scripts/settings/etc., if you can. I'd like to give it a try here.

Reply
0 Kudos
Sergei13
Enthusiast
Enthusiast

I eventually managed to get something working !!!

http://communities.vmware.com/message/1847081

Cheers

S

Reply
0 Kudos