2019年4月17日 星期三

Can not Windows update?

  1. Click Start, and in the Search box on the start menu, type CMD, then press Ctrl+Shift+Enter (this will get you an elevation prompt for an Administrator command prompt)
  2. At the command prompt, type net stop wuauserv, then press Enter
  3. Type rmdir /s %windir%\softwaredistribution\DataStore, then press Enter. Type Y to acknowledge the command.
  4. Click Start, and in the Search box on the start menu, type regedit and press Enter
  5. Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ WindowsUpdate. Right-click on WindowsUpdate in the tree and choose Delete (confirm deletion). Close Regedit.
  6. At the command prompt, type net start wuauserv, press Enter and close the command prompt.
  7. Use the Windows Update again to install updates.
參考:https://www.windowsbbs.com/threads/can-not-download-updates.97594/

2019年4月8日 星期一

ESXi 5.5~6.5 指令

1.list the power on VMs:
esxcli vm process list  --重要的是找到World ID
若用esxcli vm process list | grep <guest vm name>則只會列出名稱與config file位置

2.turn off the VM:
esxcli vm process kill --type=xxxx --world-id=yyyyy
例如:esxcli vm process kill --type=soft --world-id=60418

for -type=xxxx use: soft, hard or force
for world-id=yyyy(VM ID) use the World ID listed in the command above
(eg. World ID 39731 for the example VM "Cold")
Some information about the three possible shutdown methods:

soft = prefer this if you want to shut down "softly"
hard = equal to an immediate shutdown
force = hard kill of the VM

3.trun on the VM:
list the VM:
vim-cmd vmsvc/getallvms

power on the VM:
vim-cmd vmsvc/power.on <vmid>

Check the power state of the VM
vim-cmd vmsvc/power.getstate <vmid>

check VM  status:
esxcli vm process list

4.reboot the VM:
vim-cmd vmsvc/power.restart (reboot)<vm-id>

5.shutdown the VM:
vim-cmd vmsvc/power.shutdown <vm-id>

2019年4月5日 星期五

vmware esxi6.5u1 update 6.5u2?

先下載update6.5u2及之後的Patches
update-from-esxi6.5-6.5_update02.zip
ESXi650-201903001.zip
1.請開啟瀏覽器後輸入 http://ESXi Server IP or FQDN/ui 登入VMware ESXi 6.5主控台
登入帳號:root
登入密碼:系統安裝時,所設定輸入密碼。

2.先準備上載更新檔案
點選:Navigator 導覽器➤Storage 儲存區➤Datastore browser 資料存放瀏覽器
(1).點選:Create directory 建立目錄
(2).命名目錄名稱,例如:Patches
(3).點選:Upload 上傳
(4).選擇已下載更新檔案:update-from-esxi6.5-6.5_update02.zip 上傳ESXi6.5 U2更新檔案

3.選擇:動作➤進入維護模式 Enter Maintenance Mode

4.確認維護模式變更,請點選:是

5.VMware ESXi 6.5 Host主控台可以看到系統已進入維護模式 Enter Maintenance Mode

6.選擇:動作➤服務➤啟用Secure Shell (SSH)服務
VMware ESXi 6.5 Host主控台可以看到系統已進入維護模式 Enter Maintenance Mode
※透過 PuTTY登入ESXi Host端 (需先啟用SSH)服務),執行進入「維護模式」指令:
#vim-cmd /hostsvc/maintenance_mode_enter

7.執行PuTTY登入ESXi 6.5 Host 主機(使用root帳號)
輸入更新指令與存放更新檔案儲存區位置,輸入完成請按下Enter進行系統更新:先更新到6.5U2(在跟目錄下以下指令)
esxcli software vib install -d /vmfs/volumes/vmstorage/Patches/update-from-esxi6.5-6.5_update02.zip
稍後一段時間,即可完成如下圖 ESXi 6.5 Update 2 Patches系統更新完成版本訊息

8.更新完成後,請將ESXi 6.5 Host 退出「維護模式」及「重新開機」。
也可執行PuTTY登入ESXi Host端,執行指令退出「維護模式、重新開機」:
# vim-cmd /hostsvc/maintenance_mode_exit
# reboot

9.再更新6.5U2之後的Patches,步驟與上面相同,只是指令為(在跟目錄下以下指令)
esxcli software vib install -d /vmfs/volumes/vmstorage/Patches/ESXi650-201903001.zip

參考:http://maxlabvm.blogspot.com/2018/05/how-to-install-latest-esxi-65-update-2.html

2019年3月28日 星期四

esxi 無法將 VM 匯出 ovf?

匯出ovf時出現失敗--網路錯誤或失敗--錯誤憑證,後來找到http://itworkertony.blogspot.com/2018/10/esxi-vm-ovf.html
原來是瀏覽器的問題,用chrome會出問題,換firefox就沒問題了。

2019年3月27日 星期三

vm converter 出現error:1603,還有無法安裝vm tools

今天converter出現error 1603
進去要converter 的主機看converter服務沒起來,把它啟動就可以了。
無法安裝vm tools原因是它沒有cd-rom,加上後就可以了

2019年3月26日 星期二

linux install vm tools

1.開啟vSphere Client>>開啟Console>>選VM>>Guest>>Install>>Upgrade VMware Tools
2.copy VMWare Tools 到 tmp
#cp /media/VMware Tools/VMwareTools-xxx.tar.gz /tmp
3.開始安裝
#cd /tmp
#tar zxvf VMwareTools-xxx.tar.gz
#cd vmware-tools-distrib
#./vmware-install.pl

2019年3月25日 星期一

sql server 2008定序設錯需重建資料庫?

1.將SQL Server服務停止
2.進入C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release
3.執行Setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SAPWD=xxxxxxxx /SQLSYSADMINACCOUNTS=Administrator /SQLCOLLATION=Chinese_Taiwan_Stroke_CI_AS
4.重新啟動SQL Server服務
5.之前建立的資料庫會遺失,可利用附加方式救回