Vultr で Disk image をアップロードする場合

Vultr に Disk image をアップロードして使うことがあるのでメモ

VUltr に Disk image を登録するためには http でアクセスできるようにして
RAW image でなければならないので、 qcow2 のイメージを変換して http でアクセスできるようにしなければならない

failed to fetch remote resource: Forbidden

適当にサーバーを立てる

  • Cumulus のサイトから KVM のイメージをダウンロードする
    • SUM256: 064fd2f767b36df871e70885b40141be76a903e063a0ba30fbf4dfa4f0a8ee4b
1
2
3
4
5
6
7
cat <<EOF> cumulus-linux-5.1.0-vx-amd64-qemu.sha256sum
064fd2f767b36df871e70885b40141be76a903e063a0ba30fbf4dfa4f0a8ee4b  cumulus-linux-5.1.0-vx-amd64-qemu.qcow2
EOF

wget https://d2cd9e7ca6hntp.cloudfront.net/public/CumulusLinux-5.1.0/cumulus-linux-5.1.0-vx-amd64-qemu.qcow2

sha256sum -c cumulus-linux-5.1.0-vx-amd64-qemu.sha256sum
  • qemu-img コマンドをインストール
1
apt install -y qemu-utils

変換

1
qemu-img convert -f qcow2 -O raw cumulus-linux-5.1.0-vx-amd64-qemu.qcow2 cumulus-linux-5.1.0-vx-amd64-qemu.img

nginx をインストール

1
apt install -y nginx

UFW を開放

1
2
3
ufw allow 80/tcp

ufw status verbose

イメージを配置

1
2
3
mv -v cumulus-linux-5.1.0-vx-amd64-qemu.img /var/www/html/cumulus-linux-5.1.0-vx-amd64-qemu.img

echo "http://$(curl -sfSL ifconfig.me)/cumulus-linux-5.1.0-vx-amd64-qemu.img"
最終更新 2024-04-29 00:44 +0900
Built with Hugo
テーマ StackJimmy によって設計されています。