You are not logged in.

#1 2013-09-27 16:43:28

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 505

[SOLVED]virt-manager could not open disk image permission denied

While I'm finishing the "New VM" wizard I'm seeing this error,

Unable to complete install: 'internal error: process exited while connecting to monitor: char device redirected to /dev/pts/1 (label charserial0)
qemu-system-x86_64: -drive file=/home/r0b0t/KVM/yunohost/yunohostv2-latest-amd64-test.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/r0b0t/KVM/yunohost/yunohostv2-latest-amd64-test.iso: Permission denied

Traceback:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1920, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/share/virt-manager/virtinst/Guest.py", line 1134, in start_install
    noboot)
  File "/usr/share/virt-manager/virtinst/Guest.py", line 1202, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib/python2.7/site-packages/libvirt.py", line 2886, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/1 (label charserial0)
qemu-system-x86_64: -drive file=/home/r0b0t/KVM/yunohost/yunohostv2-latest-amd64-test.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/r0b0t/KVM/yunohost/yunohostv2-latest-amd64-test.iso: Permission denied

The iso permission is set to  777
I tried also changing the qemu.conf group to kvm,
I tried like everything but still no joy.

Any idea?

Last edited by r0b0t (2013-09-27 19:00:41)

Offline

#2 2013-09-27 18:44:48

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 505

Re: [SOLVED]virt-manager could not open disk image permission denied

The problem seems to be related with qemu, for some permission reason can't traverse partitions so I can start the system only if I use the default storage in /var/lib/libvirt/images and I put also the .iso there.

Any idea on how to set qemu permissions in order to make it "load" also from other partitions ?

Offline

#3 2013-09-27 19:01:51

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 505

Re: [SOLVED]virt-manager could not open disk image permission denied

I'm not sure as it solved or not, and this is more a workaround than a real solution, by using a NTFS partition which I use also from windows as Input (.iso) and output (qcow2) doesn't give any problems with permissions.

Offline

#4 2013-09-27 19:19:58

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED]virt-manager could not open disk image permission denied

Have you tried making the directory into libvirt storage (dunno what it's called). You may also try giving group kvm ownership of the directory. I think this happens when it's made into libvirt storage, but it's been a while.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2013-09-27 19:25:13

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 505

Re: [SOLVED]virt-manager could not open disk image permission denied

I don't understand.. hmm  what do you mean?
to create a new directory here?
# ls -aclh /var/lib/libvirt/
total 44K
drwxr-xr-x 11 root   root 4.0K Aug 24 22:21 .
drwxr-xr-x 44 root   root 4.0K Sep 27 13:10 ..
drwxr-xr-x  2 root   root 4.0K Aug 24 22:21 boot
drwxr-xr-x  2 root   root 4.0K Sep 27 19:30 dnsmasq
drwxr-xr-x  2 root   root 4.0K Aug 24 22:21 filesystems
drwxrwxrwx  2 nobody kvm  4.0K Sep 27 22:03 images
drwxr-xr-x  3 root   root 4.0K Aug 24 22:21 lockd
drwxr-xr-x  2 root   root 4.0K Aug 24 22:21 lxc
drwxr-xr-x  2 root   root 4.0K Sep 27 13:23 network
drwxr-xr-x  6 nobody kvm  4.0K Sep 27 21:57 qemu
drwxr-xr-x  2 root   root 4.0K Aug 24 22:21 uml

images has already the correct permissions (kvm) as group.
creating a directory here wouldn't have a point as also the default wont work, not sure I understood..

Offline

#6 2013-09-27 19:47:25

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED]virt-manager could not open disk image permission denied

What I mean is configure the directory /home/r0b0t/KVM/yunohost/ to be a storage pool for libvirt. At least, I think that's what you're supposed to do. I dropped libvirt a long time ago, and weirdness with storage pools was one of the reasons. But maybe that was PEBKAC. Anyway look here.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#7 2013-09-27 19:53:56

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 505

Re: [SOLVED]virt-manager could not open disk image permission denied

Yes of course, I created from the beginning the storage pool on /home/r0b0t/KVM/yunohost/ and didn't work, for some reason however the new storage pool on my NTFS partition is working good, right now finishing the installation.

I wished I knew more about qemu xD.
(Thanks smile )

Last edited by r0b0t (2013-09-27 19:54:23)

Offline

#8 2013-09-27 19:55:43

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 505

Re: [SOLVED]virt-manager could not open disk image permission denied

btw, what other *serious* options do we have?

If we want some performance KVM is the only way, and with what I'm trying to do virtualbox is really not an option, especially if you use more than 1 interface / host... (it randomly switches them...)

Offline

#9 2013-09-27 19:58:26

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED]virt-manager could not open disk image permission denied

I use qemu, but wrote a simple launcher script and config file syntax that's suitable for my needs.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#10 2013-09-28 11:39:35

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED]virt-manager could not open disk image permission denied

If you are using '/home/r0b0t/KVM/yunohost/' then your problem is that qemu runs as nobody; which can't access /home/r0b0t (and thus files in subdirectories). The only reason that NTFS works is that you didn't mount it in your homedirectory hmm

And if you are chmodding 777 then you're not doing it right. Read up on *nix permissions smile

Last edited by Spider.007 (2013-09-28 11:40:12)

Offline

#11 2013-09-29 17:50:39

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 505

Re: [SOLVED]virt-manager could not open disk image permission denied

Yes, actually that was weird, to me chmoding something to 777 meaned that anybody can access that file (which is true), but I forgot about moving between partitions etc...
Thanks for the head's up, however for now I'm happy with the NTFS big_smile partition, also because I didn't had much space left on my home so it's just fine.
I gues running qemu as my user or another "guy" different from nobody would work, but that on a system accessed from other people (it's not my case, but just a FYI for the one reading) wouldn't be a good idea.

Offline

Board footer

Powered by FluxBB