Skip to content

Instantly share code, notes, and snippets.

@fl64
Last active December 18, 2017 18:42
Show Gist options
  • Save fl64/9dfbabf7a794de02eb30634ded3cd2a1 to your computer and use it in GitHub Desktop.
Save fl64/9dfbabf7a794de02eb30634ded3cd2a1 to your computer and use it in GitHub Desktop.
OTUS Linux HW1 - vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box_check_update = false
config.vm.box_url = [ 'https://otus.ru/media/c7.4.box' ]
config.vm.box = "c7.4"
config.vm.hostname = "disks"
config.vm.define "disks" do |d|
d.vm.provider "virtualbox" do |vb|
vb.name = "disks"
vb.linked_clone = true
(1..6).each do |n|
disk_file = "./.vagrant/machines/disks/c7-disk-d#{n}.vdi"
unless File.exists?(disk_file)
vb.customize ['createmedium', 'disk', '--filename', disk_file, '--size', 500]
end
vb.customize ['storageattach', :id, '--storagectl', 'SATA', '--port', n, '--device', 0, '--type', 'hdd', '--medium', disk_file ]
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment