0

I would like to test kvm with opensuse tumbleweed. I successfully installed kvm, but I am stuck in creating my first VM.

The trick is that I want to have the VM's directory in an external HDD.

When I set the directory of the VM file I get this error message:

Impossible de terminer l'installation : « Cannot access storage file '/run/media/lowley/424b7b47-883d-42ac-b6f3-994c0c01c01f/sauvegardes/fedora-haskell.qcow2' (as uid:471, gid:10): Permission denied »

I am not very strong in managing user rights. I set root belong to the kvm group, but I still have this error.

can you help me?

thank you

olivier

EDIT

I launch it by a entering virt-manager, as me and not as root. In fact I have a shortcut on the desktop.

  • are you using libvirt (e.g. with virsh or virt-manager) or running kvm or qemu-system-$architecture directly? please edit your question and add the actual command you used to run your VM (use the {} icon in the editor to format it as code). – cas Jul 5 '16 at 2:56
  • are you in the libvirt group? do you have RW access to the .../fedora-haskell.qcow2 file? Have you created a libvirt storage pool for /run/media/lowley/424b7b47-883d-42ac-b6f3-994c0c01c01f/sauvegardes/? does the libvirt user and/or group have access to that directory? – cas Jul 5 '16 at 7:29
  • Now I'm in the libvirt group. Moreover, the qcow2 file, its containing directory and the drive are "777" using chmod. But it doesn't work. Virt-manager is complaining about search rights missing for the qcow2 file. But it works when I launch virt-manager with sudo. I would prefer to avoid this... – lolveley Jul 5 '16 at 13:31
  • indeed, with sudo I have to type the statement manually, I can't make a shortcut. have you got another suggestion? – lolveley Jul 5 '16 at 18:36
  • the only thing i can suggest is to try creating a small VM (install freedos on it, perhaps) in the standard, default storage pool provided by the libvirt package on opensuse. If that works, you need to set up the permissions on the USB drive directory & qcow2 file the same as in /var/lib/libvirt/images (or wherever opensuse's default pool is, find with virsh pool-dumpxml default | grep path). – cas Jul 6 '16 at 0:44
0

Did it! You were right: I needed to change file permissions, for the directories and the qcow2 file, the correct user was qemu and the group wheel. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.