I am trying to create 3 guest OS using the vagrant file for virtual box. Below are the content from the file.
Vagrant.configure(2) do |config|
config.ssh.insert_key = false
config.vm.define "node1" do |node1|
node1.vm.box = "geerlingguy/centos7"
node1.vm.box_version = "1.2.3"
node1.vm.network "private_network", ip: "192.168.199.2"
node1.vm.hostname = "node1.example.com"
node1.vm.provision "shell", path: "scripts/install_ambari_server.sh"
node1.vm.network "forwarded_port", guest: 8080, host: 8080
node1.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
v.customize ['modifyvm', :id, '--cableconnected1', 'on']
end
end
config.vm.define "node2" do |node2|
node2.vm.box = "geerlingguy/centos7"
node2.vm.box_version = "1.2.3"
node2.vm.network "private_network", ip: "192.168.199.3"
node2.vm.hostname = "node2.example.com"
node2.vm.provision "shell", path: "scripts/install_ambari_agent.sh"
node2.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
v.customize ['modifyvm', :id, '--cableconnected1', 'on']
end
end
config.vm.define "node3" do |node3|
node3.vm.box = "geerlingguy/centos7"
node3.vm.box_version = "1.2.3"
node3.vm.network "private_network", ip: "192.168.199.4"
node3.vm.hostname = "node3.example.com"
node3.vm.provision "shell", path: "scripts/install_ambari_agent.sh"
node3.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
v.customize ['modifyvm', :id, '--cableconnected1', 'on']
end
end
end
Then I ran the below command:
vagrant up node1 node2 node3
Only node 1 got created, and I got the following error :
Command: ["startvm", "f4560184-4d67-4bc5-b88a-bf38b507b003", "--type", "headless"]
Stderr: VBoxManage.exe: error: WHvCapabilityCodeHypervisorPresent is FALSE! Make sure you have enabled the 'Windows Hypervisor Platform' feature. (VERR_NEM_NOT_AVAILABLE).
VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
Here is the screenshot of windows feature dialog.As we can see hyper v platform is enabled.
In the virtual box application, I went to the settings of the node, there were three invalid settings. I fixed the 2 of those settings and their corresponding errors disappeared. Now only 1 error related to virtualization, is left. I have disabled the hardware virtualization setting, but still the error is there and it is not allowing me to save the setting. How to resolve this issue?
According to other answers, changing BIOS setting might help. I want to know if there is any alternative to that.
User contributions licensed under CC BY-SA 3.0