2

I am trying to get my Windows Qemu KVM to be able to access the host Kubuntu filesystem, so that I can work with files on Linux and Windows at the same time. I tried looking for various guides online, but what I found are either outdated or inapplicable. The most up to dated guide I can find is this one, which I followed until it mentioned running the spice-webdav service, after which it says to run map-drive.bat, which would "map the shared folder, which is by default ~/Public". It gives an alternative to change the shared folder, which requires the use of virt-viewer instead.

  1. I found that using virt-viewer still doesn't let me configure the shared folder (the option is still blacked out and disabled). Any ideas on what I can try?
  2. Even if I accepted the shared folder being ~/Public, I still don't know where it gets mapped to on Windows.

In case it helps, I have a folder sharing via smb, which I can use to transfer files, but I'm looking for something a program in Linux and Windows can both read and write to, for example mapping ~/Documents/ on Linux to C:\Users\User\Documents\ on Windows. I'd like my stuff in a single place, not scattered between systems.

Any ideas as to what I can try?

Thank you for your time.

4
  • Can you get standard "other system" access by mapping a drive? I do that with both Ubuntu and Kali on a Windows 10 Host with VMware Workstation. File sharing / map network drive is straightforward and you can keep documents where you need to.
    – John
    Oct 9, 2020 at 12:19
  • @John Sorry, I'm not sure I understand what you mean. Can you explain more and/or point me to a guide? Oct 9, 2020 at 12:27
  • I just use smb //192.168.x.y/drive_identifier and authenticate.
    – John
    Oct 9, 2020 at 12:29
  • @John Thank you, this works fine for me. I guess I was making it too complicated by thinking about it at the KVM level. Oct 9, 2020 at 13:55

3 Answers 3

2

I won't go into the details, because SU users are expected to do a little bit of own research. Having said this, there are many ways to achieve what you want. Two of them are:

  • On your host (Kubuntu), install the samba-server package. Over-simplified, this enables you to make your host (Kubuntu) provide network shares as if it were a Windows PC. From your guest (Windows), you can access these shares as if they were provided by another Windows machine.

    If you opt for this, please read the manuals about the correct Samba configuration (probably /etc/samba/smb.conf or the like), because configuring the Samba server on Kubuntu can open security problems when done wrong.
  • On your host (Kubuntu), install the OpenSSH server (probably the package name is openssh-server); this package usually includes the sftp-server subsystem. In your guest (Windows), install an SFTP client (I prefer WinSCP) and use that to access the host's file system via sftp.

    Once again, when installing the SSH server in Kubuntu, be sure to read its manuals, notably that for sshd_config, to avoid security problems.

There are several other solutions to this problem, but I think we can't list all of them here.

By the way, the solutions outlined above work without installing or configuring KVM specialties or agent software on the host or the guest. You just need well-known and well-documented standard packages and don't need to follow hard-to-grasp tutorials.

An additional benefit is that you can access the Kubuntu file system not only from your guest, but from any Windows PC, because Samba and sftp work over networks.

Regarding the mapping you mentioned: You can easily map a network share (exported by your Host) to a directory in Windows. For example, this question on SuperUser explains how to do it.

2
  • Thank you for the suggestion, Samba worked fine for me. I guess I was making it too complicated by thinking about it at the KVM level. Oct 9, 2020 at 15:55
  • Thanks for accepting the answer. Well, I admit that I haven't tested both solutions (Samba vs. "Shared Folders") in terms of performance. But in every case, Samba is a good starting point. And if you are afraid of opening the Kubuntu host too wide, you could block the SMB ports there for any other machine than your Windows guest (using the Kubuntu firewall solution (which I don't have a clue of)).
    – Binarus
    Oct 10, 2020 at 7:58
0

Assuming the virtualizing app provides the infrastructure (very common now) just use SMB to map a folder

SMB //192.168.x.y/drive_identifier and authenticate

This works in my Ubuntu and Kali machines using VMware Workstation as a structure.

SMB mapping also works if Samba is installed, set up and running.

2
  • Thank you for the suggestion, Samba worked fine for me. I guess I was making it too complicated by thinking about it at the KVM level. Oct 9, 2020 at 15:56
  • Adding Samba is fine and then the SMB mapping will also work that way
    – John
    Oct 9, 2020 at 15:59
-1

or use vmware workstation I just started a little project to migrate from vmware to kvm-qemu Windows 10 Guest is up and running fine.... but no direct connection of a physical blue-ray player to the guest nor an easy way to share files between the centos host (or any other linux host) and a windows 10 guest

1
  • This doesn't answer the question and probably isn't what the OP is looking for. When you answer, please provide a solution that answers this question, not point to another product.
    – Phoenix
    Feb 9, 2021 at 2:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .