RHEL7.4をHyper-V上で動かしたらstorvscでSense Key関連メッセージが出た(未解決

Windows Server vNextのHyper-Vの上で、RHEL7.4の仮想マシンを動かしていたら、storvscに関するメッセージが出力される。
[storvsc] Sense Key : Illegal Request [current]
[storvsc] Add. Sense: Invalid command operation code

うちの環境ではハングアップはしていないが、関連しそうな事例として下記を発見。
Bug 1502601 – [Hyper-V][RHEL7.4] hang when thaw on microsoft hyper-v
この問題は「RHSA-2018:1062 – Security Advisory」で解決しているらしい。

…kernelが3.10.0-862.el7ということはRHEL7.5ということですね
とりあえずkernelだけアップデートして様子見・・・

まだ出力される
では、3.10.0-862.9.1.el7にしてみる・・・
やっぱりまだ出力される

果たして、これはどういう問題なんだろうか・・・

Orange Pi 2/armbianでVMware PowerCLIが動いた

先日、「CentOS7環境にPowerShell CoreとVMware PowerCLIをインストール」で書いたように、普通のCentOS7環境でVMware PowerCLIを動かしてみた。

で、ラズパイの上でもPowerShell Coreは動く。
Running PowerShell Core on Raspberry Pi 2

arm32というくくりでは同じだけど、SoCがAllwinner H3のOrange Pi 2でPowerShell Coreが動くか、
また、VMware PowerCLIがインストールでき、仮想マシン操作を行えるかを確認してみた。

現時点では、ARM Linux向けにはtar.gzで固めたものしか出ていないのでgithubのPowerShell Releasesからlinux-arm32.tar.gzとなっているものを入手。

2018/07/13時点だと「wget https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-6.1.0-preview.3-linux-arm32.tar.gz」でダウンロードした。

これを~/powershellディレクトリに展開

# mkdir ~/powershell
# cd ~/powershell
# tar xfz ../powershell-6.1.0-preview.3-linux-arm32.tar.gz
#

そして、PowerShell Coreを実行

PS /root> uname -a
uname -a
Linux orangepi2 4.14.18-sunxi #24 SMP Fri Feb 9 16:24:32 CET 2018 armv7l GNU/Linux
PS /root> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.3
PSEdition                      Core
GitCommitId                    v6.1.0-preview.3
OS                             Linux 4.14.18-sunxi #24 SMP Fri Feb 9 16:24:3...
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


PS /root>

普通に動いているようだ。

続いて、PowerCLIのインストール

PS /root> Install-Module -Name VMware.PowerCLI

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this
repository, change its InstallationPolicy value by running the Set-PSRepository
 cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "N"):y
PS /root>

何事もなく終了。
モジュールの確認

PS /root> Install-Module -Name VMware.PowerCLI

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this
repository, change its InstallationPolicy value by running the Set-PSRepository
 cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "N"):y
