0

I have tried many tutorials that give explicit steps for installing VirtualBox on CentOS 7, but none of them go to completion without throwing errors.

Some of the tutorials assume that you will have access to a GUI. THERE IS NO GUI ON THE CENTOS 7 SERVER ON WHICH I NEED TO INSTALL VIRTUALBOX.

Most recently, I have tried following the instructions from this tutorial, which claims to show how to install VirtualBox on a minimal, terminal-only installation of CentOS 7. But following the instructions results in a message indicating that there is no package VirtualBox-5.0 to install.

Note that I have followed the instructions exactly, with the only exception that I updated the version names with urls from the Oracle web site. Also note that I did a clean install of CentOS before taking the following steps:

[root@localhost ~]# yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms
.......................................
Complete!
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
[root@localhost yum.repos.d]# rpm --import oracle_vbox.asc
[root@localhost yum.repos.d]# yum update && yum install VirtualBox-5.0
........installed/updated lots of other stuff automatically
Complete!
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.sonn.com
 * extras: centos.sonn.com
 * updates: centos.sonn.com
No package VirtualBox-5.0 available.
Error: Nothing to do
[root@localhost yum.repos.d]#   

What am I doing wrong? What can I change in the above in order to successfully install VirtualBox-5.0?

5
  • 2
    Why did you decide to use VirtualBox when there is already a virtualization platform built into CentOS (libvirt/kvm)?
    – jsbillings
    Commented Oct 3, 2015 at 3:31
  • @jsbillings Can you please post a couple links to tutorials that offer working examples of using the tools you suggest to create minimal (terminal-only, NO GUI) virtual machines within a minimal (terminal-only, NO GUI) host? I need a public web site that connects to the outside world, and a private database VM that only connects with the public web site VM, acting as a virtual database server for the virtual web server. I am concerned about starting into something that is not well documented or well supported. Thank you.
    – CodeMed
    Commented Oct 4, 2015 at 2:07
  • I'd follow the Red Hat documentation: access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/… , specifically the chapter describing virt-install: access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/…
    – jsbillings
    Commented Oct 4, 2015 at 2:14
  • 1
    As for whether libvirt/kvm is "well supported", it's the core of Red Hat's virtualization platform.
    – jsbillings
    Commented Oct 4, 2015 at 2:16
  • @jsbillings I studied your links, and am trying libvirt, but I am encountering an error related to the format of the virtual disk. Are you willing to help me with it? Here is the link: unix.stackexchange.com/questions/234855/…
    – CodeMed
    Commented Oct 8, 2015 at 20:09

2 Answers 2

1

It looks like you're using the wrong repo. Use this instead:

wget -P /etc/yum.repo.d http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

After you do that you should be able to:

yum install VirtualBox-5.0

More info: https://wiki.centos.org/HowTos/Virtualization/VirtualBox

3
  • Thank you, but there is no /VirtualBox VMs folder on the server after running your commands, which implies that the installation has not completed. How can I get the /VirtualBox VMs directory to be created?
    – CodeMed
    Commented Oct 3, 2015 at 18:57
  • That doesn't imply that installation hasn't been completed necessarily. Instead check if the binary virtualbox is installed? Or the vboxdrv? Check for virtualbox binary by: which virtualbox (should output /usr/bin/virtualbox) and a ls /etc/init.d/vboxdrv should show that the virtualbox driver script has been installed. From there try to run virtualbox by typing: virtualbox and
    – snorp
    Commented Oct 6, 2015 at 20:31
  • @CodeMed There would not be such a path on the server, ever. After a user creates a VM, the user who created the VM would have a directory with that name in their home directory. Commented Aug 8, 2018 at 13:17
0

Those instructions are for VirtualBox 4.3

The same web site has updated instructions for installing VirtualBox 5.0 at http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/

3
  • I already tried that link, but it results in the following errors: [root@localhost yum.repos.d]# /etc/init.d/vboxdrv setup -bash: /etc/init.d/vboxdrv: No such file or directory [root@localhost yum.repos.d]# service vboxdrv setup The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
    – CodeMed
    Commented Oct 3, 2015 at 18:48
  • Also, there is no /VirtualBox VMs folder in the server after running the commands in your link up to the error in my preceding comment. So I do not think it was actually installed. Are you able to show how to actually install VirtualBox 5.0 on a minimal (terminal-only, NO GUI) installation of CentOS 7?
    – CodeMed
    Commented Oct 3, 2015 at 18:55
  • I would really appreciate if you would follow up on this. I have been trying to get virtualbox installed for two weeks. I had already fully explored what you posted as an answer before you posted it as an answer. Thus, you have not added any value. Can you please address the error that your suggestion generates if you are going to call it an answer? Because replacing one error with a different error is not an answer. Thank you.
    – CodeMed
    Commented Oct 4, 2015 at 2:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .