VM - Shared Folder Windows - Linux


Versao Portuguesa

When we work with VMs we need to make files available eg. software binaries, it has a few ways to do that, this post is about how to make share Windows (Host) folders in a Linux server (Guest).



Select Windows folder


From the Virtual Box Menu > Devices > Shared Folder


Select the windows path folder to share within Linux







OK


Mount windows folder within VM



You can chose two options :
1) Reboot  the  VM (Auto-mount)
2) Command Line

Command Line - mount filesystem in unix

[root@host ~]# mkdir -p /u01/stage/win_ebs_sw
[root@host ~]# chmod 777 /u01/stage/win_ebs_sw
[root@host ~]# mount -t vboxsf Oracle_EBS  /u01/stage/win_ebs_sw/
[root@host ~]# ls /u01/stage/win_ebs_sw
ebs_weblogic_webtier
[root@host ~]# df -h /u01/stage/win_ebs_sw
Filesystem      Size  Used Avail Use% Mounted on
Oracle_EBS      895G  494G  401G  56% /u01/stage/win_ebs_sw


Command Line - Make the configuration permanent

[root@host ~]# echo "Oracle_EBS  /u01/stage/win_ebs_sw vboxsf  defaults        0 0" >> /etc/fstab
[root@host ~]# cat /etc/fstab
# /etc/fstab
# Created by anaconda on Sat Dec  3 13:03:24 2016
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
/dev/mapper/ol-root     /                       xfs     defaults        0 0
UUID=e081dbff-a00b-48aa-9e4a-5c4a1754c7c7 /boot                   xfs     defaults        0 0
/dev/mapper/ol-swap     swap                    swap    defaults        0 0
#new fs for oracle
/dev/sdb1     /u01                       xfs     defaults        0 0
/swapfile               swap                    swap    defaults        0 0
Oracle_EBS  /u01/stage/win_ebs_sw vboxsf  defaults        0 0


Thank you for reading, hope this post was helpful.
Rogerio

Comments