


And then typed the below content in the file: The second part of file name after the hyphen (-) had to match with the network interface name in step 3. Next I created a file named “ ifcfg-enp0s8” in “ /etc/sysconfig/network-scripts/” location.The network interface in the middle with name enp0s8 is the one that I set up in step 1.

I ran the ifconfig command and got the below output:.The below command took care of the installation. Since it was a minimal install of CentOS, I had to install net-tools package to use the ifconfig command.The option can be found at VirtualBox -> File -> Preferences -> Network tab -> Host-only network tab. Here’s what I did to get the ssh working: I had the CentOS 7 minimal image installed and running in VirtualBox already. So I decided to ssh to the CentOS guest from the host machine and work from the host Terminal instead.Īfter I did a little searching on the Internet, it turned out to be rather easier than I thought. But soon I found that it’s a little cumbersome to work in the VirtualBox vm window because I can’t copy/paste texts normally to/from the VirtualBox as I can do in Terminal and I can’t cycle through the open windows in my guest machine using Alt+Tab when I am using the vm. Recently I needed to install CentOS server in VirtualBox to test something out.

I have mostly used Ubuntu and Debian-based distributions till now which means the other side of the Linux world, where the RHEL based distributions reside is still a grey area to me.
