Created
February 19, 2014 08:03
-
-
Save blkperl/9087848 to your computer and use it in GitHub Desktop.
solaris11 with multiple disks vagrant file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.define "sunosfiler" do |v| | |
| v.vm.box = "solaris-11.1" | |
| v.vm.hostname = "sunosfiler" | |
| v.vm.network :private_network, ip: "192.168.1.11" | |
| v.vm.box_url = "/stash/nixmentors/boxes/packer_solaris-11.1-amd64_virtualbox.box" | |
| # Create a sata controller for our disks | |
| v.vm.provider :virtualbox do |vb| | |
| vb.customize ["storagectl", :id, "--name", "SATA Controller", "--add", 'sata'] | |
| diskname = "/disk/trump/minerals/#{ENV['USER']}/sun-ide1.vdi" | |
| vb.customize ['createhd', '--filename', diskname, '--size', 8 * 1024] | |
| vb.customize ['storageattach', :id, '--storagectl', 'IDE Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', diskname] | |
| end | |
| # Create six disks for a zpool | |
| v.vm.provider :virtualbox do |vb| | |
| ["1","2","3","4","5","6"].each do |disk| | |
| diskname = "/disk/trump/minerals/#{ENV['USER']}/sun-sata#{disk}.vdi" | |
| vb.customize ['createhd', '--filename', diskname, '--size', 1024] | |
| vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', disk, '--device', 0, '--type', 'hdd', '--medium', diskname] | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment