I've been using VirtualBox for several years with generally good results, but decided to try KVM as an alternative. I've converted a Windows VM from VBox to KVM format and it works well enough for my needs (it may even be faster), except that I can't see how to share files between the VM and my Fedora host.
Clearly this could be done using Samba or NFS. Is there an easier way? In VBox it's all point-and-click so some guidance would be appreciated.
poc
On 8 February 2016 03:35:32 GMT, Earl A Ramirez earlaramirez@gmail.com wrote:
Clearly this could be done using Samba or NFS. Is there an easier
way?
Personally I have been using Samba, haven't seen an easier way.
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
If you are using virt-manager to manage the the VM add a disk and have a look at the different disk types I think there may be a filesystem option, although I don't have a machine in front of me to confirm it.
Or put the things you need in a directory and run mkisofs against it to create a temporary ISO and mount that.
Or use the Spice console instead of the vnc console and add a USB redirection device so you can pass through USB devices from the host to the guest and copy the things on to an intermediate USB stick.
Or If your VM is using a qcow2 image investigate the guestfish tools for directly editing the disk image. I'd not recommend this on a running VM though. -- Junk
Depending on the type of datas you have, the easiest way would be to have something like a nas and access to your data through network. This way there will no problem accessing your datas from both host and guest. A similar way to do this might be to create a docker container running with a specific partition the disk won't touch, and same way put it on the local network imo, did not test that though.
2016-02-08 15:50 GMT+01:00 Junk junk@therobinsonfamily.net:
On 8 February 2016 03:35:32 GMT, Earl A Ramirez earlaramirez@gmail.com wrote:
Clearly this could be done using Samba or NFS. Is there an easier
way?
Personally I have been using Samba, haven't seen an easier way.
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
If you are using virt-manager to manage the the VM add a disk and have a look at the different disk types I think there may be a filesystem option, although I don't have a machine in front of me to confirm it.
Or put the things you need in a directory and run mkisofs against it to create a temporary ISO and mount that.
Or use the Spice console instead of the vnc console and add a USB redirection device so you can pass through USB devices from the host to the guest and copy the things on to an intermediate USB stick.
Or If your VM is using a qcow2 image investigate the guestfish tools for directly editing the disk image. I'd not recommend this on a running VM though. -- Junk -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Mon, 2016-02-08 at 12:35 +0900, Earl A Ramirez wrote:
Clearly this could be done using Samba or NFS. Is there an easier way?
Personally I have been using Samba, haven't seen an easier way.
Yes, that seems to be the way to go. I'm almost there (having figured out that I needed to open a hole in the host firewall), just having a problem getting the guest to authenticate. I don't understand CIFS passwords :-(
poc
On Mon, 2016-02-08 at 14:50 +0000, Junk wrote:
If you are using virt-manager to manage the the VM add a disk and have a look at the different disk types I think there may be a filesystem option, although I don't have a machine in front of me to confirm it.
Or put the things you need in a directory and run mkisofs against it to create a temporary ISO and mount that.
Or use the Spice console instead of the vnc console and add a USB redirection device so you can pass through USB devices from the host to the guest and copy the things on to an intermediate USB stick.
Or If your VM is using a qcow2 image investigate the guestfish tools for directly editing the disk image. I'd not recommend this on a running VM though.
Not really my use case (I just want to share a few local files back and forth) but thanks anyway.
poc
On Mon, 2016-02-08 at 16:18 +0100, thibaut noah wrote:
Depending on the type of datas you have, the easiest way would be to have something like a nas and access to your data through network. This way there will no problem accessing your datas from both host and guest. A similar way to do this might be to create a docker container running with a specific partition the disk won't touch, and same way put it on the local network imo, did not test that though.
Thanks, but that's way too complicated for what I'm trying to do.
poc
On Mon, 2016-02-08 at 17:43 +0000, Patrick O'Callaghan wrote:
On Mon, 2016-02-08 at 12:35 +0900, Earl A Ramirez wrote:
Clearly this could be done using Samba or NFS. Is there an easier way?
Personally I have been using Samba, haven't seen an easier way.
Yes, that seems to be the way to go. I'm almost there (having figured out that I needed to open a hole in the host firewall), just having a problem getting the guest to authenticate. I don't understand CIFS passwords :-(
poc
First you will need a local account on for this I usually create a user without any shell access $ sudo useradd -s /sbin/nologin smbuser
Then you will have to create the samba user $ sudo smbpasswd -a smbuser
start both samba services: $ sudo systemctl start smb; sudo systemctl start nmb
Open up the firewall ports $ sudo firewall-cmd --permanent --add-service=samba $ sudo firewall-cmd --reload
A very basic mount of the samba share $ sudo mount -t cifs -o username=smbuser,password=yoursmbpassword //192.168.124.1/smbshare /mnt/smbshare
You can also use auto mount to achieve this or fstab; you can also use a credential file and only give root read only access.
if you are sharing your home directory don't forget to enable the SELinux boolean $ sudo setsebool -P samba_enable_home_dirs 1
Let me know if this helps
On Mon, 2016-02-08 at 22:13 +0000, Earl Ramirez wrote:
On Mon, 2016-02-08 at 17:43 +0000, Patrick O'Callaghan wrote:
On Mon, 2016-02-08 at 12:35 +0900, Earl A Ramirez wrote:
Clearly this could be done using Samba or NFS. Is there an easier way?
Personally I have been using Samba, haven't seen an easier way.
Yes, that seems to be the way to go. I'm almost there (having figured out that I needed to open a hole in the host firewall), just having a problem getting the guest to authenticate. I don't understand CIFS passwords :-(
poc
Thanks for the very complete reply.
First you will need a local account on for this I usually create a user without any shell access $ sudo useradd -s /sbin/nologin smbuser
Then you will have to create the samba user $ sudo smbpasswd -a smbuser
start both samba services: $ sudo systemctl start smb; sudo systemctl start nmb
For some reason I assumed that systemctl would start nmb automatically with smb. Seems I was wrong.
Open up the firewall ports $ sudo firewall-cmd --permanent --add-service=samba $ sudo firewall-cmd --reload
A very basic mount of the samba share $ sudo mount -t cifs -o username=smbuser,password=yoursmbpassword //192.168.124.1/smbshare /mnt/smbshare
I'm doing it the other way (mounting a Linux share on a Windows guest) so this part is unnecessary.
You can also use auto mount to achieve this or fstab; you can also use a credential file and only give root read only access.
if you are sharing your home directory don't forget to enable the SELinux boolean $ sudo setsebool -P samba_enable_home_dirs 1
Check.
Let me know if this helps
It did, I'm a happy camper. Thanks again.
poc
On Mon, Feb 08, 2016 at 12:33:53AM +0000, Patrick O'Callaghan wrote:
I've been using VirtualBox for several years with generally good results, but decided to try KVM as an alternative. I've converted a Windows VM from VBox to KVM format and it works well enough for my needs (it may even be faster), except that I can't see how to share files between the VM and my Fedora host.
I'm not a Vagrant user, but it's my understanding that Vagrant sets this up (even when using KVM instead of VirtualBox).
On Tue, 2016-02-09 at 03:59 -0500, Matthew Miller wrote:
On Mon, Feb 08, 2016 at 12:33:53AM +0000, Patrick O'Callaghan wrote:
I've been using VirtualBox for several years with generally good results, but decided to try KVM as an alternative. I've converted a Windows VM from VBox to KVM format and it works well enough for my needs (it may even be faster), except that I can't see how to share files between the VM and my Fedora host.
I'm not a Vagrant user, but it's my understanding that Vagrant sets this up (even when using KVM instead of VirtualBox).
I've never heard of Vagrant but I'll take a look, thanks.
poc