0

I have looked at some of the other post about this and half of the stuff they say makes 0 since to me or the commands they say to run in the terminal come back as command not found. I have a windows OS so that could be the problem. If you run into this problem with windows please help!

I have disabled the firewall and that did nothing.

Vagrantfile:

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION = "2"
confDir = $confDir ||= File.expand_path("~/.homestead")

homesteadYamlPath = confDir + "/Homestead.yaml"
homesteadJsonPath = confDir + "/Homestead.json"
afterScriptPath = confDir + "/after.sh"
aliasesPath = confDir + "/aliases"

require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb')

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    if File.exists? aliasesPath then
        config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
    end

    if File.exists? homesteadYamlPath then
        Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
    elsif File.exists? homesteadJsonPath then
        Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath)))
    end

    if File.exists? afterScriptPath then
        config.vm.provision "shell", path: afterScriptPath
    end
end
NewbieCoder
  • 111
  • 4
  • 15

1 Answers1

0

ok as the issue is linked with VT-x/AMD-V hardware acceleration you should have 2 options:

  1. Enable virtualization from your bios if your hardware supports it (it might be turn off in your settings)

  2. If your hardware/CPU does not support it, tell vagrant to turn off hw virtualization by adding this in your Vagrantfile

    config.vm.provider :virtualbox do |vb| 
      vb.customize ["modifyvm", :id, "--hwvirtex", "off"]
    end
    

something like

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION = "2"
confDir = $confDir ||= File.expand_path("~/.homestead")

homesteadYamlPath = confDir + "/Homestead.yaml"
homesteadJsonPath = confDir + "/Homestead.json"
afterScriptPath = confDir + "/after.sh"
aliasesPath = confDir + "/aliases"

require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb')

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    if File.exists? aliasesPath then
        config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
    end

    if File.exists? homesteadYamlPath then
        Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
    elsif File.exists? homesteadJsonPath then
        Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath)))
    end

    if File.exists? afterScriptPath then
        config.vm.provision "shell", path: afterScriptPath
    end

    config.vm.provider :virtualbox do |vb| 
      vb.customize ["modifyvm", :id, "--hwvirtex", "off"]
    end
end
Frederic Henri
  • 51,761
  • 10
  • 113
  • 139
  • Where do I put this in the vagrantfile? I dont think this is working though thanks for the feedback. I will just continue without using vb/homestead at this point. – NewbieCoder Dec 18 '15 at 13:57
  • add example with your vagrantfile, did you also check your bios settings? – Frederic Henri Dec 18 '15 at 19:56