Cockpitで自前のISOから仮想マシンを作成できないときの対処法

black and white electronic devices サーバー
Photo by capt.sopon on Pexels.com

エラー『Operation not permitted』

最近仮想化にハマっています。あるとき、Windows Server 2016をインストールしようと、ダウンロードしておいたISOファイルから仮想マシンを作成しようとするとこんなエラーが出ました。

Danger alert:VM test の作成に失敗 

ERROR internal error: process exited while connecting to monitor: 2024-04-14T16:13:07.318288Z qemu-system-x86_64: -blockdev {“driver”:”file”,”filename”:”/home/[ユーザー名]/ダウンロード/wserver2016.ISO”,”node-name”:”libvirt-1-storage”,”auto-read-only”:true,”discard”:”unmap”}: Could not open ‘/home/[ユーザー名]/ダウンロード/wserver2016.ISO’: Permission denied Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh –connect qemu:///system start test otherwise, please restart your installation.

isoファイルのパーミッションを777にするも改善せず。

色々調べた結果以下のことで改善しました。

改善策

1.ISOファイルを /var/lib/libvirt/images に移す

sudo mv [ファイルのあるパス] /var/lib/libvirt/images

2.ディレクトリとその中のファイルの権限を変更

chmod go+rx /var/lib/libvirt/images
chmod o-rwx /var/lib/libvirt/images/*

おわりに

/etc/libvirt/qemu.confを編集したり専用のユーザーを作成するのが好ましいらしいが面倒なのでこれでよし。

コメント

タイトルとURLをコピーしました