Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provisioning using Vagrant on a server #526

Open
onknows opened this issue Jun 20, 2016 · 0 comments
Open

Provisioning using Vagrant on a server #526

onknows opened this issue Jun 20, 2016 · 0 comments

Comments

@onknows
Copy link

onknows commented Jun 20, 2016

I tried example like below on my laptop. It works fine.

When I put that in a recipe, upload to a Chef server and apply to a node it fails always with message like below.

Vagrant is used on laptop most of the times. Is it correct for me to think that this will not work on a server?

If this will not work on a server, are there other ways of provisioning virtualbox machines on a server than using vagrant, when using Chef?

[2016-06-20T21:43:35+02:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-06-20T21:43:35+02:00] ERROR: machine[mario](ok-test::default line 99) had an error: RuntimeError: vagrant up mario --provider virtualbox failed!
STDOUT:
STDERR:Vagrant failed to initialize at a very early stage:

Vagrant is attempting to interface with the UI in a way that requires
a TTY. Most actions in Vagrant that require a TTY have configuration
switches to disable this requirement. Please do that or run Vagrant
with TTY.

require 'chef/provisioning/vagrant_driver'
with_driver 'vagrant'

with_machine_options :vagrant_options => {
  'vm.box' => 'ubuntu/trusty64'
},:vagrant_config => <<EOF
    config.vm.provider 'virtualbox' do |v|
      v.memory = 4096
      v.cpus = 2
    end
EOF
machine 'mario' do
  converge true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant