[VMware] [500]SSO error: Failed to import TenantConfiguration for [vsphere.local]: Failed to remove existing service provider registration.

環境在 Windows edition VMware vCenter 6.0.x 登入 vSphere Web Client 出現了如下錯誤畫面進而造成卡住無法順利登入;但若使用 vSphere Client 卻是沒問題。

@Windows vCenter Server 6.0 update2 login issue

查詢了原廠KB是要增加 registry database size 限制.因為已到達了 1024 需再加大。

Resolution:

  1. regedit.exe
  2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\VMwareDirectoryService\Parameters ,增加一筆 DWORD ‘ MaximumDbSizeMb ‘ ,數值大於 1024 MB
  3. 重啟服務 ‘ VMware Directory Service ‘
  4. 等待10分到15分鐘確認可以順利登入且無錯誤訊息。

Reference :
VMware KB –
“Failed to remove existing service provider registration" when logging in to the vSphere Web Client (2145602)

[VMware] Online install VMware PowerCLi through PowerShell

<Require>
This environment use PowerShell 5.x version

How to check PowerShell version
PS:\> $PSVersionTable
Or
PS:\> Get-Host

step01.
PS:\> Save-Module -Name VMware.PowerCLI -Path

step02.
PS:\> Install-Module -Name VMware.PowerCLI

step03.
PS:\> Set-PowerCLIConfiguration -InvalidCertificateAction Ignore

step04.
PS:\> Get-Module -ListAvailable -Name VMware*

[VMware] How to use PXE deploy ESXi 6.5 or 6.7

Prepare :
1. tftp server , 載點
2. Web server , 我習慣用 hfs , 載點
3. ESXi 6.5 or 6.7 iso source , 載點
PS: 若 Serva也是不錯工具免費版目前最多佈署3個sessions,兼併很多角色Server , 載點

Procedure :

step01. Create tftp root directory (e.g. I create directory at c:\tmp\tftp_root )

step02.
> perform tftpd64.exe > Settings > DHCP ‘Boot File’ 加入一串 mboot.EFI
> 設定DHCP派送IP , IP pool start address (e.g. 我設定是 199.1.1.101開始,最多10組DHCP IP) ;需不需要Gateway再個案設定之. Mask (Opt 1) 設定為 255.255.255.0
tftpd_mboot.efi.jpg

step03. extract ESXi 6.5 or 6.7 ISO put under tftp directory (e.g. c:\tmp\tftp_root\ESXi67 )

step04. 將 ESXi source 目錄 \EFI\BOOT\BOOTX64.EFI 複製到你預設 tftp root directory底下,更名為 mboot.EFI (e.g. c:\tmp\tftp_root\mboot.EFI )

step05. copy ESXi source ‘ EFI\BOOT\BOOT.CFG ‘ put ur tftp root directory (e.g. c:\tmp\tftp_root\BOOT.CFG )

step06. edit BOOT.CFG
PS:刪除此範本所有的 ‘ / ‘ 假若我的安裝source ‘ESXi67’在 c:\tmp\tftp_root\ESXi67 ;我tftp root 錄路徑為 ‘ / ‘ ; 多加一串 ‘prefix=‘ ; 存檔後再複蓋 ESXi source \  底下BOOT.CFG
———————————BOOT.CFG Start———————————————
bootstate=0
title=Loading ESXi installer
timeout=5
prefix=ESXi67
kernel=b.b00
kernelopt=ks=http://199.1.1.1/ks/ks.cfg
modules=jumpstrt.gz — useropts.gz — features.gz — k.b00 — chardevs.b00 — user.b00 — procfs.b00 — uc_intel.b00 — uc_amd.b00 — vmx.v00 — vim.v00 — sb.v00 — s.v00 — ata_liba.v00 — ata_pata.v00 — ata_pata.v01 — ata_pata.v02 — ata_pata.v03 — ata_pata.v04 — ata_pata.v05 — ata_pata.v06 — ata_pata.v07 — block_cc.v00 — bnxtnet.v00 — brcmfcoe.v00 — char_ran.v00 — ehci_ehc.v00 — elxiscsi.v00 — elxnet.v00 — hid_hid.v00 — i40en.v00 — iavmd.v00 — igbn.v00 — ima_qla4.v00 — ipmi_ipm.v00 — ipmi_ipm.v01 — ipmi_ipm.v02 — iser.v00 — ixgben.v00 — lpfc.v00 — lpnic.v00 — lsi_mr3.v00 — lsi_msgp.v00 — lsi_msgp.v01 — lsi_msgp.v02 — misc_cni.v00 — misc_dri.v00 — mtip32xx.v00 — ne1000.v00 — nenic.v00 — net_bnx2.v00 — net_bnx2.v01 — net_cdc_.v00 — net_cnic.v00 — net_e100.v00 — net_e100.v01 — net_enic.v00 — net_fcoe.v00 — net_forc.v00 — net_igb.v00 — net_ixgb.v00 — net_libf.v00 — net_mlx4.v00 — net_mlx4.v01 — net_nx_n.v00 — net_tg3.v00 — net_usbn.v00 — net_vmxn.v00 — nhpsa.v00 — nmlx4_co.v00 — nmlx4_en.v00 — nmlx4_rd.v00 — nmlx5_co.v00 — nmlx5_rd.v00 — ntg3.v00 — nvme.v00 — nvmxnet3.v00 — nvmxnet3.v01 — ohci_usb.v00 — pvscsi.v00 — qcnic.v00 — qedentv.v00 — qfle3.v00 — qfle3f.v00 — qfle3i.v00 — qflge.v00 — sata_ahc.v00 — sata_ata.v00 — sata_sat.v00 — sata_sat.v01 — sata_sat.v02 — sata_sat.v03 — sata_sat.v04 — scsi_aac.v00 — scsi_adp.v00 — scsi_aic.v00 — scsi_bnx.v00 — scsi_bnx.v01 — scsi_fni.v00 — scsi_hps.v00 — scsi_ips.v00 — scsi_isc.v00 — scsi_lib.v00 — scsi_meg.v00 — scsi_meg.v01 — scsi_meg.v02 — scsi_mpt.v00 — scsi_mpt.v01 — scsi_mpt.v02 — scsi_qla.v00 — shim_isc.v00 — shim_isc.v01 — shim_lib.v00 — shim_lib.v01 — shim_lib.v02 — shim_lib.v03 — shim_lib.v04 — shim_lib.v05 — shim_vmk.v00 — shim_vmk.v01 — shim_vmk.v02 — smartpqi.v00 — uhci_usb.v00 — usb_stor.v00 — usbcore_.v00 — vmkata.v00 — vmkfcoe.v00 — vmkplexe.v00 — vmkusb.v00 — vmw_ahci.v00 — xhci_xhc.v00 — elx_esx_.v00 — btldr.t00 — weaselin.t00 — esx_dvfi.v00 — esx_ui.v00 — lsu_hp_h.v00 — lsu_lsi_.v00 — lsu_lsi_.v01 — lsu_lsi_.v02 — lsu_lsi_.v03 — native_m.v00 — qlnative.v00 — rste.v00 — vmware_e.v00 — vsan.v00 — vsanheal.v00 — vsanmgmt.v00 — tools.t00 — xorg.v00 — imgdb.tgz — imgpayld.tgz
build=
updated=0
———————————BOOT.CFG End———————————————-

說明:

prefix=ESXi67
kernel=b.b00  // PS. v6.7僅剩 b.b00 不若之前有 tboot.b00 檔案
kernelopt=ks=http://199.1.1.1/ks/ks.cfg // PS. 若有需要無人值守必要有作KickStart編輯; e.g. 密碼 ,

step07. clock hfs.exe , (e.g. My KickStart directory  hfs root put c:\tmp\tftp_root\ks )

step08. edit ks.cfg
———————————ks.cfg End———————————————-
#
# Sample scripted installation file
#
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and Tech Support Mode
rootpw P@ssw0rd!
# Install on the first local disk available on machine
install –firstdisk –overwritevmfs
# Set the network to DHCP on the first network adapter
network –bootproto=dhcp –device=vmnic0

reboot

# A sample post-install script
%post –interpreter=python –ignorefailure=true
import time
stampFile = open(‘/finished.stamp’, mode=’w’)
stampFile.write( time.asctime() )
———————————ks.cfg End———————————————-
PS: About the Default ks.cfg Installation Script 可以參考 ‘ vsphere-esxi-67-installation-setup-guide.pdf page 77

 


Reference :
1. xenappblog – Automatically Install VMware ESXi 6.7 through PXE boot

2. Virtual Reality – Automating Esxi Deployment Using PXE Boot and Kickstart

3. VMware Docs – 使用 TFTP 對 ESXi 安裝程式進行 PXE 開機

4. VMware ESXi 6.7 Installation and Setup – VMware Docs

5. 通过PXE快速部署VMware ESXi 6.5

[VMware] 登入Windows版 vCenter 6.5 vSphere Web Client (Flash-base) 會一直跳出 “發生內部錯誤 – Error #1009″

在客戶升級了5.5U2 > 6.0 > 6.5U2 但居然會出現vCenter 5.5U1 Bug ;但這Bug在5.5U2已修正居然會出現不解啊 ><

情境: 使用 vSphere Web Client (Flash-base) login後會一直跳出 “發生內部錯誤 – Error #1009″ 錯誤訊息。

Workaround :

step01. 進入 C:\programdata\vmware\vCenterServer\data\vSphere Web Client\SerenityDB\

step02. 刪除 serenity 這個整個目錄

delete C:\programdata\vmware\vCenterServer\data\vSphere Web Client\SerenityDB\serenity

step03. 重啟vSphere Web Client服務即可
.\service-control –stop vspherewebclientsvc && .\service-control –start vspherewebclientsvc

step04. 確認服務處於running
.\service-control –status vspherewebclientsvc

Done.


Reference : VMware vSphere Web Client reports an internal error 1009 (2089949)

[VMware] vCenter Server 6.5 @Windows How to restart Web Client or Client

step01. c:\> C:\Program Files\VMware\vCenter Server\bin

