-1

I seem to be getting an error when trying to set a static IP on a vagrant box. Within my vagrant file I have this:

Vagrant.configure(2) do |config|

config.vm.box = "box-cutter/centos67"
config.vm.network "private_network", ip: "192.168.50.5”

end

I seem to be getting an error when running Vagrant UP:

here is a syntax error in the following Vagrantfile. The syntax error message is reproduced below for convenience:

/Vagrantfile:4: unterminated string meets end of file
/Vagrantfile:4: syntax error, unexpected end-of-input, expecting keyword_end

If I remove the config.vm.network "private_network", ip: "192.168.50.5” line the box will boot up fine.

Am I missing something, I have copied this from the Vagrant website

Thanks for your help


After changing the quotes to be the same i now get this error:

/Vagrantfile:4: no .<digit> floating literal anymore; put 0 before dot
config.vm.network “private_network”, ip: “192.168.50.5”

Vagrantfile:4: syntax error, unexpected tFLOAT, expecting '('
config.vm.network “private_network”, ip: “192.168.50.5”
Mykola
  • 127
  • 1
  • 2
  • 7
Matt
  • 11
  • 2

1 Answers1

0

Thanks Michael Hampton - putting the correct quotes in

Vagrant.configure(2) do |config|

config.vm.box = "box-cutter/centos67"
config.vm.network "private_network", ip: "192.168.50.5"

end

TextEdit on Mac was putting instead of "

Matt
  • 11
  • 2