0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Rocky Linux を Azure VM で試してみた

Posted at

背景と目的

Rocky Linux 8.4 が GA したとの事で、Azure VM での提供状況を調べてみました。

前提条件

コマンドの実施環境は、Mac + Azure CLI です。

zsh
% sw_vers
ProductName:    macOS
ProductVersion: 11.4
BuildVersion:   20F71

% az version
{
  "azure-cli": "2.25.0",
  "azure-cli-core": "2.25.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {}
}

実施内容

OS イメージの URN を調べます。現時点では GA した 8.4 は提供しておらず、8.3 でした。

zah
% az vm image list \
  --offer rocky_linux \
  --all
[
  {
    "offer": "rocky_linux",
    "publisher": "tunnelbiz",
    "sku": "rocky-8-3",
    "urn": "tunnelbiz:rocky_linux:rocky-8-3:1.0.1",
    "version": "1.0.1"
  }
]

マーケットプレースの Rocky Linux OS イメージに対する使用条件への同意を行い、Azure VM を作成します。

zah
region=japaneast
prefix=mnrrocky
vmpass=$(openssl rand -base64 16)
echo $vmpass

az group create \
  --name ${prefix}-rg \
  --location $region

az vm image terms accept \
  --urn tunnelbiz:rocky_linux:rocky-8-3:1.0.1

az vm create \
    --resource-group ${prefix}-rg \
    --name ${prefix}-vm \
    --os-disk-name ${prefix}-vmOSDisk \
    --image tunnelbiz:rocky_linux:rocky-8-3:1.0.1 \
    --admin-username azureuser \
    --admin-password $vmpass \
    --size Standard_A2_v2 \
    --nsg-rule NONE \
    --public-ip-address "" \
    --storage-sku Standard_LRS

実施結果

OS 情報を取得してみました。

zah
% az vm run-command invoke \
  --command-id RunShellScript \
  --resource-group ${prefix}-rg \
  --name ${prefix}-vm \
  --query "value[0].message" \
  --output tsv \
  --scripts "cat /etc/os-release"

Enable succeeded: 
[stdout]
NAME="Rocky Linux"
VERSION="8.3"
ID="rocky"
ID_LIKE="rhel fedora"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.3"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:rocky:rocky:8"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"

[stderr]

参考

作成したリソースを削除します。

zsh
az group delete \
  --name ${prefix}-rg

Rocky Linux 8.4 GA Available Now

Rocky linux VM by tunnelbiz

az vm image list

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?