Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have defined storage pool for VMs on ZFS:

virsh # pool-dumpxml zfs
<pool type='dir'>
  <name>zfs</name>
  <uuid>b2fba550-467f-8133-dee8-44ada7d0a807</uuid>
  <capacity unit='bytes'>210316853248</capacity>
  <allocation unit='bytes'>32768</allocation>
  <available unit='bytes'>210316820480</available>
  <source>
  </source>
  <target>
    <path>/winvm/win1</path>
    <permissions>
      <mode>0700</mode>
      <owner>4294967295</owner>
      <group>4294967295</group>
    </permissions>
  </target>
</pool>

Created RAW image file for vms:

host /winvm/win1 % l
total 3.5K
drwxrwxr-x. 2 root         root           3 Jan  3 14:03 .
drwxr-xr-x  3 libvirt-qemu libvirt-qemu   3 Dec 30 13:45 ..
-rw-------. 1 libvirt-qemu libvirt-qemu 20G Jan  3 14:03 t1.raw

Defined t1 VM but when I try to start it:

host /winvm/win1 % virsh start t1
error: Failed to start domain t1
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/13
kvm: -drive file=/winvm/win1/t1.raw,if=none,id=drive-sata0-0-0,format=raw,cache=none: could not open disk image /winvm/win1/t1.raw: Invalid argument

The VM's storage file keeps changing owner to root:root:

host /winvm/win1 % ls -l
total 1
-rw-------. 1 root root 21474836480 Jan  3 14:03 t1.raw

I have SELinux disabled on that machine:

host /winvm/win1 % sestatus
SELinux status:                 disabled

Even changed user and context for it:

host /winvm/win1 % chcon -t virt_image_t -u libvirt-qemu t1.raw

And I still keep getting the error above. Why? And how can SELinux impact file access when it's disabled?

share|improve this question
    
the pool is actived? –  c4f4t0r Jan 4 at 8:26
add comment

1 Answer 1

up vote 0 down vote accepted

It's not ZFS, it's virt-manager utility that is causing incorrect configuration - the culprit is if=none added for some reason to disk spec (I've used virt-manager to define raw disk on ZFS volume). I was getting intermittent 'permission denied' errors on the disk image and so I thought it was a question of permissions. That's what happens if you set all the available options on disk image in virt-manager, apparently everyone just leaves the defaults on.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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