One command to start your lab enviroment
- Vagrant 2.0.0+
- Virtualbox 5.1, VirtualBox 5.2.0 is not supported for Vagrant 2.0.0, Virtualbox 5.2 support
- user
ubuntu
androot
can ssh machine withdata\key\local_key
- set user's password in
data\user_password
, patternusername:password
, defaultroot:root
andubuntu:ubuntu
- machine with aliyun source
set google dns in/etc/resolvconf/resolv.conf.d/base
- as use same config OpenSSH Host Keys, ssh a rebuilded machine will not show message bellow
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:1e/0f6/Is1kjnpfjM/m8qFVWfKIgEcWoOXvZZHUZayI.
Please contact your system administrator.
Add correct host key in /home/lau/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/lau/.ssh/known_hosts:24
ECDSA host key for es.io has changed and you have requested strict checking.
Host key verification failed.
updatebase_path
inVagrantfile
, required- update
base_private_network_segment
inVagrantfile
, optional - update
base_public_network_segment
inVagrantfile
, optional updatevagrant_home_path
inVagrantfile
, required- generate local key by
ssh-keygen -t rsa
and paste it intodata\key\local_key
anddata\key\local_key.pub
, required - update
boot_up_message
inVagrantfile
, optional - config user password in
data\user_password
, patternusername:password
each line, optional - copy machine config template and modify your own machie name like
lab
,Vagrantfile
has initlab
andelasticsearch
default machine config, optional
#################### machine config start ####################
config.vm.define "lab", autostart: false do |machine|
hostname = "lab"
machine.vm.box = default_box
machine.vm.box_url = default_box_url
machine.vm.hostname = hostname
machine.vm.post_up_message = "#{hostname}#{boot_up_message}"
machine.vm.network "private_network", ip: "#{base_network_segment}10"
# machine.vm.network "public_network", ip: "#{base_public_network_segment}78" #, bridge: "Killer Wireless-n/a/ac 1535 Wireless Network Adapter"
config.vm.provider :virtualbox do |vb|
vb.name = hostname
end
machine.vm.provision :shell, privileged: false do |s|
s.inline = <<-SHELL
echo "#{hostname} shell init done"
SHELL
end
end
#################### machine config end ####################
vagrant up lab
vagrant destroy -f
vagrant suspend lab
vagrant resume lab
vagrant halt
ssh [email protected]
- AMD PCNet PCI II (Am79C970A);
- AMD PCNet FAST III (Am79C973, the default);
- Intel PRO/1000 MT Desktop (82540EM);
- Intel PRO/1000 T Server (82543GC);
- Intel PRO/1000 MT Server (82545EM);
- Paravirtualized network adapter (virtio).
"--nictype1", "Am79C973"
"--nicpromisc1", "allow-all"
"--nic1", "intnet"