6.1.1
Table Of Contents
- Setting Up Horizon 6 for Linux Desktops
- Contents
- Setting Up Horizon 6 for Linux Desktops
- Installing and Configuring Horizon 6 for Linux Desktops
- Configuring Linux Machines for vDGA
- Bulk Deployment of Horizon 6 for Linux Desktops
- Overview of Bulk Deployment of Linux Desktops
- Create a Virtual Machine Template for Cloning Linux Desktop Machines
- Input File for the Sample PowerCLI Scripts to Deploy Linux Desktops
- Sample PowerCLI Script to Clone Linux Desktop Machines
- Sample PowerCLI Script to Install View Agent on Linux Desktops
- Sample PowerCLI Script to Uninstall View Agent on Linux Desktops
- Sample PowerCLI Script to Perform Operations on Linux Desktop Machines
- Administering Horizon 6 for Linux Desktops
- Uninstalling and Reinstalling Horizon 6 for Linux Machines
- Configure Lossless PNG Images on Linux Desktops
- Suppress the vSphere Console Display of a Linux Desktop
- Configure a Left-handed Mouse on Ubuntu Desktops
- How to Perform Power Operations on Linux Desktops from vSphere
- Gather Information About Horizon 6 for Linux Software
- Troubleshooting Horizon 6 for Linux
- Collect Diagnostic Information for a Horizon 6 for Linux Machine
- Troubleshooting View Agent Registration Failure for a Linux Machine
- Troubleshooting an Unreachable View Agent on a Linux Machine
- Troubleshooting View Agent on a Linux Machine That Is Not Responding
- Configuring the Linux Firewall to Allow Incoming TCP Connections
- Index
}
#------------------------- Main Script ---------------
$vcAddress = Read-Host 'Your vCenter address'
$vcAdmin = Read-Host 'Your vCenter admin user name'
$vcPassword = Read-Host 'Your vCenter admin user password' -AsSecureString
$vcPassword =
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStrin
gToBSTR($vcPassword))
$cloneType = Read-Host 'Clone Type ("linked" or "full") '
$disableVMConsole = Read-Host 'Disable vSphere VM Console ("yes" or "no", recommend "yes") '
$csvFile = '.\CloneVMs.csv'
# Check that user passed only linked or full clone
if (($CloneType.length >0) -and ($CloneType -ne "linked" -or $CloneType -ne "full"))
{
write-host -ForeGroundColor Red "Clone type supports only 'linked' or 'full' (case
sensitive)"
exit
}
if (($disableVMConsole.length >0) -and ($disableVMConsole -ne "yes" -or $disableVMConsole -ne
"no"))
{
write-host -ForeGroundColor Red "Disable vSphere VM Console supports only 'yes' or 'no'
(case sensitive)"
exit
}
#check if file exists
if (!(Test-Path $csvFile))
{
write-host -ForeGroundColor Red "CSV File $CSVFile not found"
exit
}
# Connect to the VC (Parameterize VC)
#Write-Host "DisConnecting Previous Connections"
#Disconnect-VIServer * -Confirm:$false -ErrorAction SilentlyContinue
Write-Host "Connecting to VC $vcAddress"
Connect-VIServer $vcAddress -ErrorAction Stop -user $vcAdmin -password $vcPassword
#Read input CSV file
$csvData = Import-CSV $csvFile
#$csvData = Import-CSV $csvFile -
header("VMName","Parentvm","CustomSpec","Datastore","Host","FromSnapshot","DeleteIfPresent")
foreach ($line in $csvData)
{
$destVMName=$line.VMName
$srcVM = $line.Parentvm
$cSpec = $line.CustomSpec
$targetDSName = $line.Datastore
$destHost = $line.Host
$srcSnapshot = $line.FromSnapshot
Chapter 3 Bulk Deployment of Horizon 6 for Linux Desktops
VMware, Inc. 27