[opensuse-virtual] Host-VM filesystem sharing issues using 9p
Hypervisor and both VMS are openSUSE 13.2, two VM definitions (template and gary respectively) have the following: <filesystem type='mount' accessmode='squash'> <source dir='/xxx/yyy/zzz/template'/> <target dir='Sec'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </filesystem> -- <filesystem type='mount' accessmode='squash'> <source dir='/xxx/yyy/zzz/gary'/> <target dir='ABC'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </filesystem> Although /xxx/yyy/zzz isn't the real path, the two subdirectories do exist under a common parent. Permissions are: (from root) drwxr-xr-x 5 root root 4096 Aug 11 13:25 xxx (from xxx) drwxr-xr-x 5 root root 1024 Jan 7 18:15 yyy (from yyy) drwxr-xr-x 8 qemu qemu 1024 Jan 11 11:48 zzz (from zzz) drwxrwxr-x 2 qemu libvirt 1024 Jan 14 12:23 gary drwxrwxr-x 2 qemu libvirt 1024 Jan 13 08:19 template On template things work template:/mnt # mount -t 9p -o trans=virtio,version=9p2000.L Sec /mnt/Demo template:/mnt # ll Demo total 3 -rw-r--r-- 1 root root 26 Jan 11 11:08 2nd-Example -rw-r--r-- 1 root root 93 Jan 11 10:45 Example -rw-r--r-- 1 478 474 8 Jan 13 08:19 test On gary I have to load the 9p modules for some reason but, after I do, I get: gary:/mnt # lsmod | grep 9p 9pnet_virtio 17529 0 9p 57012 0 9pnet 80300 2 9p,9pnet_virtio virtio_ring 21225 4 virtio_pci,virtio_rng,virtio_balloon,9pnet_virtio virtio 14474 4 virtio_pci,virtio_rng,virtio_balloon,9pnet_virtio However, gary:/mnt # mount -t 9p -o trans=virtio,version=9p2000.L ABC tmp mount: special device ABC does not exist I've used ABC on another hypervisor, that name isn't a problem. Any ideas or anything else I should check? Other questions: Is there a way to list the 9p "target dir" names on either the hypervisor or, more importantly, the VM? Can duplicate "target dir" entries be used on the same hypervisor if they are for different VMs (i.e, a target dir of ABC on different VMs)? Is so, can they have different paths? Confidentiality Notice | This email and any included attachments may be privileged, confidential and/or otherwise protected from disclosure. Access to this email by anyone other than the intended recipient is unauthorized. If you believe you have received this email in error, please contact the sender immediately and delete all copies. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
Hi Leroy, On Fri, 2016-01-15 at 13:34 -0600, Leroy Tennison wrote:
On gary I have to load the 9p modules for some reason but, after I do, I get:
gary:/mnt # lsmod | grep 9p 9pnet_virtio 17529 0 9p 57012 0 9pnet 80300 2 9p,9pnet_virtio virtio_ring 21225 4 virtio_pci,virtio_rng,virtio_balloon,9pnet_virtio virtio 14474 4 virtio_pci,virtio_rng,virtio_balloon,9pnet_virtio
Weird that you have to manually load them. Did you check the /var/log/messages or dmesg for errors?
However,
gary:/mnt # mount -t 9p -o trans=virtio,version=9p2000.L ABC tmp mount: special device ABC does not exist
I've used ABC on another hypervisor, that name isn't a problem. Any ideas or anything else I should check?
Other questions:
Is there a way to list the 9p "target dir" names on either the hypervisor or, more importantly, the VM?
You can see them in the pci devices. Something like this can show you the tag: cat /sys/devices/pci0000\:00/0000\:00\:06.0/virtio1/mount_tag Note that you can get the PCI device address either using lspci in the guest or using within the guest XML definition (libvirt adds them for you)
Can duplicate "target dir" entries be used on the same hypervisor if they are for different VMs (i.e, a target dir of ABC on different VMs)? Is so, can they have different paths?
You can have the same mount tag in several guests with different paths both in the guest and in the host. -- Cedric -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
Thank you for your reply, I certainly appreciate it. This information is very helpful. I too was surprised that the 9p drivers weren't loaded, particularly since another openSUSE 13.2 VM which I thought was identically built just worked. Running 'journalctl --since 2016-01-14' (there is no /var/log/messages now that systemd handles logging) had several "9pnet: Could not find request transport: virtio" entries as well as "pnet_virtio: no channels available" but this was before I learned that placing "9pnet_virtio" on a line by itself in in /etc/modules-load.d/9pnet_virtio.conf would load them on boot (I had tried adding to /etc/modprobe.d/99-local.conf in desperation before learning this - saw those error messages in the output). I got the "no channels" error one more time. I learned just last night that, if I did 'modprobe p9' on the command line, the mount worked afterward (9pnet_virtio didn't autoload it as it apparently did 9pnet and possibly virtio_ring and virtio). I wasn't aware I could translate the address line in the xml to a location under /sys/devices (I'm still not sure how you knew to add some of the extra zeros). Howeve, doing 'find /sys/devices -name mount_tag' located the file for me. I also appreciate the information about how i can use mount tags for several VMs. ----- Original Message ----- From: "Cedric Bosdonnat" <cbosdonnat@suse.com> To: "Leroy Tennison" <leroy@datavoiceint.com>, opensuse-virtual@opensuse.org Sent: Tuesday, January 19, 2016 4:16:08 AM Subject: Re: [opensuse-virtual] Host-VM filesystem sharing issues using 9p Hi Leroy, On Fri, 2016-01-15 at 13:34 -0600, Leroy Tennison wrote:
On gary I have to load the 9p modules for some reason but, after I do, I get:
gary:/mnt # lsmod | grep 9p 9pnet_virtio 17529 0 9p 57012 0 9pnet 80300 2 9p,9pnet_virtio virtio_ring 21225 4 virtio_pci,virtio_rng,virtio_balloon,9pnet_virtio virtio 14474 4 virtio_pci,virtio_rng,virtio_balloon,9pnet_virtio
Weird that you have to manually load them. Did you check the /var/log/messages or dmesg for errors?
However,
gary:/mnt # mount -t 9p -o trans=virtio,version=9p2000.L ABC tmp mount: special device ABC does not exist
I've used ABC on another hypervisor, that name isn't a problem. Any ideas or anything else I should check?
Other questions:
Is there a way to list the 9p "target dir" names on either the hypervisor or, more importantly, the VM?
You can see them in the pci devices. Something like this can show you the tag: cat /sys/devices/pci0000\:00/0000\:00\:06.0/virtio1/mount_tag Note that you can get the PCI device address either using lspci in the guest or using within the guest XML definition (libvirt adds them for you)
Can duplicate "target dir" entries be used on the same hypervisor if they are for different VMs (i.e, a target dir of ABC on different VMs)? Is so, can they have different paths?
You can have the same mount tag in several guests with different paths both in the guest and in the host. -- Cedric -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org Confidentiality Notice | This email and any included attachments may be privileged, confidential and/or otherwise protected from disclosure. Access to this email by anyone other than the intended recipient is unauthorized. If you believe you have received this email in error, please contact the sender immediately and delete all copies. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
participants (2)
-
Cedric Bosdonnat
-
Leroy Tennison