Results 1 to 5 of 5

Thread: KVM - NTFS Permissions requirement

  1. #1
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,368
    Blog Entries
    2

    Default KVM - NTFS Permissions requirement

    Just started playing around with KVM, early impressions impressed by openSUSE implementation.

    Setup:
    openSUSE 12.1
    KDE
    NTFS partition configured with fmask=113 and dmask=002 to permit User writes
    Code:
    /dev/disk/by-id/ata-Hitachi_HTS725032A9A364_100711PCKC00VPKJ6YXJ-part3 /windows/E           ntfs-3g    users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0
    as described in
    SDB:NTFS - openSUSE


    Problem:
    Unable to create a new VM on an NTFS partition.
    Consistent error is "Internal error process exited while connecting to monitor qemu (then blah blah relating to file lacation) ending in "Permission denied". Indeed, when I inspect the location where I'd expect the qemu monitor file, no new files exist.

    Interestingly, earlier when I had explicitly configured the fstab partition entry to declare the User as owner of the NTFS partition, the KVM VM creator was able to create the qemu monitor file and the directory which probably would hold the VM storage file(s), but then failed at the same error (unable to connect to the qemu monitor file, insufficient permissions).

    When I allow the KVM VM creator to point to the default location (/var/lib/libvirt/qemu) there is not a problem.

    Prelim analysis:
    Probably relates to understanding the security context of the KVM VM installer, then matching to appropriate permissions on the partition possibly complicated by the partition being NTFS. Despite KVM VM creator launched by YAST (which requires root level permissions) I suspected that the KVM VM creator was running in User level permissons, specifically the logged in User but the two ways I configured the NTFS partition to allow User writes (by file ownership and then by fmask/dmask) are not completely successful. Or, I could be all wrong since writing to the default location works fine which requires root permissions... But if that is the case why wouldn't writing to an NTFS permission by default work since by default openSUSE mounts NTFS partitions with root write only permissions by default?

    Suggestions welcomed.

    TIA,
    TS

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: KVM - NTFS Permissions requirement

    So its good to give each VM a try out to see how it works. My suggestions are...

    1. Change the fstab options to just say defaults:

    Code:
    /dev/disk/by-id/ata-Hitachi_HTS725032A9A364_100711PCKC00VPKJ6YXJ-part3 /windows/E           ntfs-3g defaults 0 0
    <OR>

    2. Stop using a NTFS partition and switch to EXT4

    Let me say that I do have NTFS partitions and have two even as we speak, but native stuff written for openSUSE or Linux most likely should not be created on NTFS. I have a Windows Partition and a Multimedia partition, both NTFS. But I keep VirtualBox on a EXT4 partition where it works very well for me using standard default fstab entries for EXT4. That does not mean I have tried to use KVM as you have but on an EXT4 partition, but that is what I would suggest to you.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: KVM - NTFS Permissions requirement

    On 2012-06-01 02:06, jdmcdaniel3 wrote:
    > 2. Stop using a NTFS partition and switch to EXT4
    >
    > Let me say that I do have NTFS partitions and have two even as we
    > speak, but native stuff written for openSUSE or Linux most likely should
    > not be created on NTFS. I have a Windows Partition and a Multimedia
    > partition, both NTFS. But I keep VirtualBox on a EXT4 partition where
    > it works very well for me using standard default fstab entries for EXT4.
    > That does not mean I have tried to use KVM as you have but on an EXT4
    > partition, but that is what I would suggest to you.


    If I recall correctly, ntfs-3g runs in userspace. I wonder if you can run
    virtualization of any type over it reliably.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,368
    Blog Entries
    2

    Default Re: KVM - NTFS Permissions requirement

    Update
    Circumstantial evidence suggests that the KVM virt-manager tools are locked into accessing locations only on Disk 0 (the default disk). Was able to create, manage and run VMs only on that disk nomatter what partition, a second interior disk and any external disk are inaccessible no matter the format.

    Anyone know if this is by design or likely a bug?

    Thx,
    TS

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,368
    Blog Entries
    2

    Default Re: KVM - NTFS Permissions requirement

    Update:
    Am still mystified.
    After reading some documentation, suspected perhaps some kind of Storage Pool snafu. Unfortunately, doesn't seem to be the case.

    Default storage pool configured as type Filesystem Directory which I assume permits access to a backing file located anywhere on the local file system and should not be restricted to Disk0.

    Still, I created new storage pools on the locations I described earlier... an NTFS partition on a second interior physical disk and a FAT32 partition on an external USB connected disk, both also configured as type Filesystem Directory.

    I was able to start the storage pool defined on the NTFS partition,
    Curiously the storage pool located on the FAT32 partition on external disk is shaded and cannot start.

    Result though when attempting to create a new VM in each new storage pool is still the same and identical... VMM cannot establish a connection, permission denied.

    TS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •