How to share on the host side (windows) and guest side (CentOS 7) with VirtualBox

How to share on the host side (windows) and guest side (CentOS 7) with VirtualBox

In VirtualBox
-host(windows)~ side
-The guests(CentOS7)~ side
So, there is a way to share the folder.

Install Guest Additions

--Installing the library

# yum update
# yum install gcc make bzip2 kernel-devel

--On the Virtualbox screen --Device> Guest Additions Select Insert CD Image

1.png

--CD image mount

# mount /dev/cdrom /mnt/
mount: /dev/sr0 is write-protected, mounting read-only
# cd /mnt
# ./VBoxLinuxAdditions.run
# shutdown -h now

Make sharing settings in VirtualBox

--Creating a folder to be shared on the host side

3.png

--Shared folder settings

2.png 4.png

  1. Go to settings
  2. Move to shared folder
  3. Click the + key in the folder on the right
  4. Describe the settings in "Add shared folder" --Folder path: C: \ home_dir --Folder name: Enter automatically --Check for automatic mounting --Mount point: / mnt / home_dir
  5. Start the server

Confirmed on the guest side

--Check home_dir directory

# ls -l /mnt/
Total 0
drwxr-x---.2 root root 6 September 1 21:33 home_dir

Confirmation of sharing

--[Host side] Create file (test.txt)

5.png

--[Guest side] File confirmation (test.txt)

# ll /mnt/home_dir/
Total 0
-rwxrwx---.1 root vboxsf 0 September 1 22:03 test.txt

--[Guest side] Create file (test1.txt)

# touch /mnt/home_dir/test.txt
# ll /mnt/home_dir/
-rw-r--r--.1 root root 0 September 1 21:54 /mnt/home_dir/test.txt

--[Host side] File confirmation (test1.txt)

6.png

reference

--VirtualBox Shared Folder Settings --Share Folder Between Host and Guest

Recommended Posts

How to share on the host side (windows) and guest side (CentOS 7) with VirtualBox
How to set the IP address and host name of CentOS8
How to build a Jenkins server with a Docker container on CentOS 7 of VirtualBox and access the Jenkins server from a local PC
How to place and share SwiftLint config files on the server
I installed CentOS 8 on Windows 10 using VirtualBox and Vagrant
Install MySQL 5.6 on CentOS6 [How to specify the version]
How to disable Set-Cookie from API on the front side
How to install JDK 8 on Windows without using the installer
How to run React and Rails on the same server
How to create an environment that uses Docker (WSL2) and Vagrant (VirtualBox) together on Windows
How to deploy Laravel on CentOS 7
[Java] How to update Java on Windows
How to install ImageMagick on Windows 10
How to install MariaDB 10.4 on CentOS 8
Install Java 9 on windows 10 and CentOS 7
Steps to install samba on CentOS 8 and connect from Windows 10 Explorer
How to display 0 on the left side of the standard input value
[Rails] How to introduce kaminari with Slim and change the design
How to write when installing Amazon Corretto 8 on CentOS 8 with Ansible.
[Note] How to restart the Windows container set up with docker-compose
[Ruby on Rails] How to log in with only your name and password using the gem devise
[Android] How to turn the Notification panel on and off using StatusBarManager
What to do when CentOS cannot be started with VirtualBox on Catalina
[Java] How to retrieve the parameters passed from html on the server side
How to install beta php8.0 on CentOS8
How to change the timezone on Ubuntu
Put Zabbix in Ubuntu with Docker and monitor Docker on the same host
How to find the tens and ones
Monitor the Docker container and SystemD process on the same host with Zabbix on Ubuntu.
How to add a virtual disk to Linux (CentOS7) on VirtualBox to free up space
How to find the distance and angle between two points on a plane
How to start with Hyper-V instead of WSL2 on Docker Desktop for Windows
How to use Eclipse on my PC with 32bit and 2GB of memory
[swift5] How to implement the Twitter share function
[Swift] How to link the app with Firebase
Double-click to open the jar file on Windows
How to build API with GraphQL and Rails
How to find the total score and average score
[Java] Memo on how to write the source
[Ruby On Rails] How to use simple_format to display the entered text with line breaks
[Docker] How to update using a container on Heroku and how to deal with Migrate Error
A memo to do for the time being when building CentOS 6 series with VirtualBox
[Rough explanation] How to separate the operation of the production environment and the development environment with Rails
How to change the action with multiple submit buttons
How to run javafx with Raspberry Pi Posted on 2020/07/12
[Ruby on Rails] How to change the column name
Steps to set up Postfix and Dovecot on CentOS 8.3
Organized how to interact with the JDK in stages
How to remove Ubuntu when dual booting Windows and Ubuntu
How to start TOMCAT by specifying JAVA_HOME on Windows
How to serialize and deserialize LocalDateTime type with GSON
Display ROS application on Docker with GUI on host side
How to use RealSense with ubuntu 20.04 and ROS Noetic
How to install Gradle and Kotlin with SDKMAN (Mac)
[Ruby] How to get the tens place and the ones place
(Ruby on Rails6) How to create models and tables
# Vagrant + VirtualBOx can't mount on the latest CentOS7 vbox (centos/7 2004.01)
[Ruby On Rails] How to search and save the data of the parent table from the child table
Check how to set the timeout when connecting with Spring + HikariCP + MySQL and executing SQL
How to reduce the load on the program even a little when combining characters with JAVA
How to take a screenshot with the Android Studio emulator