Ich möchte VirtualBox mit Vagrantfile und Ansible ausführen.VirtualBox mit Vagrantfile und Ansible: VirtualBox beschwert sich, dass die Installation unvollständig ist
An erster Stelle schalte ich die Virtualisierung in meinem BIOS:
und schalten Sie Linux-Subsystem unter Windows.
Dann arbeite ich auf Bash unter Windows.
ich installieren VirtualBox:
sudo apt-get update
sudo apt-get install virtualbox
Dann installiere ich Vagrant:
sudo apt-get update
sudo apt-get install vagrant
Und ich dann installieren ansible:
sudo apt-get install software-properities-common
sudo apt-get-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
Ich habe Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
IP = "192.168.33.55"
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64" #target OS: Ubuntu 16.04 LTS
config.ssh.insert_key = false
config.vm.synced_folder ".", "/vagrant", disabled: true
config.ssh.username = "ubuntu"
config.vm.provider :virtualbox do |v|
v.name = "jenkins"
v.memory = 1024
v.cpus = 2
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--ioapic", "on"]
end
config.vm.hostname = "jenkins"
config.vm.network :private_network, ip: "192.168.33.55"
config.vm.network "forwarded_port", guest: 80, host: 8080
# Set the name of the VM. See: http://stackoverflow.com/a/17864388/100134
config.vm.define :jenkins do |jenkins|
end
# Ansible provisioner.
config.vm.provision "ansible" do |ansible|
ansible.playbook = "jenkins/playbook.yml"
ansible.inventory_path = "jenkins/inventory"
ansible.sudo = true
end
end
So
, ich versuche, es zu laufen
vagrant up
Aber ich habe einen Fehler:
VirtualBox is complaining that the installation is incomplete. Please run `VBoxManage --version` to see the error message which should contain instructions on how to fix this error
Natürlich, ich überprüfen:
VBoxManage --version
Und ich sehe:
The character device /dev/vboxdrv does not exist. Please install the virtualbox-dkms package and the appropriate headers, most likely linux-headers-3.4.0+. You will not be able to start VMs until this problem is fixed
Wenn ich versuche, es zu installieren
apt-get install virtualbox-dkms
Es heißt, dass die neueste Version noch installiert ist.
Auch habe ich versucht:
sudo dpkg-reconfigure virtualbox-dkms
Erfolgreichen, aber Fehler ist immer noch hier
sudo apt-get install linux-headers-generic
Erfolgreichen, aber Fehler ist immer noch hier
Meine CPU ist Secure Boot im BIOS nicht unterstützt .
Ich habe Windows 10 Professional.
Meine Hardware: Dual Core AMD Athlon II X2 250, 3000 MHz Asus M5A78L-M LX3 16 Gb DRAM
Also, wie kann ich meine Vagrantfile laufen? Danke für Ihre Hilfe!
Ich denke, der nächste (und letzte) Schritt ist das Kernelmodul für vbox zu kompilieren, aber ich erinnere mich nicht, welcher Befehl das ist. –