is there a way to use a file path from the host for the share folder from samba when nethserver runs in a qemu virtual machine?
I use a ubuntu server with qemu and cockpit.
In cockpit I created a virtual machine with the pre build qcow2 from nethserver.
This runs good.
On the ubuntu server are many files (wich I do not want to put in the qcow2 file) wich I want to share with the nethserver and then share over samba from nethserver.
Now I tried the following:
In cockpit I selected a shared path with the option âUse extended attributes on files and directoriesâ.
Then I mounted it with âmount -t virtiofs [mount tag] /home/samba1/.local/share/containers/storage/volumes/shares/_dataâ on the nethserver (rocky) virtual machine.
But this does not work.
Than I tried to put the line â[mount tag] /home/samba1/.local/share/containers/storage/volumes/shares/_data virtiofsâ in the â/etc/fstabâ fiele from the nethserver (rocky) virtual machine and reboot the system.
But this also not work.
I get the following error:
âError: lsetxattr /home/samba1/.local/share/containers/storage/volumes/shares/_data: operation not permittedâ
your Ubuntu is - at least samba-wise - becomes a âmember serverâ in a Samba-AD from NethServer.
This way, it directly shares itâs own files, and only getting permissions from samba.
Forcing Samba to share files youâre already mounting via network (resharing) only takes up a lot more resources, and tends to screw up permissionsâŠ
In a Windows environment, the AD does not reshare files from another host. That other host becomes a member server, and uses the AD permissions to share files directly.
â Much less load on the AD!
Best Practices for a Windows environmentâŠ
My 2 cents
Andy
Note: In real life thereâs no one ârightâ wayâŠ
But there are best practices.
2 Likes
Mastermind
(Daniel (Mastermind is a nickname from my childhood.))
3
Ubuntu Server isnât a great Hypervisor either. But it does run qemuâŠ
In that sense itâs as bad as MS Hyper-V, especially if Ubuntu using Snap (propreitary software, especially the snap store!).
There are MUCH better Hypervisors, which do their task extremly well, eg Proxmox as Hypervisor.
So you can just as easily enable samba client on Ubuntu, connect that Samba client to your NethServers AD and share the files, without even moving them anywhere!.
An AD isnât really great as file server, itâs intended as AD.
My 2 cents
Andy
1 Like
Mastermind
(Daniel (Mastermind is a nickname from my childhood.))
5
This looks the simplest solution, however Andyâs idea to configure the existing Ubuntu system also as a SMB file server and AD domain member was good too:
There is no ârightâ answer; however, I mark Andyâs response as the thread solution if you do not have anything contrary.
2 Likes
Mastermind
(Daniel (Mastermind is a nickname from my childhood.))
7
I want to give an update to this.
Now I work for a time with the files in the qcow2 file.
Until now i have no problem with this.
The reason why I decided to do this is the following:
I have two nethserver virtual machines on the ubuntu server which should function independently of each other.
Both should provide independent (internal) domains and an independent file server and so both should be independent from the ubuntu server.
This way works for me.
Regards