Created
November 8, 2018 14:32
-
-
Save konstruktoid/2f5ef3d47531dbc9e786928c76969540 to your computer and use it in GitHub Desktop.
Ubuntu ZFS Vagrantfile
This file contains 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
Vagrant.configure(2) do |config| | |
config.vm.define "zfsU01" do |zfsU01| | |
zfsU01.vm.box = "ubuntu/bionic64" | |
zfsU01.ssh.insert_key = true | |
zfsU01.vm.network "private_network", ip:"10.2.3.4" | |
zfsU01.vm.hostname = "zfsU01" | |
zfsU01.vm.provision "shell", | |
inline: "apt-get update && apt-get -y upgrade && apt-get -y install zfsutils-linux --no-install-recommends" | |
zfsU01dataDisk1 = './zfsU01dataDisk1.vdi' | |
zfsU01dataDisk2 = './zfsU01dataDisk2.vdi' | |
config.vm.provider "virtualbox" do |vbU01| | |
vbU01.memory = "2048" | |
if not File.exists?(zfsU01dataDisk1) | |
vbU01.customize ['createhd', '--filename', zfsU01dataDisk1, '--variant', 'Standard', '--size', 10 * 1024] | |
end | |
if not File.exists?(zfsU01dataDisk2) | |
vbU01.customize ['createhd', '--filename', zfsU01dataDisk2, '--variant', 'Standard', '--size', 10 * 1024] | |
end | |
vbU01.customize ['storageattach', :id, '--storagectl', 'SCSI', '--port', 2, '--device', 0, '--type', 'hdd', '--medium', zfsU01dataDisk1] | |
vbU01.customize ['storageattach', :id, '--storagectl', 'SCSI', '--port', 3, '--device', 0, '--type', 'hdd', '--medium', zfsU01dataDisk2] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment