Install VirtulBox GuestAddition through command line in CentOS

  1. Install VM VirtualBox Extension Pack from (make sure to select the extension pack having the version number that matches your VirtualBox version number)
  2. Run the following command in your CentOS console
    wget[version number]/VBoxGuestAdditions_[version number].iso
    sudo mkdir /media/VBoxGuestAdditions
    sudo mount -o loop,ro VBoxGuestAdditions_[version number].iso /media/VBoxGuestAdditions
    sudo /media/VBoxGuestAdditions/
    rm VBoxGuestAdditions_[version number].iso
    sudo umount /media/VBoxGuestAdditions
    sudo rmdir /media/VBoxGuestAdditions

    You can find the supported version number at

Resolve no internet access in CentOS in VirtualBox

Add the following to /etc/sysconfig/network-scripts/ifcfg-enp0s3

# Note this was set to no