vagrant up gives errors

2,427 views
Skip to first unread message

jiminfote...@gmail.com

unread,
Jul 14, 2016, 8:07:28 AM7/14/16
to Vagrant
Hi Guys,

I want to create a CentOS 7 machine with Virtual box guest additions installed.I did the following commands
C:\Users\jim_000\VirtualBox VMs\CentOS7-3>vagrant init Centos7-3 https://github.com/holms/vagrant-centos7-box/releases/download/7.1.1503.001/CentOS-7.1.1503-x86_64-netboot.box
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

I later modified the file "vagrant file" and changed the following

config.vm.network "private_network", ip: "192.168.1.9"
config.vm.synced_folder "C:\", "/C_DATA"
config.vm.synced_folder "F:\", "/F_DATA"
vb.gui = true
vb.memory = "3072"

Then I started and got zillions of errors below:

C:\Users\jim_000\VirtualBox VMs\CentOS7-3>vagrant up
There is a syntax error in the following Vagrantfile. The syntax error
message is reproduced below for convenience:

C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:39: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
   config.vm.synced_folder "C:\", "/C_DATA"
                                           ^
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:45: syntax error, unexpected tIDENTIFIER, expecting keyword_end
  # config.vm.provider "virtualbox" do |vb|
                                  ^
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:50: syntax error, unexpected tINTEGER, expecting keyword_end
     vb.memory = "3072"
                      ^
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:59: syntax error, unexpected tIDENTIFIER, expecting keyword_end
  # config.push.define "atlas" do |push|
                             ^
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:60: syntax error, unexpected tCONSTANT, expecting keyword_end
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
                                     ^
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:60: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
                                                            ^
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:66: syntax error, unexpected tIDENTIFIER, expecting keyword_end
  # config.vm.provision "shell", inline: <<-SHELL
                              ^
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:66: unterminated string meets end of file
C:/Users/jim_000/VirtualBox VMs/CentOS7-3/Vagrantfile:66: syntax error, unexpected end-of-input, expecting keyword_end

C:\Users\jim_000\VirtualBox VMs\CentOS7-3>

Any help would be greatly appreciated.

Thanks
Jim

Alvaro Miranda Aguilera

unread,
Jul 14, 2016, 5:04:31 PM7/14/16
to vagra...@googlegroups.com
can you share your Vagrantfile over gist (gist.github.com)

Thanks
Alvaro

--
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/caff2a25-06f3-4e29-8ae5-1c04a71d27ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jim Jim

unread,
Jul 14, 2016, 7:44:02 PM7/14/16
to vagra...@googlegroups.com
1. CentOS 6 or 7 with GUI pre installed
2. Static IP
3. Guest additions installed
3.1 Share the C drive and F drive(External hard disk) on OS
4. Inject in vagrant file the applications/software packages which I want to install on the operating system.
4.1 Create jim as the user
5. Have a configurable memory value say 3GB for machine, this value to be injected in a configuration file which would be used to start OS.

If all of this can happen with Vagrant in few mins then as a Vagrant customer I see true value in it. As for doing all of the above it takes approximately few hours for me.

Would greatly appreciate your help and input.

Many Thanks

Jim



You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/iuUNJ0itBg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0exm85HeYswnwMgLcHijePWJCX6jG18q31P4qVqNS_epbQ%40mail.gmail.com.

jiminfote...@gmail.com

unread,
Jul 15, 2016, 10:51:55 AM7/15/16
to Vagrant
Hello,

Any update ?

Regards

Jim
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.

--
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 a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/iuUNJ0itBg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+unsubscribe@googlegroups.com.

Alvaro Miranda Aguilera

unread,
Jul 15, 2016, 11:06:53 AM7/15/16
to vagra...@googlegroups.com
Hello,

You should start from a minimal configuration, and move slowly, so if you hit issues you have an smaller area where to check whats wrong.

ie.

# -*- mode: ruby -*-
# vi: set ft=ruby :


Vagrant.configure("2") do |config|


config.vm.box = "Centos7-3"


config.vm.box_url = "https://github.com/holms/vagrant-centos7-box/releases/download/7.1.1503.001/CentOS-7.1.1503-x86_64-netboot.box"

end

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.

--
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 a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/iuUNJ0itBg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.

--
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/7cda111e-1fc6-4e80-abd4-7a0cdbfce883%40googlegroups.com.

jiminfote...@gmail.com

unread,
Jul 16, 2016, 10:36:38 AM7/16/16
to Vagrant
I do agree but given the commands in the message trail, Vagrantfile and error file would you know what is the issue? or command which are in correctly type/syntax errors ?

Kind Regards,
Jim

Alvaro Miranda Aguilera

unread,
Jul 18, 2016, 2:43:11 PM7/18/16
to vagra...@googlegroups.com

On Sun, Jul 17, 2016 at 2:36 AM, <jiminfote...@gmail.com> wrote:
vb.gui = true
vb.memory = "3072"

your configuration for virtualbox should be inside a block.


ie

config.vm.provider "virtualbox" do |v|
  v.memory = 1024
  v.cpus = 2
end

DriveU

unread,
Jul 22, 2016, 1:41:17 AM7/22/16
to Vagrant
How to unbox vmware vm from a Vagrant Box?

Alvaro Miranda Aguilera

unread,
Jul 22, 2016, 7:58:24 PM7/22/16
to vagra...@googlegroups.com
Hello,

Can you explain your question? VMWare and VirtualBox are 2 different hypervisors.

Most of the time inside the guest you have software specific to make the hypervisor run better, so its way easier build your own box, with a tool like packer, and with 1 template you can build 1 or more hypervisors or cloud.

If you share more info, what OS you are after, and create a new thread in the mailing list, will be way easier to reply.

Thanks
Alvaro.

Reply all
Reply to author
Forward
0 new messages