Vagrant inside OpenVZ/Ubuntu 14.04

116 views
Skip to first unread message

Alexander Farley

unread,
Jun 29, 2015, 10:37:13 AM6/29/15
to vagra...@googlegroups.com
Hi, I'm having some problems installing Vagrant, apparently because of the kernel running on my Ubuntu 14.04 installation (which is running inside OpenVZ on a Beastnode VPS). 

When attempting to run 'vagrant up', I get:
VirtualBox is complaining that the kernel module is not loaded

Following this, it seems that the problem is because kernel headers aren't installed. When I try to update the kernel headers:
sudo apt-get update install linux-headers-$(uname -r)
I get: Unable to locate package linux-headers-2.6.32-042stab094.8

Is this caused by running inside OpenVZ? All of the instructions for installing Vagrant on 14.04 seem pretty clear on Google, yet it's not working for some reason. 

Also, it seems wrong that the installation proceeds just fine but throws an error when I try to run 'vagrant up' because of missing prerequisites. Shouldn't the vagrant installation fail louder/sooner? 


Alvaro Miranda Aguilera

unread,
Jun 30, 2015, 4:47:16 AM6/30/15
to vagra...@googlegroups.com
Hello,

It's very unlikely that virtualbox will work there since require full
hardware virtualization support.

The part of the module is basically this.

you require to install make gcc kernel-devel and kernel-headers (names
may change since those are for rpm based linux distro)

and after that, when you install the kernel modules will compile properly

manually you can check ls /etc/init.d/vbox*

the name change distro by distro, to the name of the sevice you can ask

/etc/init.d/vbox<something> setup

that should recompile the modules for virtualbox
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/3f4000e0-7638-4f57-a94b-48f62cadb6ee%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ronan Amicel

unread,
Jun 30, 2015, 4:58:10 AM6/30/15
to vagra...@googlegroups.com
Hi Alexander,

As Alvaro said, VirtualBox needs hardware support for virtualization.

This means you won't be able to run it inside an OpenVZ container, or
inside most virtual servers or cloud servers.

You need to run it either on bare metal (best), or inside VMWare as it
exposes the necessary support for nested virtualization (slower).

Hope this helps,

--
Ronan

Alvaro Miranda Aguilera

unread,
Jun 30, 2015, 5:01:50 AM6/30/15
to vagra...@googlegroups.com
On top of the emails you got, if you need to build vagrant boxes, you
can use packer build hosted in atlas.

packer is tool to build boxes (not only vagrant boxes) done by hashicorp too.

I will suggest try the tutorial first:
https://atlas.hashicorp.com/tutorial/packer-vagrant/0

Alvaro.

On Tue, Jun 30, 2015 at 2:37 AM, Alexander Farley
<alexander...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages