先日、「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して、とか普通に動きました。