ゲストOSを起動して作業を続行しようとしていますが、私のvirshインストールに問題があります。ここ は、インストールスクリプトの一部です:KVMゲストOS起動エラー
qemu-img create -f qcow2 -o preallocation=metadata ~/images/${vm_name}.qcow2 ${pool_size}G
# create dir for images
mkdir ~/images/
virt-install \
--connect qemu:///system \
--name $vm_name \
--ram 10240 \
--vcpus 4 \
--disk ~/images/${vm_name}.qcow2,size=$pool_size,bus=virtio,sparse=false,format=qcow2 \
--network network=default,model=virtio \
--location http://ua.archive.ubuntu.com/dists/trusty-updates/main/installer-amd64/ \
--initrd-inject=$current_dir/preseed.cfg \
--extra-args="file=file:/preseed.cfg vga=788 quiet console=tty0 utf8 console=ttyS0,115200" \
--os-type=linux \
--virt-type kvm \
--video=vga \
--noreboot \
--cpu host \
--hvm
virsh start $vm_name
echo "----------Login to console----------"
virsh console $vm_name
Imは./script.shのようなファイルは、それがエラーを生成し、このスクリプトを実行しようとすると:
Formatting '/home/{username}/images/test.qcow2', fmt=qcow2 size=53687091200 encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off refcount_bits=16
mkdir: cannot create directory '/home/flash/images/': File exists
ERROR 'DebianDistro' object has no attribute '_prefix'
error: failed to get domain 'test'
error: Domain not found: no domain with matching name 'test'
----------Login to console----------
error: failed to get domain 'test'
error: Domain not found: no domain with matching name 'test'
私はすでにKVMを再インストールしようとしていますこのガイドを使用しているqemuパッケージ - https://help.ubuntu.com/community/KVM/Installation とすべて正常に完了しました。 スクリプトは問題なく他のマシンで使用していたのと同じように動作します。
もう一つの試み:私はのvirt-インストール--osバリアントにより、すべてのOSのバリアントを一覧表示しようとしているときにも
ERROR internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
:
virt-install --connect qemu:///system -n test -r 10240 \
--vcpus=4 \
--disk path=/data0/images/test.img,size=50,format=qcow2,bus=virtio,cache=none \
--cdrom /home/{username}/Downloads/kvm/ubuntu-14.iso \
--vnc \
--os-type=linux \
--accelerate \
--network network=default \
--hvm
の下にそのスクリプトを使用すると、エラーを生成しますこのコマンドを認識できず、バリエーションを表示する代わりにゲストOSを起動しようとしています。
問題の原因を調べてもらえますか?このエラーを修正するには