Create symbolic link in Linux guest on Windows host - linux

I am running Virtualbox Linux 32 bit guest OS on a Windows 10 64 bit host OS. I am sharing a folder between the host (windows) and the guest (linux). When I am trying to create a symbolic link in the guest I am getting the following error:
ln -s file1 link1
ln: failed to create symbolic link 'link1': Operation not permitted
How can I enable the possibility of creating symbolic links by the Linux guest, on a Windows host, within a shared folder?

I have called the VBoxManage program with the following arguments to fix the issue (source):
VBoxManage setextradata MACHINE_LABEL VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_LABEL 1
But now the error I receive is: Protocol error instead of Operation not permitted. To fix this issue, I had to run my VM from within the host as administrator. Is there a way to fix the permissions, so the VB image doesn't have to be run as admin?

Related

WSL file system permission mixed up with windows files

I'm using WSL2 (Windows Subsystem for linux), and I've been using it for a really long time, and I didn't have troubles with it.
Unfortunately, today, from my linux distribution (Ubuntu 20.04), I no longer have permissions to view some Windows files, to which I had previously access without trouble. I don't know what happened, I don't remember intalling any update manually.
However, interestingly, I can access them if I do sudo su and become root. Then, I can access everything, or I can use sudo cat. But I don't want anything of that, I want to be the default WSL user to do what I could before.
What I tried:
Adding my default user to admin group, root group and sudo group (no luck)
Addming username to sudoers
root ALL=(ALL:ALL) ALL
danon ALL=(ALL:ALL) ALL
Editing permissions in my Windows host machine to allow everyone to access it
Editing permissions in my Windwos host to change the owner of the file (and directories below it)
Use other WSL distros, Ubuntu 20.04 and Ubuntu 18.04
Add metadata option to /etc/wsl.conf
Restarting the distro
Restarting the wsl
Restarting the host system
I don't know what else to do. I don't want to do sudo su everytime I open my wsl, or call each method with sudo.
I would like either to access my files from WSL like I used to before, or maybe specifically make those files available to my default linux user.
Result of mount:
C:\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=1000;gid=1000;metadata;umask=22;fmask=11;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8)
D:\ on /mnt/d type 9p (rw,noatime,dirsync,aname=drvfs;path=D:\;uid=1000;gid=1000;metadata;umask=22;fmask=11;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8)

How can I mount a folder from an ubuntu virtual machine on ubuntu?

I tried sshfs, but the local directory where I want to mount a folder from the VM does not open after running the command.
Install the Guest Additions on the virtual machine. These can be dowloaded from within the virtual machine from the Devices > Install Guest Additions menu.
Add the folder you wish to share to the Shared Folders, this option can also be found in the Devices menu.
The folder can now be mounted with
sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) folder ~/host
For more info, or troubleshooting, check out this Ubuntu Help article.

VirtualBox: mounting shared folder fails during start-up, but succeed from shell

Problem description:
When I boot my VirtualBox Guest OS, the mounting of the shared file-system - which is referenced in /etc/fstab - fails.
However, after login - mount -a succeeds.
Details:
The boot process gets stuck here ...
... and pressing s continues the boot process, which finishes.
In the shell, I verify that my shared directory is not mounted:
But now, from the shell, the mount of the shared file-system succeeds:
What should I do to make my mount succeed during start-up?
Environment:
VirtualBox: 4.3.12.r93733
Host OS: Windows 7
Guest OS: Linux ubuntu 3.13.0-32-generic #57~precise1-Ubuntu x86_64 GNU/Linux
/etc/fstab
Relevant lines in /var/log/boot.log
You don't have to mount it, VitrualBox will make it for you. For me,these steps worked on my System (VirtualBox 5.0.10 on Windows 7 and Kubuntu 14.04 guest system):
In VirtualBox, configure your shared folder for your machine under 'Shared Folder'. Pick up the directory on your host system (e.g. D:\shared) and set a name for your guest system (e.g. shared).
Boot the guest system. Now you should have a mounted folder under \media\sf_shared.
Thats all. VirtualBox manages this for you.
You need to install VirtualBox Guest Additions properly and use VirtualBox Manager to specify share folders. The issue happens because the mount point is in place with root permissions. The default mount location is in /media/sf_.
You can change mount point with VBoxControl command. To change the mount point from /media/sf_... to /home/user/sf_... use the command:
sudo VBoxControl guestproperty set /VirtualBox/GuestAdd/SharedFolders/MountDir /home/user/
To check if that's working:
sudo VBoxControl guestproperty get /VirtualBox/GuestAdd/SharedFolders/MountDir

Errors when execute `yo angular appname` in the VirtualBox Guest OS Shared Folder

I am using VirtualBox 4.2.8 and running inside Mac OS X 10.7.5 as the Host OS.
My guest OS is Ubuntu 12.10 64 bit.
My development work is essentially in a Shared Folder between the Host and Guest OS.
I have successfully installed npm, nodejs, yeoman, and the angular-generator.
I was attempting yo angular appname when I come across a list of errors such as:
Error: ENOENT, lstat ...
What do I do to resolve them?
The problem is basically because yo angular appname will attempt to create symlinks.
There is an issue with creating symlinks inside SharedFolders for VirtualBox VMs.
The solution is that
a) make sure you are running Linux variant as Host OS (Mac, Linux, etc)
b) Shut down your VM.
c) run the following command in your host OS terminal.
VBoxManage setextradata VMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHAREDFOLDERNAME 1
where you need to replace VMNAME and SHAREDFOLDERNAME
d) now re-run the VM and execute the yo angular appname. If need be remove any previously created files and folders by your previous yo angular appname command before re-running it.

Cannot install linux ic on Linux redhat 6 virtual machine on windows hyper-v

I have windows 2008 r2 with hyper v role.
I created a rhel6 virtual machine, however when I try to install Linux Integration services following Microsoft's instructions I get this error:
ls: cannot access kmod-microsoft-hyper-v-rhel6-43.1.x86_64.rpm No such file or directory
ls: cannot access microsoft-hyper-v-rhel6-43.1.x86_64.rpm No such file or directory
RPM`s are missing
I verified that both files are located in the same folder as the install.sh script.
Did you look in the install.sh script?
Maybe he is looking somewhere else than it's own directory ;).
The path for the directories may be different than in which the script looks for.
Solution found
http://chkchaitu.wordpress.com/2012/04/10/rhelcentos6-2-on-hyper-v-2k8-r2-with-lic-v3-2/
After installing Linux Integration Services v 3.2 found that CD room is not working - solution to this:
http://support.microsoft.com/kb/2600152

Resources