I wanted to explore CentOS 7 Linux, so I installed it on my Oracle VirtualBox. Installation went smoothly ,but I had a hard time to install Virtualbox Guest Additions to get full screen. I thought of sharing the steps I performed so that it may be helpful for others.
After installing CentOS 7, before installing Virtualbox Guest Additions first thing we need to do is update system.
sudo yum update
When I run this command I got the error “cannot find a valid baseurl for repo“
After googling for sometime I figured that the network card is not enabled by default and I need to enable the baseUrl in some configuration file.
Edit /etc/sysconfig/network-scripts/ifcfg-eth0 file and change ONBOOT=no to ONBOOT=yes
Instead of eth0 you may have a different file name. To know the right one, run the command “ifconfig -a“
Edited the file /etc/yum.repos.d/CentOS-Base.repo and uncomment baseurl.
name=CentOS-$releasever – Base
- Install VirtualBox Guest Additions
sudo yum update sudo yum groupinstall "Development Tools" sudo yum install kernel-devel
In Oracle Virtual Box menu, Devices -> Insert Guest Additions CD Image -> Run