step02. .\service-control –list  // check current all VMware service

step03. .\service-control –stop vspherewebclientsvc  // 停止 vSphere Web client 服務

step04. .\service-control –start vspherewebclientsvc // 啟動 vSphere Web client 服務

PS:
* vSphere Web Client 名稱(Flash-base) > vspherewebclientsvc
* vSphere Client 名稱(HTML5) > vsphere-ui

 

vmware-imagebuilder
VMware Image Builder Manager
vmware-cm
VMware Component Manager
vmware-vpxd
VMware vCenter Server
vimPBSM
VMware vSphere Profile-Driven Storage Service
applmgmt
VMware Appliance Management Service
vmware-statsmonitor
VMware Appliance Monitoring Service
vmware-rhttpproxy
VMware HTTP Reverse Proxy
vmware-vapi-endpoint
VMware vAPI Endpoint
lwsmd
Likewise Service Manager
vmafdd
VMware Authentication Framework
vmware-vsm
VMware vService Manager
vmonapi
VMware Service Lifecycle Manager API
vmware-perfcharts
VMware Performance Charts
vmware-updatemgr
VMware Update Manager
vmware-vmon
VMware Service Lifecycle Manager
vmware-vsan-health
VMware VSAN Health Service
vspherewebclientsvc
VMware vSphere Web Client
vmware-vpostgres
VMware Postgres
vmware-eam
VMware ESX Agent Manager
vmcam
VMware vSphere Authentication Proxy
vmware-mbcs
VMware Message Bus Configuration Service
vmware-vcha
VMware vCenter High Availability
vsphere-ui
VMware vSphere Client
vmware-content-library
VMware Content Library Service
vmware-sca
VMware Service Control Agent
vmware-netdumper
VMware vSphere ESXi Dump Collector
vmware-vpxd-svcs
VMware vCenter-Services
vmware-rbd-watchdog
VMware vSphere Auto Deploy Waiter

Reference :

  1.  How to stop, start, or restart vCenter Server 6.x services (2109881)

[VMware] vCSA 6.5 / 6.7 login Web Client no timeout

  • for Flash-Base
    step01 # vi /etc/vmware/vsphere-client/webclient.properties
    step02 找到將其改為0 > session.timeout = 0
    step03 # service-control –stop vsphere-client && service-control –start vsphere-client
  • for HTML5
    step01. # vi /etc/vmware/vsphere-ui/webclient.properties
    step02. 找到將其改為0 > session.timeout = 0
    step03. service-control –stop vsphere-ui && service-control –start vsphere-ui


    Reference :
    1. Increasing the VMware vSphere Web Client session timeout period (2040626)

[VMware] 收集ESXi Log 厭煩老是用WinSCP,能否無需Third-Party Tools取得

厭煩手邊老是忘了準備WinSCP 或還要丟 /var/log/底下到 Datastore 可以看到目錄去收集目錄,其實現在老早就可以用網頁方式直接下載。

Resolution:

step01.
https://ESXi-IP/host

step02.
輸入 root / esxi-password

step03.

esxi.jpg

[VMware] ESXi Configuration Issues “No coredump target has been configured. Host core dumps cannot be saved “

客戶近日二台新機Cisco UCS C200 M4 , ESXi 6.0出現了如下圖所示 Configuration Issues “No coredump target has been configured. Host core dumps cannot be saved "

vmware-configuration-issues-no-coredump-target-has-been-configured.jpg

(極不建議) 若不想要CoreDump則是可以忽略;而忽略方式為
> Host > Configuration > Advanced Settings > UserVars > SuppressCoredumpWarning “1″

 


Reference :

  1. Configuring a diagnostic coredump partition on an ESXi 5.x/6.x host (2004299)
  2. Provirtualzone – VMware: ESXi 5.5 update – No coredump target has been configured. Host core dumps cannot be saved
  3. TUX ROOT – Disable “No Coredump Target has been Configured. Host Core Dumps Cannot be Saved” Error on ESXi host
  4. 9to5it.com – Fix – No coredump target has been configured

[VMware] vCSA 6.5.x how to remove orphaned virtual machine

** ready PowerCLI 6.5 U1 or above **

在管理VM時發現有二台vCSA(orphaned)孤立狀況且無法使用GUI delete or remove .

orphaned-vm-001.jpg

Workaround > use PowerCLI

step01. open PowerCLI

step02.
%:\> Connect-VIserver -Server 10.10.10.200 -User {account} -Password {password}

step03.
%:\> Get-VM | select name | findstr /i “VMware vCenter Server Appliance*"

step04.
%:\> Remove-VM “VMware vCenter Server Appliance (1)"
%:\> Remove-VM “VMware vCenter Server Appliance"

Done.


(未實驗過)
vim-cmd /vmsvc/getallvms // get vmid

vim-cmd /vmsvc/unregister <Vmid>


Reference :

  1. VMware Cmdlet Reference
  2. HEX64 – How To Remove Invalid VMs From ESXi Using CLI
  3. VMware KB:1011468 – Deleting an orphaned virtual machine when the Remove option is not available
  4. ALTARO – How to deal with orphaned virtual machines