Skip to content

Instantly share code, notes, and snippets.

@micahyoung
Created October 28, 2015 00:33
Show Gist options
  • Save micahyoung/3c87770f1278c61b919d to your computer and use it in GitHub Desktop.
Save micahyoung/3c87770f1278c61b919d to your computer and use it in GitHub Desktop.
bosh-lite-swapfob
load './bosh-lite/Vagrantfile'
USB_NAME = 'SanDisk Cruzer Blade [0100]'
USB_VENDOR_ID = '0x0781'
USB_PRODUCT_ID = '0x5567'
SWAP_LABEL = 'SWAP-FOB'
Vagrant.configure('2') do |config|
config.vm.provision "shell", inline: "echo LABEL=#{SWAP_LABEL} swap swap sw 0 0 >> /etc/fstab; swapon -a"
config.vm.provider :virtualbox do |v, override|
v.memory = 4096
v.customize ['modifyvm', :id, '--usbxhci', 'on']
v.customize ['usbfilter', 'add', '0', '--target', :id, '--name', USB_NAME, '--vendorid', USB_VENDOR_ID, '--productid', USB_PRODUCT_ID]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment