| Summary: | VirtFS fails | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | morgan read <mstuff> |
| Component: | qemu | Assignee: | Fedora Virtualization Maintainers <virt-maint> |
| Status: | CLOSED DEFERRED | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 22 | CC: | amit.shah, berrange, cfergeau, crobinso, dwmw2, itamar, mstuff, pbonzini, rjones, virt-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-02 14:38:06 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
morgan read
2016-03-14 15:10:09 UTC
Works for me with F23 host and F22 guest. Please provide the qemu commandline or libvirt XML you are using.
Here's my filesystem libvirt XML:
<filesystem type='mount' accessmode='mapped'>
<source dir='/mnt/data/devel/images'/>
<target dir='colepath'/>
</filesystem>
Then inside the VM I do:
# mount -t 9p colepath /mnt
# ls /mnt
...
And it all seems to work
Thanks Cole
Here's what I had - I'll now start changing things to look more like yours.
libvert XML from /etc/libvirt/qemu/fedora20.xml
<filesystem type='mount' accessmode='mapped'>
<driver type='path'/>
<source dir='/home/readlegal'/>
<target dir='/home/readlegal/Home'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</filesystem>
Inside fedora20 I've been doing, and done:-
$ sudo mount -t 9p -o trans=virtio,version=9p2000.L,rw /home/readlegal/Home /home/readlegal/Home
Via Nautilus:
The ~/Home directory icon shows as a mounted drive and under ‘Devices’ it is listed as a drive with a ‘unmount/ eject’ icon beside it, but when access the drive via Nautilus I get an error-
This location could not be displayed.
You do not have the permissions necessary to view the contents of “Home”.
Via gnome-terminal:
[root@localhost ~]# cd /home/readlegal/Home
[root@localhost Home]# ls
ls: cannot open directory .: Permission denied
[root@localhost Home]# logout
[readlegal@localhost ~]$ cd /home/readlegal/Home
[readlegal@localhost Home]$ ls
ls: cannot open directory .: Permission denied
[readlegal@localhost Home]$
Then, trying to unmount via Nautilus ‘unmount/ eject’ icon:
I get an error-
Unable to unmount Home
umount: /home/readlegal/Home: umount failed: Operation not permitted
Via gnome-terminal:
[readlegal@localhost ~]$ umount /home/readlegal/Home
umount: /home/readlegal/Home: umount failed: Operation not permitted
[readlegal@localhost ~]$ su -
Password:
Last login: Sat Mar 26 08:11:57 GMT 2016 on pts/0
[root@localhost ~]# umount /home/readlegal/Home
[root@localhost ~]# ls /home/readlegal/Home
TestFolder
[root@localhost ~]#
Unmounting via a root terminal seems to have succeeded with the the drive icon disappearing from the list under Devices but the directory in Nautilus not returning to a standard directory (folder) icon
mount -t 9p colepath /mnt
Following the above scheme with:
[root@localhost ~]# mount -t 9p /home/readlegal/Home /home/readlegal/Home
I get exactly the same results
I'll try playing with the XML
OK, now libvert XML from /etc/libvirt/qemu/fedora20.xml says:
<filesystem type='mount' accessmode='mapped'>
<source dir='/home/readlegal'/>
<target dir='/home/readlegal/Home'/>
</filesystem>
Hmm, interestingley, when I edit fedora20.xml as above, it gets set back to:
<filesystem type='mount' accessmode='mapped'>
<source dir='/home/readlegal'/>
<target dir='/home/readlegal/Home'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</filesystem>
By the time I view it with:
# less fedora20.xm
And, the following the above changes, I get:
[root@localhost ~]# ls /home/readlegal/Home
TestFolder
[root@localhost ~]# mount -t 9p /home/readlegal/Home /home/readlegal/Home
[root@localhost ~]# ls /home/readlegal/Home
ls: cannot open directory /home/readlegal/Home: Permission denied
[root@localhost ~]# umount /home/readlegal/Home
[root@localhost ~]# mount -t 9p -o trans=virtio,version=9p2000.L,rw /home/readlegal/Home /home/readlegal/Home
[root@localhost ~]# ls /home/readlegal/Home
ls: cannot open directory /home/readlegal/Home: Permission denied
[root@localhost ~]# umount /home/readlegal/Home
[root@localhost ~]# ls /home/readlegal/Home
TestFolder
[root@localhost ~]#
So, there doesn't seem to be any change - and VirtFS seems broken for me. I'm not sure what would be different between my set up and yours. I've only instaled f22 since the New Year
You aren't supposed to edit XML directly in /etc/libvirt, use 'virsh edit' instead: http://wiki.libvirt.org/page/FAQ#Where_are_VM_config_files_stored.3F_How_do_I_edit_a_VM.27s_XML_config.3F Make sure you stop and start the VM inbetween Are you getting any selinux errors on the host machine? Maybe see if there's any error messages in /var/log/libvirt/qemu/$vmname.log Also the use for F20 guest means it could be a guest issue, I tested with F22 guest. And the 'mount' command I used was different from yours |