1

Installing an additional VM with the virt-install command results in the following error:

ERROR    internal error: process exited while connecting to monitor: 2019-02-20T08:21:45.534416Z qemu-system-x86_64: -drive file=/home/chris/VM/ubuntu-16.04.iso,format=raw,if=none,id=drive-ide0-0-0,readonly=on: Could not open '/home/chris/VM/ubuntu-16.04.iso': Permission denied

This is my virt-install command:

sudo virt-install \
-n VPNserver \
--description "VPN server" \
--os-type=Linux \
--os-variant=ubuntu16.04 \
--ram=1096 \
--vcpus=1 \
--disk path=/var/lib/libvirt/images/vpnserver.img,bus=virtio,size=10 \
--network bridge:br2 \
--graphics none \
--location /home/chris/VM/ubuntu-16.04.iso \
--extra-args console=ttyS0 \
--autostart

File permissions in /chris/home/VM/: -rw-rw-r-- 1 chris chris 93 Jan 3 14:15 Fileserver.README -rwx------ 1 chris chris 334 Nov 21 09:20 installFileserver -rwx------ 1 chris chris 332 Feb 20 08:21 installVPNServer -rwx------ 1 chris chris 331 Nov 21 09:20 installWebserver -rw-rw-rw- 1 chris chris 795 Jan 24 13:10 README.txt -rw-rw-r-- 1 libvirt-qemu kvm 912261120 Jul 31 2018 ubuntu-16.04.iso

Similar question:

virt-install cannot use ISO file as location

What I've tried...

1) "chown" the iso file to user 'chris'

2) Moved the file to the /tmp directory

3) Sudo -s and executed script.

4) Redownload the iso image.

cworner1
  • 113
  • 5

3 Answers3

1

It is possible $HOME permissions are too strict. It is not sufficient for the ISO to be readable - each parent directory needs to have 'x' permission too.

ApArmor or SELinux could be denying access to files under $HOME and/or /tmp

Since you're using the privileged libvirtd the recommended approach is to simply keep the ISO images under /var/lib/libvirt/images/ too, alongside the disks.

DanielB
  • 1,510
  • 6
  • 7
0

Had a similar case where virt-install failed with:

Starting install...
Retrieving file vmlinuz...                                                                                                                                            | 9.4 MB  00:00:00
Retrieving file initrd.img...                                                                                                                                         |  72 MB  00:00:00
ERROR    internal error: process exited while connecting to monitor
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start mymachine.local
otherwise, please restart your installation.

After goofing around, I noticed the OOM shooting the created machine, found after looking at machine state with dmesg.

Since I configured hugepages to take almost all my hypervisor memory so machines get fast reserved space, I needed to add --memorybacking hugepages=yes to my virt-install command.

Orsiris de Jong
  • 213
  • 1
  • 10
  • This is helpful, but not relevant to the problem described above. You should instead [ask and answer your own question](/help/self-answer) so that others with the _same_ issue can find it. – Michael Hampton Sep 22 '21 at 19:31
0

virt-install runs under qemu user. You will find on ISO file user and group would have changed to qemu. This user would not have permissions to see /home/chris and sub-folders. You should copy iso to a folder like /tmp and that should take care of the issue.