Skip to main content

Using broadband and dynamic IP and DDNS with VMware View 5.x 6.x

If you are planning or designing VMware View with remote access, you would need to install and configure the VMware Security server. However, when configuring the View, you will need to key in the public IP address on the PCOIP External URL (as showed below).


In most cases, corporate would have fixed public IP address for the VDI deployment. If you still want to proceed without fixed public IP address, or leveraging broadband services, you will always need to update the public IP address when it's changed. So, in order to reduce the manual overhead, you can always write a simple script to automate the changes. I've wrote a simple Powershell script that update the public IP address and it will sleep every 15 minutes and continue again.

Below is the Powershell script. Copy and paste in a text file rename with .ps1.

#=====Script start========
while (1 -eq 1) {

# PowerShell If Statement To Test Ip Addresses
$Ip4th = "bigcloud.ddns.net"


$exPCoIP = Get-ConnectionBroker HORIZON02 | Select-object externalPCoIPURL

$Pingy = Get-WmiObject Win32_PingStatus -f "Address='$Ip4th'"

If($Pingy.StatusCode -eq 0) {
$BIGCLOUDIP = $Pingy.ProtocolAddress + ":4172"

If ($exPCoIP.externalPCoIPURL.ToString() -eq $BIGCLOUDIP) {

Write-Host $(get-date -f MM-dd-yyyy_HH_mm_ss) ": IP Address has not changed-" $BIGCLOUDIP
}

else {

Update-ConnectionBroker -broker_id HORIZON02 -ExternalPCoIPUrl $BIGCLOUDIP
Write-Host $(get-date -f MM-dd-yyyy_HH_mm_ss) ": IP Address Changed-" $BIGCLOUDIP
}


}
else
  {Echo "Failed"
   }

start-sleep -seconds 300
# Update every 5 minutes
       
}    

#=====Script end========

In order to run this powershell ps1 file, you need to run in the powershell command prompt. Launch the powershell and run this command first to add the VMware View PowerCLI in to the shell.


Now, you can run the ps1 file with powershell as shown below.


I've set the sleep timeout 5 minutes. Obviously, you might want to set it longer due to the DNS TTL. You can further improve this by resetting the DNS cache if needed.




Comments

Popular posts from this blog

VMware VRNI 3.5 NTP is working but not healthy

We have experienced this problem where some of the major services not started. You will not be able to connect to the vRNI via web -> https://<ip_address_of_vrni_platform>>. This probably caused by NTP insync. You need to manually start these services. Login with Consoleuser / and default password if not changed before via venter web console. Run services restart and wait for couple minutes (it took me 5-6 mins). Types of Users  User name  Password  Admin UI  admin@local Set this password in the Activate License window during installation. SSH User  support ark1nc0113ct0r CLI User  consoleuser ark1nc0ns0l3 Note It is recommended that the users change the default passwords immediately after the deployment.  Procedure 1 Navigate to  https://<vRealize Network Insight Platform IP address> .  2 Log in to the product UI with the corresponding user name and password. ...

Packaging MS Office 2013 Professional Plus with Thinapp 4.7.3

I can't find the link to package MS Office 2013 but only MS Office 2010 as here . I'm packaging MS Office 2013 the same way MS office 2010 did and it works. Some notes to be taken:- Always run the thinapp with local administrator privilege. Make sure you modify the config.xml (located on proplusr.ww folder), save it and run the setup in command prompt, e.g.. setup.exe /config c:\tmp\config.xml I will choose to run thinapp with VMware Fusion/Workstation with SSD and snapshot. This will allow you to easily revert the snapshot anytime you like. Since the whole Office will be packaged, always select option "Run all from my computer" Always remember to run the application a couple times after installation Always remember to activate the license before proceeding with post-scan I've not installed .net framework as suggested by some blog and the Office 2013 is working. I will run the application and testing to see how it goes. So far, I've thinapp MS o...

vSphere Replication - checking the replication status

Enable SSH on ESXi host (you can do this using vCenter) Download putty or any SSH client and log in with root access vim-cmd vmsvc/getallvms ~ # vim-cmd hbrsvc Commands available under hbrsvc/: vmreplica.abort vmreplica.pause vmreplica.create vmreplica.queryReplicationState vmreplica.disable vmreplica.reconfig vmreplica.diskDisable vmreplica.resume vmreplica.diskEnable vmreplica.startOfflineInstance vmreplica.enable vmreplica.stopOfflineInstance vmreplica.getConfig vmreplica.sync vmreplica.getState  See more at: http://www.virtuallyghetto.com/2011/07/hbr-host-based-replication-cli-for-srm.html#sthash.mpqbyGmw.dpuf http://www.virtuallyghetto.com/2011/07/hbr-host-based-replication-cli-for-srm.html