Skip to content

Instantly share code, notes, and snippets.

@FibreFoX
Last active July 23, 2019 11:56
Show Gist options
  • Save FibreFoX/41262b2ada332e3ae3b658ae129baec4 to your computer and use it in GitHub Desktop.
Save FibreFoX/41262b2ada332e3ae3b658ae129baec4 to your computer and use it in GitHub Desktop.
Debain Stretch VM with Vagrant on Windows 10 and Virtualbox
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/stretch64"
config.vm.hostname = "some-vm"
## when using non-"contrib-" boxes from debian
## do NOT use rsync: https://stackoverflow.com/a/34882657/1961102
## override speficied type to use type "virtualbox" (default on debian-boxes are rsync)
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
# enable auto_update on non "debian/contrib-*" boxes, as they need to have vbguests being installed before provisioning
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = true
end
config.vm.define "some-vm" do |vmConfig|
vmConfig.vm.provider "virtualbox" do |vb|
vb.name = "some-vm"
# make it small ;)
vb.linked_clone = true
end
end
end
@FibreFoX
Copy link
Author

Before usage, make sure "vagrant-vbguest" is installed for Vagrant

vagrant plugin install vagrant-vbguest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment