Maths -2

Horizon View reports – PowerShell GUI

Objective: Develope GUI tool to prepare report View pools

view gui11

Coding as mentioned below:

# Load Assemblies

[System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)

[System.Reflection.Assembly]::LoadWithPartialName(“System.Drawing”)

 

# Init Form

$Form = New-Object System.Windows.Forms.Form

$Form.width = 750

$Form.height = 400

$Form.Text = “View Pools Usage”

#$Image = [system.drawing.image]::FromFile(“c:\TEMP\test.jpg”)

#$Form.BackgroundImage = $Image

 

# Init ProgressBar

#$pbrTest = New-Object System.Windows.Forms.ProgressBar

#$pbrTest.Maximum = 100

#$pbrTest.Minimum = 0

#$pbrTest.Location = new-object System.Drawing.Size(10,10)

#$pbrTest.size = new-object System.Drawing.Size(100,50)

#$i = 0

#$Form.Controls.Add($pbrTest)

 

# Button

$btnConfirm1 = new-object System.Windows.Forms.Button

$btnConfirm1.Location = new-object System.Drawing.Size(120,10)

$btnConfirm1.Size = new-object System.Drawing.Size(100,30)

$btnConfirm1.Text = “January”

$Form.Controls.Add($btnConfirm1)

 

#Button2

$btnConfirm2 = new-object System.Windows.Forms.Button

$btnConfirm2.Location = new-object System.Drawing.Size(220,10)

$btnConfirm2.Size = new-object System.Drawing.Size(100,30)

$btnConfirm2.Text = “Febraury”

$Form.Controls.Add($btnConfirm2)

 

#Button3

$btnConfirm3 = new-object System.Windows.Forms.Button

$btnConfirm3.Location = new-object System.Drawing.Size(320,10)

$btnConfirm3.Size = new-object System.Drawing.Size(100,30)

$btnConfirm3.Text = “March”

$Form.Controls.Add($btnConfirm3)

 

#Button4

$btnConfirm4 = new-object System.Windows.Forms.Button

$btnConfirm4.Location = new-object System.Drawing.Size(420,10)

$btnConfirm4.Size = new-object System.Drawing.Size(100,30)

$btnConfirm4.Text = “APRIL”

$Form.Controls.Add($btnConfirm4)

 

#Button5

$btnConfirm5 = new-object System.Windows.Forms.Button

$btnConfirm5.Location = new-object System.Drawing.Size(520,10)

$btnConfirm5.Size = new-object System.Drawing.Size(100,30)

$btnConfirm5.Text = “MAY”

$Form.Controls.Add($btnConfirm5)

 

#Button6

$btnConfirm6 = new-object System.Windows.Forms.Button

$btnConfirm6.Location = new-object System.Drawing.Size(620,10)

$btnConfirm6.Size = new-object System.Drawing.Size(100,30)

$btnConfirm6.Text = “June”

$Form.Controls.Add($btnConfirm6)

 

 

#Label1

$label1 = New-Object System.Windows.Forms.Label

$label1.Location = new-object System.Drawing.Size(10,10)

$label1.Size = new-object System.Drawing.Size(100,50)

#$label1.Name = “label1”

#$label1.TabIndex = 1

$label1.Font = ‘Bookman Old Style, 9.75pt, style=Bold’

$label1.ForeColor

$label1.Text = “VIEW POOLS      USAGE”

$Form.Controls.Add($label1)

 

#====================================================

 

# Button

$btnConfirm11 = new-object System.Windows.Forms.Button

$btnConfirm11.Location = new-object System.Drawing.Size(120,60)

$btnConfirm11.Size = new-object System.Drawing.Size(100,30)

$btnConfirm11.Text = “January”

$Form.Controls.Add($btnConfirm11)

 

#Button2

$btnConfirm12 = new-object System.Windows.Forms.Button

$btnConfirm12.Location = new-object System.Drawing.Size(220,60)

$btnConfirm12.Size = new-object System.Drawing.Size(100,30)

$btnConfirm12.Text = “Febraury”

$Form.Controls.Add($btnConfirm12)

 

#Button3

$btnConfirm13 = new-object System.Windows.Forms.Button

$btnConfirm13.Location = new-object System.Drawing.Size(320,60)

$btnConfirm13.Size = new-object System.Drawing.Size(100,30)

$btnConfirm13.Text = “March”

$Form.Controls.Add($btnConfirm13)

 

#Button4

$btnConfirm14 = new-object System.Windows.Forms.Button

$btnConfirm14.Location = new-object System.Drawing.Size(420,60)

$btnConfirm14.Size = new-object System.Drawing.Size(100,30)

$btnConfirm14.Text = “APRIL”

$Form.Controls.Add($btnConfirm14)

 

#Button5

$btnConfirm15 = new-object System.Windows.Forms.Button

$btnConfirm15.Location = new-object System.Drawing.Size(520,60)

$btnConfirm15.Size = new-object System.Drawing.Size(100,30)

$btnConfirm15.Text = “MAY”

$Form.Controls.Add($btnConfirm15)

 

#Button6

$btnConfirm16 = new-object System.Windows.Forms.Button

$btnConfirm16.Location = new-object System.Drawing.Size(620,60)

$btnConfirm16.Size = new-object System.Drawing.Size(100,30)

$btnConfirm16.Text = “June”

$Form.Controls.Add($btnConfirm16)

 

#Label1

$label1 = New-Object System.Windows.Forms.Label

$label1.Location = new-object System.Drawing.Size(10,60)

$label1.Size = new-object System.Drawing.Size(100,50)

#$label1.Name = “label1”

#$label1.TabIndex = 1

$label1.Font = ‘Bookman Old Style, 9.75pt, style=Bold’

$label1.ForeColor

$label1.Text = “VIEW POOL       USERS”

$Form.Controls.Add($label1)

 

 

#====================================================

 

#Button

$btnConfirm111 = new-object System.Windows.Forms.Button

$btnConfirm111.Location = new-object System.Drawing.Size(280,150)

$btnConfirm111.Size = new-object System.Drawing.Size(280,100)

$btnConfirm111.Text = ”            ALL VIEW POOLS                                POOLS USAGE SINCE JAN             POOLS NEVER USED SINCE JAN ”

$btnconfirm111.Font = ‘Bookman Old Style, 9.75pt, style=Bold’

$Form.Controls.Add($btnConfirm111)

 

#Button2

 

#$btnConfirm112 = new-object System.Windows.Forms.Button

#$btnConfirm112.Location = new-object System.Drawing.Size(420,350)

#$btnConfirm112.Size = new-object System.Drawing.Size(200,50)

#$btnConfirm112.Text = “sss”

#$Form.Controls.Add($btnConfirm112)

 

#Button3

 

#$btnConfirm113 = new-object System.Windows.Forms.Button

#$btnConfirm113.Location = new-object System.Drawing.Size(420,150)

#$btnConfirm113.Size = new-object System.Drawing.Size(200,50)

#$btnConfirm113.Text = “POOLS ACCESSED SINCE JAN”

#$Form.Controls.Add($btnConfirm113)

 

#Button4

#$btnConfirm114 = new-object System.Windows.Forms.Button

#$btnConfirm114.Location = new-object System.Drawing.Size(280,220)

#$btnConfirm114.Size = new-object System.Drawing.Size(200,50)

#$btnConfirm114.Text = “POOLS NOT ACCESSED SINCE JAN”

#$Form.Controls.Add($btnConfirm114)

 

#Button5

#$btnConfirm115 = new-object System.Windows.Forms.Button

#$btnConfirm115.Location = new-object System.Drawing.Size(520,110)

#$btnConfirm115.Size = new-object System.Drawing.Size(100,30)

#$btnConfirm115.Text = “MAY”

#$Form.Controls.Add($btnConfirm115)

 

#Button6

#$btnConfirm116 = new-object System.Windows.Forms.Button

#$btnConfirm116.Location = new-object System.Drawing.Size(620,110)

#$btnConfirm116.Size = new-object System.Drawing.Size(100,30)

#$btnConfirm116.Text = “June”

#$Form.Controls.Add($btnConfirm116)

 

#Label1

$label1 = New-Object System.Windows.Forms.Label

$label1.Location = new-object System.Drawing.Size(375,110)

$label1.Size = new-object System.Drawing.Size(100,100)

#$label1.Name = “label1”

#$label1.TabIndex = 1

$label1.Font = ‘Bookman Old Style, 9.75pt, style=Bold’

$label1.ForeColor

$label1.Text = “SUMMARY”

$Form.Controls.Add($label1)

 

 

#=====================================================

 

$groupbox1 = New-Object System.Windows.Forms.GroupBox

$radiobutton3 = New-Object System.Windows.Forms.RadioButton

$radiobutton2 = New-Object System.Windows.Forms.RadioButton

$radiobutton1 = New-Object System.Windows.Forms.RadioButton

#$InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState

 

$groupbox1.Controls.Add($radiobutton3)

$groupbox1.Controls.Add($radiobutton2)

$groupbox1.Controls.Add($radiobutton1)

 

#$groupbox1.DataBindings.DefaultDataSourceUpdateMode = [System.Windows.Forms.DataSourceUpdateMode]::OnValidation

 

#$groupbox1.Location = New-Object System.Drawing.Point(25,100)

$groupbox1.Name = “groupbox1”

$groupbox1.Size = New-Object System.Drawing.Size(50,710)

$groupbox1.TabIndex = 0

$groupbox1.TabStop = $False

$groupbox1.Text = “groupbox1”

$groupbox1.Location = new-object System.Drawing.Size(320,110)

$btnConfirm112.Size = new-object System.Drawing.Size(100,70)

$Form.controls.add($groubbox1)

 

#====================================================

 

# Button Click Event to Run ProgressBar

 

 

 

 

# Button Click Event to Run ProgressBar

$btnConfirm1.Add_Click({

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 01 -year 2014 -hour 0 -minute 0 -second 0) | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | sort desktopid | group-object desktopid | select  Name, count | export-csv “c:\temp\reports\XXXX-JAN-USAGECOUNT.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\XXXX-JAN-USAGECOUNT.csv” , “Status” , 0)

})

 

 

 

$btnConfirm2.Add_Click({

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 02 -year 2014 -hour 0 -minute 0 -second 0) | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | sort desktopid | group-object desktopid | select  Name, count | export-csv “c:\temp\reports\XXXX-FEB-USAGECOUNT.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\XXXX-FEB-USAGECOUNT.csv” , “Status” , 0)

})

 

$btnConfirm3.Add_Click({

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 03 -year 2014 -hour 0 -minute 0 -second 0) | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | sort desktopid | group-object desktopid | select  Name, count | export-csv “c:\temp\reports\XXXX-MAR-USAGECOUT.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\XXXX-MAR-USAGECOUNT.csv” , “Status” , 0)

})

 

$btnConfirm4.Add_Click({

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 04 -year 2014 -hour 0 -minute 0 -second 0) | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | sort desktopid | group-object desktopid | select  Name, count | export-csv “c:\temp\reports\XXXX-APR-USAGECOUNT.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\XXXX-APR-USAGECOUNT.csv” , “Status” , 0)

})

 

$btnConfirm5.Add_Click({

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 05 -year 2014 -hour 0 -minute 0 -second 0) | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | sort desktopid | group-object desktopid | select  Name, count | export-csv “c:\temp\reports\XXXX-MAY-USAGECOUNT.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\XXXX-MAY-USAGECOUNT.csv” , “Status” , 0)

})

 

$btnConfirm6.Add_Click({

[System.Windows.Forms.MessageBox]::Show(“Not Valid….” , “Status” , 0)

#get-eventreport -viewname user_events -startdate(get-date -day 01 -month 06 -year 2014 -hour 0 -minute 0 -second 0) | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | sort desktopid | group-object desktopid | select  Name, count | export-csv “c:\temp\reports\poolusageJAN.csv”

#[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\poolusagejan.csv” , “Status” , 0)

})

 

$btnConfirm11.add_click({

 

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 01 -year 2014 -hour 0 -minute 0 -second 0)  | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | select userdisplayname, desktopid | sort desktopid | export-csv “c:\temp\usersrep\XXXX-JAN-users.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed: c:\temp\usersrep\XXXX-JAN-users.csv” , “Status” , 0)

})

 

$btnConfirm12.add_click({

 

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 02 -year 2014 -hour 0 -minute 0 -second 0)  | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | select userdisplayname, desktopid | sort desktopid | export-csv “c:\temp\usersrep\XXXX-FEB-users.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\usersrep\XXXX-FEB-users.csv” , “Status” , 0)

})

 

$btnConfirm13.add_click({

 

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 03 -year 2014 -hour 0 -minute 0 -second 0)  | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | select userdisplayname, desktopid | sort desktopid | export-csv “c:\temp\usersrep\XXXX-MAR-users.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\usersrep\XXXX-MAR-users.csv” , “Status” , 0)

})

 

$btnConfirm14.add_click({

 

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 04 -year 2014 -hour 0 -minute 0 -second 0)  | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | select userdisplayname, desktopid | sort desktopid | export-csv “c:\temp\usersrep\XXXX-APR-users.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\usersrep\XXXX-APR-users.csv” , “Status” , 0)

})

 

$btnConfirm15.add_click({

 

[System.Windows.Forms.MessageBox]::Show(“The report generation started please wait…” , “Status” , 0)

get-eventreport -viewname user_events -startdate(get-date -day 01 -month 05 -year 2014 -hour 0 -minute 0 -second 0)  | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | select userdisplayname, desktopid | sort desktopid | export-csv “c:\temp\usersrep\XXXX-MAY-users.csv”

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\usersrep\XXXX-MAY-users.csv” , “Status” , 0)

})

 

$btnConfirm16.add_click({

 

[System.Windows.Forms.MessageBox]::Show(“NOT APPLICABLE…” , “Status” , 0)

#get-eventreport -viewname user_events -startdate(get-date -day 01 -month 01 -year 2014 -hour 0 -minute 0 -second 0)  | where-object {$_.eventtype -eq “AGENT_CONNECTED” } | select userdisplayname, desktopid | sort desktopid | export-csv “c:\temp\usersrep\XXXX-JAN-users.csv”

#[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\XXXX-JAN-USERS.csv” , “Status” , 0)

})

 

$btnConfirm111.add_click({

 

[System.Windows.Forms.MessageBox]::Show(“XXXX-VIEW POOLS AND STATUS REPORT GENERATION STARTED..PLESE BE PATIENCE IT WILL TAKE SOME TIME..” , “Status” , 0)

 

get-pool | select pool_id, displayname,enabled | sort enabled | export-csv “c:\temp\reports\XXXX-ALLVIEWPOOLS.csv”

 

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed c:\temp\reports\XXXX-ALLVIEWPOOLS.csv” , “Status” , 0)

 

[System.Windows.Forms.MessageBox]::Show(“The YEARLY USAGE IN PROGRESS” , “Status” , 0)

 

$S=  Get-EventReport -viewName user_events -startDate (Get-Date -Day 01 -Month 01 -Hour 0 -Minute 0 -Second 0) | where-object{$_.eventtype  -eq “AGENT_CONNECTED”}

 

$S | group-object desktopid | select NAme, count | export-csv “c:\temp\reports\POOLUSAGE-SINCEJAN.csv”

 

[System.Windows.Forms.MessageBox]::Show(“The report generation Completed ” , “Status” , 0)

})

 

# Show Form

$Form.Add_Shown({$Form.Activate()})

$Form.ShowDialog()

 

 

 

Horizon View automation part 2

As per part1, The view pool created using script which eases our operation. View admin would like to automate the view pool operations using powercli.

  1. To reduce no of desktops
  2. Disable provisoin and pools
  3. Enable provision and pools
  4. Update LC pool datastore
  5. Update Snapshot for LC pool
  6. To do Recompose with new snapshot

 

  1. To reduce no of desktops:

update-AutomaticLinkedClonePool -Pool_id “Pool1” -MinimumCount 1 -MaximumCount 1 -headroomCount 1

update-AutomaticLinkedClonePool -Pool_id “Pool2” -MinimumCount 1 -MaximumCount 1 -headroomCount 1

As per standard:

update-AutomaticLinkedClonePool -Pool_id “Pool1” -MinimumCount 2 -MaximumCount 5 -headroomCount 2

update-AutomaticLinkedClonePool -Pool_id “Pool2” -MinimumCount 2 -MaximumCount 5 -headroomCount 2

2. Disable provisoin and pools

update-AutomaticLinkedClonePool -Pool_id “Pool1” -Disabled 1 -IsProvisioningEnabled 0

update-AutomaticLinkedClonePool -Pool_id “Pool2” -Disabled 1 -IsProvisioningEnabled 0

3. Enable provision and pools

update-AutomaticLinkedClonePool -Pool_id “Pool1” -Disabled 0 -IsProvisioningEnabled 1

update-AutomaticLinkedClonePool -Pool_id “Pool2” -Disabled 0 -IsProvisioningEnabled 1

4. Update LC pool datastore

update-AutomaticLinkedClonePool -Pool_id “Pool1” -DatastoreSpecs aaa/host/Datastorename

update-AutomaticLinkedClonePool -Pool_id “Pool2” -aaa/host/Datastorename

5. Update Snapshot for LC pool

Update-AutomaticLinkedClonePool -pool_id “Pool1” -parentVMPath /vc/vm/BASE/vm -parentSnapshotPath /3360339A1 -ErrorAction “stop”

6. To do Recompose with new snapshot:

Update-AutomaticLinkedClonePool -pool_id “pool1” -parentVMPath /location of vm -parentSnapshotPath /602G9A1 -ErrorAction “stop”

Get-Desktopvm -pool_id pool1 | Send-LinkedCloneRecompose  -parentVMPath /vm/BASE/vm1 -parentSnapshotPath /vm1 -schedule ((get-date).addminutes(2)) -forceLogoff:$true -stopOnError:$true -ErrorAction “stop”

Horizon View – view pool automation Part1

Objective: In this blog, we will automate all the possibilities of Horizon view implementation. The below mentioned commands are tested in development prior to production release..

Scenario: The corporate Desktop and application team coordinated to obtain base VM with required configurations. As a View admin, we need to locate VMs into appropriate cluster (10 VMs into one cluster) considering design. Also, to setup Automated linked clone view pool, we need to assign vlan, obtain snapshot and subsequent view pool creation should be automated.

Steps:

  1. Locate Base VMs into Appropriate cluster / Host
  2. Assign relevant VLAN to located Base VMs considered as Golden Image
  3. Create snapshot for Base VMs
  4. Create View Pool
  5. Entitlement of users

1.       Locate Base VMs into Appropriate cluster / Host

Get-HardDisk -VM ‘Base1’

move-vm  ‘Base1’ -Destination esxi01 -datastore PRD-VDI -diskstorageformat Thin

Get-HardDisk -VM ‘Base1’’

2.       Assign relevant VLAN to located Base VMs considered as Golden Image

$vms1 = Import-CSV C:\SCRIPT\VDNet-01.csv

$vms1

foreach ($vm in $vms1){

Get-VM $vm.name | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName VDINet-01 -Confirm:$false

}

3.       Create snapshot for Base VMs

cls

$vms = Import-CSV C:\SCRIPT\VIEW\selvavms.csv

foreach ($vm in $vms){

$base = $vm.name

$y=[string]::Join(“-“,$base ,”A”)

New-Snapshot -VM $base -Name $y

}

4.       Create View Pool

$vms = Import-CSV C:\Scriptview\selvavms.csv

foreach ($vm in $vms){

$base = $vm.name

$snapnm = $vm.snap

$user=’-s.vdi.build’

$poolid =$vm.poolidd

$pooldec = $vm.dispname

$pooldec

$ds = $vm.datastore

$npx = “$base{n:fixed=2}”

$parenvm = “/xxxx/vm/APAC/BASE/$base”

$ou = “OU=VDI,OU=Virtuals,OU=Workstations,OU=VDI01”

$rs = $vm.res+”/Resources”

$rs

get-viewvc -servername Vcen01.vra.local | get-composerdomain -user $user | Get-composerdomain -domain vra.local | Add-AutomaticLinkedCLonePool -pool_id $poolid -displayName $pooldec -namePrefix $npx -parentVMPath $parenvm -parentSnapshotPath  $snapnm -vmFolderPath /xxxx/vm/xxx -resourcePoolPath $rs -datastoreSpecs $ds -organizationalUnit $ou -minimumcount 2 -maximumCount 5 -headroomcount 2 -powerpolicy Alwayson

}

 

 

 

Horizon View 7.x

Requirement Definition

Requirement: The capability needed by Stakeholder

VITTrainigs.com decided to facilitate virtual desktop for remote and internal users aligned to security defined by internal team. The number of desktops identified as 100 no concurrent users in respect to bother remote and internal for first year whereas considered the scaling of 500 in three years down the line.

Constraints : HP hardware

Functional vs Non Functional requirements

Please follow the Menu options!!

vCenter update – vCenter update from 6.0 to 6.5 : Physical Server with embedded installation (vCenter and PSC)

Though, lot of articles and useful blogs in respect to vCenter update, I couldn’t get blogs states Physical vCenter (Embedded installation) update with migrate to virtual appliance in order to enable VCHA.

Scenario: We are running vCenter in a physical server-windows based with embedded (PSC and VC) installation which needs to be migrated to VCSA with considering VCHA feature enable.

Scope & Objective: To align our infrastructure with latest updates, vCenter components should be updated to latest version 6.5 (currently latest) and also we have to enable VCHA solution for vCenter failover.

vCenter Server : Physical Server / Windows 2012 / PSC and vCenter embedded installation with SQL external database.

The below plan explains the steps to migrate and separate vCenter server components.

vcupdate

  1. Add secondary PSC (appliance) to existing vCenter Server 6.0.
  2. Repoint current PSC (physical) to external.                                                                             Output : PSC separated from physical vCenter Server 6.0
  3. Update PSC using vCenter  update option
  4. Migrate vCenter using vCenter migration tool to obtain vCenter 6.5 appliance.            Output : vCenter and PSC migrated to appliance with 6.5 version.    

Advantages:

  1. No down time for user workloads.
  2. The physical Server will be automatically powered down during vCenter migration
  3. Since there is no change on vCenter (existing database), We can power on any time in the event of any steps failure or unforeseen issues.