VMware Horizon Community
Sergei13
Enthusiast
Enthusiast

Change IP Address at login

Hi,

I am almost done with the packaging of my View  masters and ThinApp applications and I am now facing a srtong challenge.

A couple of Apps I have packged with ThinApp require fixed IP address. Since all my desktop are linked clones with DHCP configured, I was wondering if there was a way to change the IP address of the workstation once connected and push it to the broker, without breaking the connection between the client and the VM ?

The only other option I see is to set full VMs with fixed IP address so my applications work, but I don't see that as preally pretty. Do I have the choice ? How do you deal with that requirement ?

Many thanks in advance for your inputs

0 Kudos
5 Replies
Sergei13
Enthusiast
Enthusiast

OK, so this is where I stand now.

I have tried different solutions but I am always stuck with the agent updating its configuration back to the Broker.

I have a script that switches from DHCP to static IP address, I have also tried with 2 nic and I activate the 2nd depending on the user signing in etc but I am loosing the link between the the VM and the broker.

I tried stop/start the wsnm service to force the communication back to the broker, no luck.Once the address has been changed, the machine shows agent unreachable

Other options I am looking at :

- Since my dhcp can allow forcing IP based on mac address, if there a way to set a pool of mac addresses the compose would dig into when creating the linked clones ?

- running a script (powershell ?) that would force some machines with Ip addresses and assign then thru vdmadmin to specific users

- ?

Any input on the agent or considered options would be more that welcome.

0 Kudos
Meph1234
Enthusiast
Enthusiast

Hi,

I was thinking of your plan about having two nics. This can be done.

what you need to do is add a registry entry to the virtual machine. (Taken from the view 4.5 ICM training materials)

"HKLM\Software\VMware, Inc.\VMware VDM\Node Manager" set the subent subkey to n.n.n.n/m

n.n.n.n is the subnet

m is the number of bits in the subnet

Example

subnet 192.168.100.0/24

does that help you out?

Cheers

Phil

VCA4-DT
0 Kudos
Sergei13
Enthusiast
Enthusiast

Phil,

Thank you for your input, I feel less lonely now Smiley Happy

I'm assuming that the issue with playing with nics is that the manager looses the connexion to the linked clone and therefor can't allow connecting to it anymore. In that particular scenario, I am lokking for a way to re establish the connexion between the broker and the vm or to force the vm to say hey, I am back but with a different IP (even if I guess this is connect to stop the user's connexion who will have to connect again :smileyconfused: )

This is why I am also looking the possibility to do some changes to the VM once generated but before users connect to it

Thanks.

0 Kudos
Sergei13
Enthusiast
Enthusiast

:smileylaugh:Smiley Happy:smileylaugh::smileysilly::smileycool:

I HAVE IT !!!!

After more than a week spent on it, I got it to work.

When I'll have time to clean up my code with the stuff specific to my company, I will put some script here but this is how I got it to work.

1) 2nd network card on the master (no matter what you do, sysprep will enable it en rename it)

2) power on script with vmwaretoolboxcmd to disable the 2nd network card

3) GPO runnning a user logon script that

3.1 copy a \\my.domain.com\netlogon vbs script to the local temp directory (otheriwse nasty prompt to request authorization to run it)

3.2 runs the vbs thru psexec in order to use admin credentials (psexec.exe -accepteula -e -u domain\admin -p %1 cmd.exe /c %TEMP%\ipfixe.vbs %USERNAME%)

3.3 delete the script (not sure this is required but just in case ...)

The admin account is in the script, the password given as a parameter to the script in the GPO.

It is important to pass the %USERNAME% as a parameter to the vbs script otherwise it will be the admin taken into account.

This has been tested only with Windows XP SP3. The scripts are language dependant due to the way to access the network cards and their folder.

That works well, display a dos window and then a message box quoting "An atemp to connect is already taking place" or something like that, but it goes away after a couple of seconds.

This is the only way I found to set a static Ip address on a linked clone based on the user and not to cut off the connection between the VM and the client.

Smiley Happy

0 Kudos
mclark
Expert
Expert

This is great news! I am VERY interested in seeing some scripts, step-by-step detailed instructions, etc. that I could use to try to set this up also. If you are willing to share that would be awesome!

0 Kudos