Azure4.0 Linux VMをproxmoxで動かす
適当に設定すると動かないです...
公式のガイドを見ながら動かすことに成功したので備考として書きます。
環境
物理:
Xeon E5 2696V3
DDR3 REG ECC
X99
OS:
prxomox9.11
参考
ISOダウンロード先
今回はazure4.0-x86_64.isoを使用
セキュアブート関連は触らない/無効にしたほうが無難そう
Note: Azure Linux 4.0 ISOs are currently in Preview and not Secure Boot signed. Disable Secure Boot in your VM's firmware settings before booting the installer.
#セキュアブート非対応だとか...
GUIから作成していきます
書いていない部分はデフォルトです。
OSタブ
GuestOS:Linux 6.x-2.6 Kernel
Systemタブ
ここ大事な気がします。
Graphic card:Serial terminal 0
Systemタブ
TPMは無効のままが無難でしょう
Machine:q35
BIOS:OVMF(UEFI)
Pre-Enroll keysはチェックを外すのが吉
Qemu Agent:Enable
Disksタブ
#virtio-blk-pciがドキュメントでは指定されてたので
BUS/DeviceもVirtlO Blockにする
Discard:Enable
#最小構成が16GiBらしいので余裕もたせて20に
Disk size 20GiB
CPUタブ
core:2
Type:host
Memoryタブ
Mem:4GiB
Networkタブ
Model:VirtIO
設定画面がこのようになればOK
さっそく起動します。
Offline Installer画面
1のまま。
2は暗号化、1のままが無難
Installationの画面になったら
7番一般ユーザー作成を設定する。rootユーザー作成はやめておく。
操作方法は
数字を入力して、エンター。感覚でなれる
user creationにきたら、1を選択
2) から始める。2を入力してenter
... 3) 5)も同様に進める。
特にこだわりがなければbを押す
以上でインストールは終了
complete!と出たらenter
#これらのエラーは無視してOK
8.172851] faux_driver regulatory: Direct firmware load for regulatory.db failed with error -2
[ 8.174692] cfg80211: failed to load regulatory.db
Azure Linux 4.0 (Four Beta)
Kernel 6.18.31-1.3.azl4.x86_64 on x86_64 (ttyS0)
ログイン
パッケージ管理ツールはtdnf
ネットワークの疎通はDHCPのまま行う。
ip addrでアドレスの割り当てと疎通確認を行う
ip addr
curl -I https://www.google.com
OSのロゴがみたい
sudo tdnf install wget tar
はじめてのインストールコマンドの際
下のように聞かれたらyで続行
Running transaction
Importing OpenPGP key 0x3135CE90:
UserID : "Mariner RPM Release Signing <marinerrpmprod@microsoft.com>"
Fingerprint: 2BC94FFF7015A5F28F1537AD0CD9FED33135CE90
From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-azurelinux-4.0-x86_64
Is this ok [y/N]:
wget ...コマンド実行しようとしたら名前解決エラーでたので念のため
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
curl -I https://github.com
今度はうまくいった
wget https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-amd64.tar.gz
tar -xf fastfetch-linux-amd64.tar.gz
./fastfetch-linux-amd64/usr/bin/fastfetch
テスト用にコンテナをいくつか構築してみる
sudo tdnf install podman
podman run hello-world
sudo tdnf install nginx
sudo systemctl enable --now nginx
Nginxでも動かしてみる
HTTP/HTTPSポートを開ける。
sudo tdnf install firewalld
sudo systemctl enable --now firewalld
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload
sudo tdnf install policycoreutils-python-utils
sudo semanage port -a -t http_port_t -p tcp 80
#ポートも開いてるし、0.0.0.0:80で待機してる
#sudo systemctl status nginx
#sudo ss -tulpn | grep nginx
sudo restorecon -Rv /etc/nginx/
sudo systemctl restart nginx
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
#反映させるためにリロード
sudo firewall-cmd --reload
別の端末から
http://192.168.11.36
にアクセス
NginxがでればOK
参考までに
なにもしてない状態で
2CPUs:0.4%
メモリー800MiB/4000MiB




