vagrant 常用命令
vagrant global-status
vagrant destroy 1a2b3c4d
Vagrant.configure("2") do |config|
(1..3).each do |i|
config.vm.define "Kubernetes-node#{i}" do |node|
node.vm.box = "centos/7"
node.vm.hostname="Kubernetes-node#{i}"
node.disksize.size = '80GB'
node.vm.network "private_network", ip: "192.168.56.#{80+i}", netmask: "255.255.255.0"
node.vm.provider "virtualbox" do |v|
v.name = "Kubernetes-node#{i}"
v.memory = 8192
v.cpus = 6
end
end
end
end
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
Unknown configuration section ‘disksize’.
vagrant plugin install vagrant-disksize
A VirtualBox machine with the name ‘Kubernetes-node1’ already exists.
vagrant global-status
vagrant destroy 1a2b3c4d