Forums

Scumbag
Scumbag
Offline
Resolved
0 votes
I'm very proud of myself. I just managed to figure out how to get VirtualBox running on my Clearos 6.4 system despite the various HOWTOs being not quite right.

The only issue I have is that although I can connect to it using remote desktop, it doesn't have a working network adapter (under device manager I see an ethernet controller with no driver) and hence I can't set it up on my LAN as a print server, which is the eventual aim of this exercise. I've listed the steps I followed below. For information, eth1 in the ClearOS box is the LAN (eth0 is the hot lan and eth2 is the internet).

If anyone can suggest how I can get it talking to the LAN I'd appreciate it.

Thanks


yum install SDL kernel-devel kernel-headers dkms
yum install gcc
yum-config-manager --enable clearos-core clearos-developer
yum --enablerepo=clearos-core,clearos-developer,clearos-epel install clearos-devel

# ln -s 2.6.32-220.23.1.el6.x86_64 `uname -r`

cd /etc/yum.repos.d
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

yum search VirtualBox
yum install VirtualBox-4.2
/etc/init.d/vboxdrv setup

/usr/bin/VBoxManage extpack install ./Oracle_VM_VirtualBox_Extension_Pack-4.2.18-88780.vbox-extpack

VBoxManage createvm --name "Win7" --register
VBoxManage modifyvm "Win7" --memory 1536 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth1
VBoxManage createhd --filename Win7.vdi --size 20000
VBoxManage storagectl "Win7" --name "IDE Controller" --add ide
VBoxManage storageattach "Win7" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium WinXP.vdi
VBoxManage storageattach "Win7" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /root/wndows7.iso
VBoxHeadless --startvm "Win7" &
Thursday, September 19 2013, 08:15 AM
Share this post:
Responses (6)
  • Accepted Answer

    Tuesday, October 31 2017, 12:55 PM - #Permalink
    Resolved
    0 votes
    how do I install vb 5.2
    The reply is currently minimized Show
  • Accepted Answer

    gizzmo
    gizzmo
    Offline
    Sunday, September 22 2013, 09:50 PM - #Permalink
    Resolved
    0 votes
    I also have a how-to that I used to install VirtualBox on ClearOS 6.4


    Install VirtualBox 4.3

    Get the version of kernel running
    uname –a

    Linux host.example.com 2.6.32-358.18.1.v6.x86_64 #1 SMP Wed Sep 4 20:58:08 MDT 2013 x86_64 x86_64 x86_64 GNU/Linux

    yum --enablerepo=* install gcc wget kernel-headers-2.6.32-358.18.1.v6.x86_64 kernel-devel-2.6.32-358.18.1.v6.x86_64

    Install VirtualBox repo
    cd /etc/yum.repos.d
    wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

    Install VirtualBox
    yum search VirtualBox

    This will return the list of VirtualBox versions:

    VirtualBox-3.2.i686 : Oracle VM VirtualBox
    VirtualBox-4.0.i686 : Oracle VM VirtualBox
    VirtualBox-4.1.i686 : Oracle VM VirtualBox
    VirtualBox-4.2.i686 : Oracle VM VirtualBox

    yum --enablerepo=* install VirtualBox-4.3

    Execute the setup of VirtualBox
    /etc/init.d/vboxdrv setup

    [root@zeus tmp]# /etc/init.d/vboxdrv setup
    Stopping VirtualBox kernel modules [ OK ]
    Removing old VirtualBox pci kernel module [ OK ]
    Removing old VirtualBox netadp kernel module [ OK ]
    Removing old VirtualBox netflt kernel module [ OK ]
    Removing old VirtualBox kernel module [ OK ]
    Recompiling VirtualBox kernel modules [ OK ]
    Starting VirtualBox kernel modules [ OK ]

    Add vbox user to vboxusers group (created by install)
    /usr/sbin/useradd -r -m vbox
    /usr/sbin/usermod -a -G vboxusers vbox
    passwd vbox (set password)

    Install VirtualBox Extension Pack
    cd /tmp
    wget http://download.virtualbox.org/virtualbox/4.3.0/Oracle_VM_VirtualBox_Extension_Pack-4.3.0-89960.vbox-extpack
    VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.4-81684.vbox-extpack

    The reply is currently minimized Show
  • Accepted Answer

    gizzmo
    gizzmo
    Offline
    Sunday, September 22 2013, 09:41 PM - #Permalink
    Resolved
    0 votes
    You could also try installing phpvirtualbox. The web interface is almost exactly like the gui.


    Install phpvirtualbox

    Create this file
    nano /etc/default/virtualbox

    Add this to it
    VBOXWEB_USER=vbox

    Add this entry to the system so it will load vboxweb-service on system startup
    chkconfig --level 235 vboxweb-service on
    /etc/init.d/vboxweb-service restart

    Download phpvirtualbox
    cd /tmp
    mkdir phpvirtualbox
    cd phpvirtualbox
    wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3.zip
    unzip phpvirtualbox-4.3.zip
    cd ..
    cp –r phpvirtualbox /var/www/html/phpvirtualbox/

    Configure phpvirtualbox
    cd /var/www/html/phpvirtualbox
    cp config.php-example config.php
    nano config.php
    Change the following lines:
    var $username = 'vbox';
    var $password = 'password';

    Add user to cdrom group (in order to load OS’s from server cdrom)

    nano /etc/group

    vcsa:x:69:
    nscd:x:28:
    suva:x:499:
    cdrom:x:11:vbox
    tape:x:33:
    dialout:x:18:
    clearsync:x:498:

    Run the following to install some dependencies:
    yum install php-pear apr php-soap

    service httpd restart

    Through you web browser go to:
    http://host/phpvirtualbox

    Default username = admin
    Default password = admin
    The reply is currently minimized Show
  • Accepted Answer

    Scumbag
    Scumbag
    Offline
    Friday, September 20 2013, 09:58 PM - #Permalink
    Resolved
    0 votes
    It's humming along nicely now.

    Since I couldn't get the ClearOS print server to work properly (see this thread) I've now got a Windows 7 VM running on the server sharing the printer. I also have my DVD ripping software running on it so I can use it for turning DVDs into DivX.

    It took me two attempts to get Virtualbox to run on a test machine before I installed it on my production box. There's a howto for Clearos, but it's more than 3 and a half years old, some of the steps don't work, and there are 16 pages in the thread, making it a bit hard to follow. There are various other howtos on the net, all of which leave out some important steps. I reckon I spent a day and a half to get to where it's at now.

    I'll post my steps in the existing howto so it's recorded for posterity.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 20 2013, 05:26 PM - #Permalink
    Resolved
    0 votes
    Thanks for the info!
    The reply is currently minimized Show
  • Accepted Answer

    Scumbag
    Scumbag
    Offline
    Thursday, September 19 2013, 10:36 PM - #Permalink
    Resolved
    0 votes
    Problem solved :

    The first "modifyvm" command needs --nictype1 82540EM added to it so Windows 7 can install native drivers

    It also works a lot better if you do the following :
    1 - while the VM is powered off, VBoxManage storageattach "Win7" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso
    2 - boot up and install the additions from the guest's DVD drive
    3 - VBoxManage modifyvm "Win7" --dvd none
    The reply is currently minimized Show
Your Reply