ESXiのアップデートをコマンドで

vSphereでやるのは面倒なので
SSHでコマンドからやってみようかと。


patchの置き場所・・・/vmfs/volumes/LSI-MegaRAID10/patch/

1)パッチのアップロード

$ scp update-from-esxi5.5-5.5_update01.zip hoge@ESXi:/vmfs/volumes/LSI-MegaRAID10/patch/ 
Password: 

SCPで適当なところにアップロードしましょ

2)Guest OSの終了
仮想マシンの状態

# vim-cmd vmsvc/getallvms
Vmid     Name                      File                          Guest OS          Version   Annotation
3      Windows7   [LSI-MegaRAID10] Windows7/Windows7.vmx   windows7_64Guest        vmx-08              
4      Postfix    [LSI-MegaRAID10] Postfix/Postfix.vmx     centos64Guest           vmx-08              
6      Docker     [LSI-MegaRAID10] Docker/Docker.vmx       ubuntu64Guest           vmx-08              
7      AD         [LSI-MegaRAID10] AD/AD.vmx               windows8Server64Guest   vmx-08 

少ないですw

停止していきましょ

# vim-cmd vmsvc/power.getstate 3  
Retrieved runtime info
Powered on                                                                   
# vim-cmd vmsvc/power.off 3                                                                          
 Powering off VM:     

こんな感じ

3)メンテナンスモードへ移行

# esxcli system maintenanceMode get
Disabled
# esxcli system maintenanceMode set --enable=t                                                       
# esxcli system maintenanceMode get                                                                  
Enabled    

Enabledでメンテナンスモード

4)patch適用
プロファイルの確認

# esxcli software sources profile list --depot=/vmfs/volumes/LSI-MegaRAID10/patch/update-from-esxi5.5-5.5_update01.zip     

Name                              Vendor        Acceptance Level
--------------------------------  ------------  ----------------
ESXi-5.5.0-20140302001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20140301001s-no-tools  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20140301001s-standard  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20140302001-standard   VMware, Inc.  PartnerSupported

ESXi-5.5.0-20140302001-standard」がプロファイル(かな)
ESXi-5.5.0-20140301001s-standardこっちだとBaseが更新されないっぽく、
ビルドNoも上がりませんでした。。。

いま使っているプロファイルを調べておく

# esxcli software profile get
(Updated) Fujitsu-VMvisor-Installer-5.5.0-1331820-v300-1
   Name: (Updated) Fujitsu-VMvisor-Installer-5.5.0-1331820-v300-1
   Vendor: esxi
   Creation Time: 2014-03-22T15:19:49
   Modification Time: 2014-04-09T05:42:11
   Stateless Ready: False
   Description: 
      
      2014-03-22T15:19:49.122528+00:00: The following VIBs are
      installed:
        esx-base      5.5.0-0.14.1598313
        tools-light   5.5.0-0.14.1598313
      ----------
      2013-12-24T07:23:35.207805+00:00: The following VIBs are
      installed:
        tools-light   5.5.0-0.8.1474528
        misc-drivers  5.5.0-0.7.1474526
        esx-base      5.5.0-0.8.1474528
      ----------
      Fujistu customized ESXi5.5 Image, based on VMware build 1331820

   VIBs: FTS-Configuration-VIB 5.5.0-300.1.0, ata-pata-amd 0.3.10-3vmw.550.0.0.1331820, ata-pata-atiixp 0.4.6-4vmw.550.0.0.1331820, ata-pata-cmd64x 0.2.5-3vmw.550.0.0.1331820, ata-pata-hpt3x2n 0.3.4-3vmw.550.0.0.1331820, ata-pata-pdc2027x 1.0-3vmw.550.0.0.1331820, ata-pata-serverworks 0.4.3-3vmw.550.0.0.1331820, ata-pata-sil680 0.4.8-3vmw.550.0.0.1331820, ata-pata-via 0.3.3-2vmw.550.0.0.1331820, block-cciss 3.6.14-10vmw.550.0.0.1331820, ehci-ehci-hcd 1.0-3vmw.550.0.0.1331820, elxnet 10.0.575.9-1OEM.550.0.0.1331820, emulex-cim-provider 3.8.19.1-0
   ・
   ・
   ・


esx-base
元のビルドNo・・・Fujitsu-VMvisor-Installer-5.5.0-1331820-v300-1
今のビルドNo・・・5.5.0-0.14.1598313
ビルドNo・・・5.5.0-0.14.1598313

適用

# esxcli software profile update -d /vmfs/volumes/LSI-MegaRAID10/patch/update-                       
from-esxi5.5-5.5_update01.zip --profile=ESXi-5.5.0-20140301001-standard                             
                                
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true

再起動する前に・・・

5)メンテナンスモード解除

# esxcli system maintenanceMode set --enable=f                                                       
# esxcli system maintenanceMode get                                                                  
Disabled 

これで再起動かける

6)Gest OSの起動

# vim-cmd vmsvc/getallvms  
Vmid     Name                      File                          Guest OS          Version   Annotation
3      Windows7   [LSI-MegaRAID10] Windows7/Windows7.vmx   windows7_64Guest        vmx-08              
4      Postfix    [LSI-MegaRAID10] Postfix/Postfix.vmx     centos64Guest           vmx-08              
6      Docker     [LSI-MegaRAID10] Docker/Docker.vmx       ubuntu64Guest           vmx-08              
7      AD         [LSI-MegaRAID10] AD/AD.vmx               windows8Server64Guest   vmx-08
#                                                                          
# vim-cmd vmsvc/power.on 3                                                                           
Powering on VM:                                                                                      
#

これでゲストは上がります。

念のため確認

~ # vmware -v -l
VMware ESXi 5.5.0 build-1623387
VMware ESXi 5.5.0 Update 1
#
# esxcli software profile get
(Updated) Fujitsu-VMvisor-Installer-5.5.0-1331820-v300-1
   Name: (Updated) Fujitsu-VMvisor-Installer-5.5.0-1331820-v300-1
   Vendor: esxi
   Creation Time: 2014-04-09T05:38:29
   Modification Time: 2014-04-09T05:42:11
   Stateless Ready: False
   Description: 
      
      2014-04-09T05:38:28.704681+00:00: The following VIBs are
      installed:
        net-e1000e    1.1.2-4vmw.550.1.15.1623387
        lsi-msgpt3    00.255.03.03-1vmw.550.1.15.1623387
        mtip32xx-native       3.3.4-1vmw.550.1.15.1623387
        rste  2.0.2.0088-4vmw.550.1.15.1623387
        sata-ahci     3.0-18vmw.550.1.15.1623387
        tools-light   5.5.0-1.15.1623387
        scsi-mpt2sas  14.00.00.00-3vmw.550.1.15.1623387
        esx-base      5.5.0-1.15.1623387
        net-igb       5.0.5.1.1-1vmw.550.1.15.1623387
        net-tg3       3.123c.v55.5-1vmw.550.1.15.1623387

上がっていますw

こんな感じで大丈夫なはずw

あとは、VMWare-toolsのアップデートもしておけばいいと思います。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Enter code * Time limit is exhausted. Please reload CAPTCHA.

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください