Results 1 to 10 of 10

Thread: qemu Shared Folder

  1. #1
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,816
    Distro
    Ubuntu Mate 22.04 Jammy Jellyfish

    qemu Shared Folder

    I am trying to share a folder on my ubuntu 22.04 host and a folder on my ubuntu 22.04 qemu vm. On my host I have created /home/dad/vmhost and on the vm created /home/dad/hostshare

    I have been following various gui (youtube) and text instructions. I get to the point on the vm where I type:

    sudo mount -t 9p -o trans=virtio /sharepoint hostshare

    when I enter that command I get:

    mount: /home/dad/hostshare: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.

    Any advice appreciated.

  2. #2
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,752

    Re: qemu Shared Folder

    No advice on mounting, but you could just connect to the host with ssh, access a folder there, and copy or past files. That's how I share files between a vm and host.

  3. #3
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: qemu Shared Folder

    Here's how I've been doing it for some time now.
    https://www.debugpoint.com/share-folder-virt-manager/

    You need to do all the setting up as shown in that webpage and it should then work faultlessly for you as it does for me.
    I haven't bothered with mounting the folder in the VM's /etc/fstab file but simply mount it when I need it then unmount when I've finished using it.

  4. #4
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: qemu Shared Folder

    Quote Originally Posted by ajgreeny View Post
    I haven't bothered with mounting the folder in the VM's /etc/fstab file but simply mount it when I need it then unmount when I've finished using it.
    +1
    easy peasy, and goes with my K.I.S.S habits.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  5. #5
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: qemu Shared Folder

    -1 :
    Why?

    virtiofs is still broken: https://bugs.launchpad.net/ubuntu/+s...u/+bug/2033957

    They came up with a patch, tested, works, and built the fixed package... but it is still in Proposed. So, at least for "now", you won't get it unless you enable the Proposed Repo.

    I do NFS network shares between my hosts and VM's.
    Last edited by MAFoElffen; September 24th, 2023 at 05:58 AM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  6. #6
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: qemu Shared Folder

    My version of virtiofs is obviously not broken, and I can confirm that I am using all the packages from the default jammy repos with no proposed repos enabled. I wonder what I am doing differently that gives me this success where others are having problems.

    I set everything up exactly as shown in that link in my last post #3 and it has never let me down so far.

  7. #7
    Join Date
    May 2008
    Beans
    4,010
    Distro
    Ubuntu 24.04 Noble Numbat

    Re: qemu Shared Folder

    +1 with ajgreeny and this tutorial https://www.debugpoint.com/share-folder-virt-manager/

    Ubuntu 22.04 host
    Ubuntu 23.04 guest

    Using qemu-system-x86:amd64 1:6.2+dfsg-2ubuntu6.12 1:6.2+dfsg-2ubuntu6.13

    However, the bug report is dated 02 September 2023 and the package above was upgraded on my system on 06 September 2023

    I first tried this sharing method a few months ago and never experienced any problem
    Last edited by tea for one; September 24th, 2023 at 03:30 PM.

  8. #8
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: qemu Shared Folder

    Yep no problems here as well, even with:
    Code:
    apt policy virtiofsd
    virtiofsd:
      Installed: 1.7.0-3
      Candidate: 1.7.0-3
      Version table:
     *** 1.7.0-3 500
            500 http://archive.ubuntu.com/ubuntu mantic/universe amd64 Packages
            100 /var/lib/dpkg/status
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  9. #9
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: qemu Shared Folder

    I am still mounting the shared virtiofs I have setup in my Ubuntu VMs using a manual mount command
    Code:
    sudo mount -t virtiofs Host /Host
    with /Host as the mountpoint and my shared virtiofs named Host.
    I said in my previous post #3 that I have not bothered using fstab to mount the virtiofs but I have decided to now try doing so.
    Can anyone tell me the required line in /etc/fstab to do this as all I've tried has failed in spite of searching everywhere I can think of.

  10. #10
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: qemu Shared Folder

    Just in case anyone sees my query about using fstab in post #9 and prefers to add the mount at boot, here is the needed entry for /etc/fstab
    Code:
    Host /Host virtiofs defaults 0 0
    this again with my shared virtiofs named Host and /Host as the mountpoint of my shared virtiofs.

Bookmarks

Posting Permissions

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