How to create a shared folder in haiku vm and host (linux mint) ? I am using kvm/qemu.
Hello,
there is a FuseSMB package in Haiku Depot, but unfortunately it supports only SMB 1 protocol.
So you have either to install Samba server on your host machine and enable SMB 1 support (which is unsafe) or do like I’ve done.
I installed Debian as an other virtual machine (using netinstall without graphical environment). In this VM I installed samba with SMB 1 support which points to a shared directory which I share with my host system using virtiofs. So when I have to share any files with Haiku, I start my small Debian VM and can share my files using FuseSMB package.
Hope this helps.
sounds complex!
Any way to create a partition which is mounted in both host and haiku vm ?
I think it will make things easier for me.
There is a nextcloud client that you could install on both host and client, I use it here sometimes to sync files between 2 laptops (Haiku 32bit and 64bit).
EDIT: I use this mainly for not that big files though
Try it out.
You can also use an USB flash drive and pass it through to Haiku.
Hello,
There are several options, besides SMB, you could also try NFS or SSHFS. I think you can find instructions for these if you search in the forum old posts.
when I mount the flash drive to haiku, it gets unmounted on host.
also it means I need to carry a flash drive everytime, as I would require both host and haiku vm to work on the shared folder.
can the partition thing be achieved
I use sftp to share resources between 2 boxes. Many gui clients exist to ease file management.
Its old fashioned, but its 100% reliable and fast.
I’am not an expert here, but I think no. Since only one operation system have to control a partition.
If you mount it on you host OS and Haiku at the same time then both OSs will try to control the same partition which leads to a conflict.
I don’t want all permissions in vm.
In haiku, I want to read and execute the file from the partition, and in host I want to read, write and exec permissions
my main thing is I want to use vscode for haiku development. so If I create a shared partiton, I can clone the haiku repo from haiku vm in the shared partition and then use vs code from my host, and after making changes, I can run the modified application on haiku vm.
I am not comfortable with genio, It lacks a lot of functionality.
Read the documentation of your VM manager, you should be able to share a partition or even the whole disk and mount it from Haiku if it’s in a format it recognizes. When I do that from qemu cli I just add -hd<whatever> /dev/<the_partition>
. But be very sure to unmount it from the host system before, and from Haiku when you finish with it, or you’ll sooner than later corrupt your data. Even if you think you’ll only write from one side, if both have it mounted there’ll be on-the-fly or cached data and metadata that only one side knows about, and even when that’s back on the disk, the other side wouldn’t expect any changes. So you can go there but there be dragons.
If you set up your ssh daemon in Haiku, then maybe you could use the vs code remote feature: Connect over SSH with Visual Studio Code
vs code is unable to connect to ssh, the below is my config file being used by vscode:
Host shredder
HostName 192.168.122.203
User user
ssh daemon is enabled in haiku, and I am able to connect using terminal:
~ ssh user@192.168.122.203
user@192.168.122.203's password:
Welcome to the Haiku shell.
~>
Nice trick there, didn’t know that, just used that to mount the anyboot iso together with a local partition!
Thanks for the tip on the unmounting
Maybe this solution would work for you: Development environment outside Haiku? - #10 by memecode
If I remember correctly, vs code uses ssh to upload some binaries on the machine and run them (some kind of “vscode server” that it then communicates with).
Of course, it has no binaries built for Haiku, so it can’t do that.
thanks got it working