1
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?

Proxmox(その1:暗号化)

1
Posted at

Proxmox自体の暗号化

無償のHypervisorであるProxmoxを使いはじめた。Proxmox自体を暗号化する(+α)手順の備忘録。なお、ここでは、VMware WorkstationにProxmoxをインストールしている。

手法

Proxmox ISOをインストール暗号化する方法では、パーティションを暗号化ことはできないようだ。なので、まず、Debianを暗号化ありでインストールし、そこにProxmoxをインストールする。DebianインストールからProxmoxをインストールする手順は、本家サイトに説明あり。

Debian

インストール

Download Debian」から、ISOイメージ(ここではVersion 13)をダウンロードし、USBスティックにそれを書き込み、そこからブート。以降、暗号化インストールに関連するところのみ記載。

まずは、ディスクパーティショニングにて、暗号化LVM選択。

暗号化LVM選択.png

パスフレーズを決める。

パスフレーズ設定.png

最終的には下記となる。

パーティショニング.png

何かあったときのため、SSHサーバーは選択しておく。

パッケージ選択.png

あとは、お好みに応じて、適宜選択。

なお、固定IPアドレス設定をしておいた方が、Proxmoxインストール時に楽になるようだ(後述) 。

起動&確認

インストール後、起動すると、設定したパスフレーズを入力するよう促される。

パスフレーズOK.png

起動後の確認。

# lsblk -f | grep LUKS
`-sda5                crypto_LUKS 2              6f74d9c3-2938-4f94-9f12-f955d13cc184

LUKS(Linux Unified Key Setup)が見え、暗号化されている様子がわかる。

# uname -a
Linux prox2 6.12.73+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.73-1 (2026-02-17) x86_64 GNU/Linux

当然であるが、この段階では、カーネルはDebian(deb13-amd64, Debian 6.12.73-1)である。

Proxmox

インストール

ここからは公式手順に従って進める。なお、下記タイトル内の英語表記は公式手順記載のタイトルと一対一の関係である。

ホスト名(Ensure Hostname Resolves to Hosts IP Address)

Debianを固定IPアドレス設定でインストールすれば、自動的に”/etc/hosts”に情報が記載される。

/etc/hosts
127.0.0.1       localhost
192.168.10.72   prox2.df.net    prox2

話はDebianに戻るが、参考までに、固定IPアドレスを設定したときのその他の情報を下記する。

/etc/network/interfaces
auto lo
iface lo inet loopback

auto ens33
iface ens33 inet static
        address 192.168.10.72/24
        gateway 192.168.10.1
        dns-nameservers 192.168.10.1 8.8.8.8 1.1.1.1
        dns-search df.net
/etc/resolv.conf
search df.net
nameserver 192.168.10.1
nameserver 8.8.8.8
nameserver 1.1.1.1

なお、”/etc/network/interfaces”は、後ほど修正する。

Proxmoxレポジトリ追加(Add Proxmox VE Repository)

ここは公式手順どおり、解説なし。

# cat > /etc/apt/sources.list.d/pve-install-repo.sources << EOL
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOL

# wget https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg -O /usr/share/keyrings/proxmox-archive-keyring.gpg
# sha256sum /usr/share/keyrings/proxmox-archive-keyring.gpg
# md5sum /usr/share/keyrings/proxmox-archive-keyring.gpg

もう少し準備。

# apt modernize-sources

updateの前に、下記が必要であった。

## ファイル名を変更して読み込まれないようにする
# mv /etc/apt/sources.list.d/moved-from-main.sources /etc/apt/sources.list.d/moved-from-main.sources.bak
# 
# apt-update
# apt full-upgrade

Proxmoxカーネルインストール(Install the Proxmox VE Kernel)

公式手順どおり。

# apt install proxmox-default-kernel
# systemctl reboot

再起動後の状況。

# uname -a
Linux prox2 6.17.13-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.17.13-2 (2026-03-13T08:06Z) x86_64 GNU/Linux

カーネルがProxmox(pve)になっている。

Proxmoxパッケージインストール(Install the Proxmox VE Packages)

リポジトリ追加が必要であった。

/etc/apt/source.list
deb http://deb.debian.org/debian trixie main contrib non-free-firmware
deb http://deb.debian.org/debian trixie-updates main contrib non-free-firmware
deb http://security.debian.org/debian-security trixie-security main contrib non-free-firmware
# apt update
# apt install proxmox-ve postfix open-iscsi chrony

Debianカーネルの削除およびGrub(ブートローダー)再設定(Remove the Debian Kernel)

PATHの追加が必要であった。

# apt remove linux-image-amd64 'linux-image-6.12*'
# PATH=$PATH:/sbin:/usr/sbin
# update-grub

os-prober削除(Remove the os-prober Package)

Dualブートをしない場合、これを削除すべしとのこと。

# apt remove os-prober

仮想スイッチ(ブリッジ)作成(Create a Linux Bridge)

Proxmoxからは物理ネットワークI/Fを直接扱うことをせず、仮想スイッチからネットワークを扱うことになるらしい。そこで、/etc/network/interfacesを修正する。

/etc/network/interfaces
face ens33 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.10.72/24
        gateway 192.168.10.1
        dns-nameservers 192.168.10.1 8.8.8.8 1.1.1.1
        dns-search df.net
        bridge-ports ens33
        bridge-stp off
        bridge-fd 0

これにより、コンテナやVMにて、ネットワークブリッジを選択できるようになる。

ブリッジ.png

起動&確認

コンソール

Console.png

ポート

# ss -ltpn
State     Recv-Q    Send-Q       Local Address:Port        Peer Address:Port    Process
LISTEN    0         4096               0.0.0.0:111              0.0.0.0:*        users:(("rpcbind",pid=721,fd=4),("systemd",pid=1,fd=43))
LISTEN    0         4096             127.0.0.1:85               0.0.0.0:*        users:(("pvedaemon worke",pid=1071,fd=6),("pvedaemon worke",pid=1070,fd=6),("pvedaemon worke",pid=1069,fd=6),("pvedaemon",pid=1068,fd=6))
LISTEN    0         128                0.0.0.0:22               0.0.0.0:*        users:(("sshd",pid=986,fd=6))
LISTEN    0         4096                  [::]:111                 [::]:*        users:(("rpcbind",pid=721,fd=6),("systemd",pid=1,fd=45))
LISTEN    0         4096                     *:3128                   *:*        users:(("spiceproxy work",pid=1097,fd=6),("spiceproxy",pid=1096,fd=6))
LISTEN    0         128                   [::]:22                  [::]:*        users:(("sshd",pid=986,fd=7))
LISTEN    0         4096                     *:8006                   *:*        users:(("pveproxy worker",pid=1087,fd=6),("pveproxy worker",pid=1086,fd=6),("pveproxy worker",pid=1085,fd=6),("pveproxy",pid=1084,fd=6))

8006がポート番号。

ブラウザアクセス

IP address:8006でアクセス。

ブラウザアクセス.png

ディスクのところで、”crypto_LUKS”が見える。

終わりに

なんとか、その2以降を考える。

1
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
1
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?