config.ssh.insert_key = false
config.ssh.private_key_path = ['C:\\Users\\grgbanking\\.vagrant.d\\insecure_private_key']
config.vm.network "forwarded_port", guest: 22, host: 2222, id: "ssh", disabled: "true"
config.vm.network "forwarded_port", guest: 22, host: 8888
config.ssh.insert_key = false
config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key']
config.vm.network "forwarded_port", guest: 22, host: 2222, id: "ssh", disabled: "true"
config.vm.network "forwarded_port", guest: 22, host: 8888
vagrant destroy -f && rm -rf .vagrant
config.ssh.insert_key = false
config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']
config.ssh.insert_key = false
config.ssh.private_key_path = ["keys/private", "~/.vagrant.d/insecure_private_key"]
config.vm.provision "file", source: "keys/public", destination: "~/.ssh/authorized_keys"
config.ssh.insert_key = false
config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']
C:\\Users\wei\\.vagrant.d\\insecure_private_key
Vagrant.configure("2") do |config|
config.ssh.private_key_path = "~/.ssh/id_rsa"
config.ssh.forward_agent = true
end
config.ssh.private_key_path = "C:\\Users\\grgbanking\\ssh\\vgrantKEYpass"
config.vm.network "forwarded_port", guest: 22, host: 2222, id: "ssh", disabled: "true"
config.vm.network "forwarded_port", guest: 22, host: 3333
metadata.json
{
"name": "ubuntu/bionic64",
"versions": [{
"version": "20190322",
"providers": [{
"name": "virtualbox",
"url": "./bionic-server-cloudimg-amd64-vagrant.box"
}]
}]
}
然后:
vagrant box add metadata.json
查看:
vagrant box list
https://app.vagrantup.com/boxes/search
https://cloud-images.ubuntu.com/bionic/
vagrant box add box_Name xxx.box
config.vm.network "public_network", :bridge => "eno1", auto_config: false
vagrant global-status
vboxmanage list vms
vboxmanage list vms
VBoxManage unregistervm xxx-id --delete
执行
vagrant global-status --prune
把虚拟机入口彻底清除
https://www.cnblogs.com/davenkin/p/vagrant-virtualbox.html
https://www.cnblogs.com/kelsen/archive/2017/01/04/6247005.html
https://app.vagrantup.com/centos/boxes/7
https://cloud.centos.org/centos/7/vagrant/x86_64/images/
Ubuntu vagrant Installed Version: 1.8.1 只能和 virtaulbox 4.0, 4.1, 4.2, 4.3, 5.0 这些版本兼容
https://github.com/rootsongjc/kubernetes-vagrant-centos-cluster/blob/master/README-cn.md
virtualbox download:
https://download.virtualbox.org/virtualbox
https://ligerlearn.com/course/vagrant-from-scratch/
https://www.youtube.com/watch?v=RSslFGH1Vjw&list=PLMWwct3_kb-358XZdnN66zb3HaU97DSQ0&index=7
https://www.youtube.com/watch?list=PL2vfKi8eN0j72pmf3IjXhTXMXhm2LYlgz&time_continue=2&v=d3wrp2BEvuE
https://sysadmincasts.com/episodes/42-crash-course-on-vagrant-revised