PS /root>
PS /root> Get-Module                                                            
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clea...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-T...
Script     1.1.7.0    PackageManagement                   {Find-Package, Fin...
Script     1.6.0      PowerShellGet                       {Find-Command, Fin...
Script     2.0.0      PSReadLine                          {Get-PSReadLineKey...


PS /root> Get-Module -ListAvailable


    Directory: /usr/local/share/powershell/Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     6.7.0.8... VMware.DeployAutomation             {Add-DeployRule, A...
Script     6.7.0.8... VMware.ImageBuilder                 {Add-EsxSoftwareDe...
Manifest   10.1.1.... VMware.PowerCLI
Script     6.7.0.8... VMware.Vim
Script     10.1.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer...
Script     10.0.0.... VMware.VimAutomation.Cloud          {Add-CIDatastore, ...
Script     10.1.0.... VMware.VimAutomation.Common
Script     10.1.0.... VMware.VimAutomation.Core           {Add-PassthroughDe...
Script     6.5.4.7... VMware.VimAutomation.HA             Get-DrmInfo
Script     7.5.0.8... VMware.VimAutomation.HorizonView    {Connect-HVServer,...
Script     10.0.0.... VMware.VimAutomation.License        Get-LicenseDataMan...
Script     10.1.0.... VMware.VimAutomation.Nsxt           {Connect-NsxtServe...
Script     10.0.0.... VMware.VimAutomation.PCloud         {Connect-PIServer,...
Script     10.1.0.... VMware.VimAutomation.Sdk
Script     10.0.0.... VMware.VimAutomation.Srm            {Connect-SrmServer...
Script     10.1.0.... VMware.VimAutomation.Storage        {Add-KeyManagement...
Script     1.2.0.0    VMware.VimAutomation.StorageUtility Update-VmfsDatastore
Script     10.1.0.... VMware.VimAutomation.Vds            {Add-VDSwitchPhysi...
Script     10.0.0.... VMware.VimAutomation.Vmc            {Connect-Vmc, Disc...
Script     10.0.0.... VMware.VimAutomation.vROps          {Connect-OMServer,...
Script     6.5.1.7... VMware.VumAutomation                {Add-EntityBaselin...


    Directory: /root/powershell/Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.1.0.0    Microsoft.PowerShell.Archive        {Compress-Archive,...
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript,...
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clea...
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Credential, G...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Form...
Script     1.1.7.0    PackageManagement                   {Find-Package, Get...
Script     1.6.0      PowerShellGet                       {Install-Module, F...
Script     0.0        PSDesiredStateConfiguration         {ThrowError, Node,...
Script     2.0.0      PSReadLine                          {Get-PSReadLineKey...


PS /root>

で・・・画面は省略しますが、connect-viserverして、get-vmして、とか普通に動きました。

CentOS7環境にPowerShell CoreとVMware PowerCLIをインストール

以前、PowerShell CoreとVMware PowerCLI Coreに関する記事を書いた。
現在は、VMware PowerCLI Coreが標準のVMware PowerCLIに統合され、またインストール手法も変わっている。
そこで、久しぶりにインストールしてみた。

まずは「Linux への PowerShell Core のインストール」記載の手順に従いインストール

1. Microsoftレポジトリの登録
「curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo」

[root@centos7 ~]# curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   193  100   193    0     0     70      0  0:00:02  0:00:02 --:--:--    70
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/rhel/7/prod/
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
[root@centos7 ~]#

2. PowerShellのインストール
「yum install -y powershell」

[root@centos7 ~]# yum install -y powershell
読み込んだプラグイン:fastestmirror
Determining fastest mirrors
<略>
依存性を解決しました

================================================================================
 Package    アーキテクチャー
                   バージョン                 リポジトリー                 容量
================================================================================
インストール中:
 powershell x86_64 6.1.0~preview.2-1.rhel.7   packages-microsoft-com-prod  50 M
依存性関連でのインストールをします:
 libunwind  x86_64 2:1.2-2.el7                base                         57 k

トランザクションの要約
================================================================================
インストール  1 パッケージ (+1 個の依存関係のパッケージ)

総ダウンロード容量: 50 M
インストール容量: 50 M
<略>
https://packages.microsoft.com/keys/microsoft.asc から鍵を取得中です。
Importing GPG key 0xBE1229CF:
 Userid     : "Microsoft (Release signing) <gpgsecurity@microsoft.com>"
 Fingerprint: bc52 8686 b50d 79e3 39d3 721c eb3e 94ad be12 29cf
 From       : https://packages.microsoft.com/keys/microsoft.asc
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : 2:libunwind-1.2-2.el7.x86_64                    1/2
  インストール中          : powershell-6.1.0~preview.2-1.rhel.7.x86_64      2/2
  検証中                  : 2:libunwind-1.2-2.el7.x86_64                    1/2
  検証中                  : powershell-6.1.0~preview.2-1.rhel.7.x86_64      2/2

インストール:
  powershell.x86_64 0:6.1.0~preview.2-1.rhel.7

依存性関連をインストールしました:
  libunwind.x86_64 2:1.2-2.el7

完了しました!
[root@centos7 ~]#

これでPowerShellを「pwsh」で実行できるようになりました。

続いてvSphere環境をコントロールするためにPowerCLI
VMware PowerCLI 10.11

といっても、以前はパッケージをダウンロードしてインストールという形態だったものが、現状は、MicrosoftのPowerShellギャラリーに登録されています。
PowerShell Gallery「VMware.PowerCLI

インストール方法もとっても簡単。
「Install-Module -Name VMware.PowerCLI」を実行するだけ。
途中で「Untrusted repositoryからのインストールを行うか」という質問に「y」と答える必要があります。

[root@centos7 ~]# pwsh
PowerShell v6.1.0-preview.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /root> Install-Module -Name VMware.PowerCLI

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this
repository, change its InstallationPolicy value by running the Set-PSRepository
 cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "N"):y

<いろんなVMwareモジュールを追加インストール>

PS /root>

まずは、初期状態で読み込まれているモジュールを確認

PS /root> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clea...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-T...
Script     1.1.7.0    PackageManagement                   {Find-Package, Fin...
Script     1.6.0      PowerShellGet                       {Find-Command, Fin...
Script     1.2        PSReadLine                          {Get-PSReadlineKey...


PS /root>

現在使えるモジュールを確認。

PS /root> Get-Module -ListAvailable


    Directory: /usr/local/share/powershell/Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     6.7.0.8... VMware.DeployAutomation             {Add-DeployRule, A...
Script     6.7.0.8... VMware.ImageBuilder                 {Add-EsxSoftwareDe...
Manifest   10.1.1.... VMware.PowerCLI
Script     6.7.0.8... VMware.Vim
Script     10.1.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer...
Script     10.0.0.... VMware.VimAutomation.Cloud          {Add-CIDatastore, ...
Script     10.1.0.... VMware.VimAutomation.Common
Script     10.1.0.... VMware.VimAutomation.Core           {Add-PassthroughDe...
Script     6.5.4.7... VMware.VimAutomation.HA             Get-DrmInfo
Script     7.5.0.8... VMware.VimAutomation.HorizonView    {Connect-HVServer,...
Script     10.0.0.... VMware.VimAutomation.License        Get-LicenseDataMan...
Script     10.1.0.... VMware.VimAutomation.Nsxt           {Connect-NsxtServe...
Script     10.0.0.... VMware.VimAutomation.PCloud         {Connect-PIServer,...
Script     10.1.0.... VMware.VimAutomation.Sdk
Script     10.0.0.... VMware.VimAutomation.Srm            {Connect-SrmServer...
Script     10.1.0.... VMware.VimAutomation.Storage        {Add-KeyManagement...
Script     1.2.0.0    VMware.VimAutomation.StorageUtility Update-VmfsDatastore
Script     10.1.0.... VMware.VimAutomation.Vds            {Add-VDSwitchPhysi...
Script     10.0.0.... VMware.VimAutomation.Vmc            {Connect-Vmc, Disc...
Script     10.0.0.... VMware.VimAutomation.vROps          {Connect-OMServer,...
Script     6.5.1.7... VMware.VumAutomation                {Add-EntityBaselin...


    Directory: /opt/microsoft/powershell/6.1.0~preview.2/Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.1.0.0    Microsoft.PowerShell.Archive        {Compress-Archive,...
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript,...
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clea...
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Credential, G...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Form...
Script     1.1.7.0    PackageManagement                   {Find-Package, Get...
Script     1.6.0      PowerShellGet                       {Install-Module, F...
Script     0.0        PSDesiredStateConfiguration         {Get-PublicKeyFrom...
Script     1.2        PSReadLine                          {Get-PSReadlineKey...


PS /root>

以前、「PowerCLIとPowerCLI Coreの双方で動くPowerShellスクリプトの作り方」では、それぞれでモジュール名が異なっていた。
PowerCLI Coreでのモジュール名変更は無かったことになった模様。

とりあえず、VI-Connectで接続をかけてみる・・・

PS /root> Connect-VIServer -Server IPアドレス -User root -Password password -WarningAction 0
Connect-VIServer : 2018/07/06 14:29:03  Connect-VIServer                Error: Invalid server certificate. Use Set-PowerCLIConfiguration to set the value for the InvalidCertificateAction option to Ignore to ignore the certificate errors for this connection.
Additional Information: Could not establish trust relationship for the SSL/TLS secure channel with authority 'IPアドレス'.
At line:1 char:1
+ Connect-VIServer -Server IPアドレス -User root -Password password - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : SecurityError: (:) [Connect-VIServer], ViSecurityNegotiationException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_CertificateError,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

PS /root>

おや?
デフォルト証明書の場合の取り扱いが変わった模様。

VMware PowerCLI Blog「New Release: VMware PowerCLI 10.0.0」の「Default Certificate Handling」に記載がある。

エラーメッセージもあるように「Set-PowerCLIConfiguration -InvalidCertificateAction Ignore」を実行して無視するようにする、と。

PS /root> Set-PowerCLIConfiguration -InvalidCertificateAction Ignore

Perform operation?
Performing operation 'Update PowerCLI configuration.'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y

Scope    ProxyPolicy     DefaultVIServerMode InvalidCertificateAction  DisplayD
                                                                       eprecati
                                                                       onWarnin
                                                                       gs
-----    -----------     ------------------- ------------------------  --------
Session  UseSystemProxy  Multiple            Ignore                    True
User                                         Ignore
AllUsers


PS /root>

改めて接続を実行

PS /root> Connect-VIServer -Server IPアドレス -User root -Password password   
Name                           Port  User
----                           ----  ----
IPアドレス                     443   root


PS /root>

問題なく動作しましたね。

Zentyalを日本語で使う場合の設定手順

Linux(Ubuntu 16.04 LTS)ベースでDHCPサーバ/ファイヤーウォール/NATルータ/ActiveDirectory/Exchange互換サーバなどを提供できるアプライアンス「zentyal」を久々にセットアップ。 (以前はzentyal.orgだったのが、zentyal.comに統合された)

2019/07/02追記:Ubuntu 18.04.1 LTSベースのZentyal 6.0です。この記事はZentyal 5.1の時に作成していますが、Zentyal 6.0でも同じでした。
2021/08/12追記:Ubuntu 20.04.2 LTSベースのZentyal 7.0ですが、同じように日本語は化け、同じパッケージインストールで修正できました。

以前、日本語訳を投稿しておいたおかげで日本語を選択できるようになっていますが、注意点が1つ。
インストール時に日本語を設定してしまうと、firefoxが文字化けし、設定に難儀します。
まずはEnglishでインストールを行った上で、手動でパッケージを追加してから日本語に変更する必要があります。

1. EnglishでZentyalをインストール
2. 初回ログイン
3. シェルを開く
4. Ubuntuの日本語対応をインストール「sudo apt install language-pack-ja firefox-locale-ja」
5. 日本語表示用フォントをインストール「sudo apt install fonts-arphic-uming fonts-takao-pgothic」
6. zentyalの日本語対応をインストール「sudo apt install language-pack-zentyal-ja」
7. zentyalの設定画面で「日本語」を設定する。

2019/12/13追記: fonts-takao-pgothic でエラーとなる場合は fonts-takao-gothic で実施のこと

文字化け状態の例

文字化け解消後

なお、yahooのページだと「fonts-arphic-uming」だけでも大丈夫だったが、zentyalではさらに「fonts-takao-pgothic」を追加する必要があった。
なお、 xfonts-intl-japanese では文字化けは直らなかった。

DELL PowerEdgeとHPE ProLiantでUbuntuを動かす場合の管理ソフト

2024/02/27追記:HPE ProLiantについては別記事「hpe ProLiantをLinuxで使う場合にインストールするService Pack for ProLiantについて」参照

RHELと同じようにUbuntuの場合にも管理系ソフトウェアが存在しているので、そのメモ

なお、「DELL PowerEdgeサーバにLinuxを入れる際の追加ソフト」にて実際にインストールした例を掲載中

DELL EMC OpenManage Ubuntu & Debian Repositories
srvadmin-all — Install all OMSA components
srvadmin-base * — Install only base OMSA, no web server
srvadmin-idrac * — Install components to manage iDRAC
srvadmin-idrac7 * — Install Racadm for iDRAC7
srvadmin-idracadm8 — Install Racadm for iDRAC8 and above
srvadmin-webserver * — Install Web Interface
srvadmin-storageservices * — Install RAID Management
syscfg* — Install SysCfg
raidcfg* — Install RaidCfg
dcism — Install iDRAC Service Module

DELL EMC System Update (DSU)
UbuntuではDELL PowerEdge 12G,13Gサーバのfirmwareアップデートのみサポート。

HPE Management Component Pack
hp-health HPE System Health Application and Command line Utilities (Gen9 and earlier)
hponcfg HPE RILOE II/iLO online configuration utility
amsd HPE Agentless Management Service (Gen10 only)
hp-ams HPE Agentless Management Service (Gen9 and earlier)
hp-snmp-agents Insight Management SNMP Agents for HPE ProLiant Systems (Gen9 and earlier)
hpsmh HPE System Management Homepage (Gen9 and earlier)
hp-smh-templates HPE System Management Homepage Templates (Gen9 and earlier)
ssacli HPE Command Line Smart Storage Administration Utility
ssaducli HPE Command Line Smart Storage Administration Diagnostics
ssa HPE Array Smart Storage Administration Service