Open malachig opened 9 years ago
I'm trying to get this to work and this is the error that I see,
vagrant up || true
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/lib/vagrant/pre-rubygems.rb:30: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
/opt/vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/runtime.rb:220: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
*** creating tmp-disk.vdi ***
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.8.0-29-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
*** creating opt-gms-disk.vdi ***
A couple more hints,
gmsuser@clia1 ~/gms (ubuntu-12.04-2015.02.22)> sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Recompiling VirtualBox kernel modules ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
This is what the log /var/log/vbox-install.log has
1 Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
2 Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
3 Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
gmsuser@clia1 ~/gms (ubuntu-12.04-2015.02.22)> uname -r
3.8.0-29-generic
gmsuser@clia1 ~/gms (ubuntu-12.04-2015.02.22)> ls /usr/src/
fio/ linux-headers-3.2.0-80-generic/ linux-headers-3.8.0-44-generic/
linux-headers-3.2.0-80/ linux-headers-3.8.0-44/ vboxhost-4.3.8/
Ok, so I tried to install the required headers as follows,
sudo apt-get install linux-headers-3.8.0-29
sudo apt-get install linux-headers-3.8.0-29-generic
Verify that the headers exist
gmsuser@clia1 ~/gms (ubuntu-12.04-2015.02.22)> ls /usr/src/
fio linux-headers-3.2.0-80 linux-headers-3.2.0-80-generic linux-headers-3.8.0-29 linux-headers-3.8.0-29-generic linux-headers-3.8.0-44 linux-headers-3.8.0-44-generic vboxhost-4.3.8
Attempt VBox setup again,
gmsuser@clia1 ~/gms (ubuntu-12.04-2015.02.22)> sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.
That seems to get us past this to the next error.
The next error that we see is,
gmsuser@clia1 ~/gms (ubuntu-12.04-2015.02.22)> make vminit
#
# vmcreate: (recurses into done-host/apt-get-update on the VM)
#
#
# the first bootup will fail because the NFS client is not installed
#
sudo -v
[ ! -e .vagrant ] || sudo chown -R `whoami`: .vagrant
vagrant up || true
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/lib/vagrant/pre-rubygems.rb:30: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
/opt/vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/runtime.rb:220: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
*** creating tmp-disk.vdi ***
VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
*** creating opt-gms-disk.vdi ***
VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
*** creating opt-gms-local-disk.vdi ***
VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
Bringing machine 'default' up with 'virtualbox' provider...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["list", "hostonlyifs"]
Stderr: VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
The above errors are related to permissions of /tmp
on clia1,
On clia1 /tmp
is a symlink pointing to /opt/gms
, changing this to
sudo rm -f /tmp
sudo mkdir /tmp
sudo chown -R gmsuser:gmsuser /tmp
sudo chmod -R 777 /tmp
gets us past this to the next error.
Now we see,
sudo -v
[ ! -e .vagrant ] || sudo chown -R `whoami`: .vagrant
vagrant up || true
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/lib/vagrant/pre-rubygems.rb:30: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
/opt/vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/runtime.rb:220: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: gms_default_1428612644080_46990
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 => 9003 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
sudo chown -R `whoami`: .vagrant
#
# fix the above issue by adding NSF to the client
#
vagrant ssh -c 'sudo apt-get update -y >/dev/null 2>&1 || true; sudo apt-get -y install -q - --force-yes nfs-client make'
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/lib/vagrant/pre-rubygems.rb:30: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
/opt/vagrant/embedded/gems/gems/bundler-1.5.3/lib/bundler/runtime.rb:220: warning: Insecure world writable dir /opt/gms/68WPW90/sw in PATH, mode 042777
VM must be running to open SSH connection. Run `vagrant up`
to start the virtual machine.
documenting install attempt on a re-imaged box, The installer tries to install this .deb as a part of the install,
gmsuser@clia1:~/gms$ sudo dpkg -i ~/gms/setup/archive-files/virtualbox-4.3_4.3.8-92456~Ubuntu~precise_amd64.deb
(Reading database ... 90076 files and directories currently installed.)
Unpacking virtualbox-4.3 (from .../virtualbox-4.3_4.3.8-92456~Ubuntu~precise_amd64.deb) ...
dpkg-deb (subprocess): short read on buffer copy for failed to write to pipe in copy
xz: (stdin): Unexpected end of input
dpkg-deb (subprocess): subprocess data returned error exit status 1
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing setup/archive-files/virtualbox-4.3_4.3.8-92456~Ubuntu~precise_amd64.deb (--install):
short read on buffer copy for backend dpkg-deb during `./usr/share/virtualbox/VBoxGuestAdditions.iso'
Processing triggers for ureadahead ...
Processing triggers for shared-mime-info ...
Processing triggers for hicolor-icon-theme ...
Errors were encountered while processing:
setup/archive-files/virtualbox-4.3_4.3.8-92456~Ubuntu~precise_amd64.deb
The .deb was obtained from here, http://dlc-cdn.sun.com/virtualbox/4.3.8/index.html From a look at here, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=462288, it looks like the .deb might be incomplete but I don't think thats the case here
Note - to delete a VirtualBox VM
gmsuser@clia1:~/gms$ VBoxManage list vms
"gms_default_1429282094345_20327" {a22accd4-05c0-4908-b65e-fb8909a30e63}
gmsuser@clia1:~/gms$ VBoxManage unregistervm "gms_default_1429282094345_20327" --delete
I saw the same error with vagrant 1.8.7 on CentOS 7.3 with kernel version 3.10.0-514.10.2.el7.x86_64.
The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.10.0-514.10.2.el7.x86_64)
The following steps resolved the error for me:
yum -y install kernel-headers kernel-devel
sudo /sbin/rcvboxdrv setup
VBoxManage --version
In the latest re-image of clia1 I was unable to get the vagrant install to work. Perhaps it was in a half baked state.
Since clia1 is our main place for testing, and we have up to 3-4 people wanting to test at the same time, it would be nice if we could do this within multiple VMs running at the same time...