I am using this command (using virt-install
on a debian 7 host) to start the installation of windows7
guest OS. I have assembled the following from a plethora of sites
virt-install --connect qemu:///system \
-n win7vnc -r 2048 --vcpus=2 \
--disk path=/mnt/hd_nass/vms/win7/win7.img,format=qcow2 \
--network network=default,mac=RANDOM \
--graphics vnc,password=johndoe,port=5900
-c ../../isos/win7_sp1_ult_64bit/Windows\ 7\ SP1\ Ultimate\ \(64\ Bit\).iso \
--os-type=windows --os-variant=win7 --boot cdrom,hd
The server is running headless but I presume the vnc
clause takes care of creating a suitable environment for qemu. This is not the case however as I get this error:
ERROR internal error process exited while connecting to monitor: char device redirected to /dev/pts/2
what is more I get one additional error, that relates to the disk image:
kvm: -drive file=/mnt/hd_nass/vms/win7/win7.img,if=none,id=drive-ide0-0-0,format=qcow2: could not open disk image /mnt/hd_nass/vms/win7/win7.img: Permission denied
I created the image as my non-root user, with the command:
qemu-img create -f qcow2 win7.img 100G
still everytime I run virt-install
command above (as my non-root user), the image ownership is reset to root:root
. This could explain the "permission denied" error, but why would the img ownership change anyway?
EDIT: the log from the last dump is here
virt-install
is a libvirt tool, so it will run and access files under the local libvirt credentials (defined in /etc/libvirt/libvirtd.conf). You need to make sure the image permissions are the same, and that the image resides in a dir accessible to libvirt and kvm/qemucould not open disk image /mnt/hd_nass/vms/win7/win7.img: Permission denied
Well, that confirms a permission problem.Check the permissions of all the parent directories as well.