Commit 0d589d3d authored by Reimar Stier's avatar Reimar Stier

Add notes on retaining attached storage when destroying vagrant box

parent f1c8c01d
......@@ -8,7 +8,7 @@ BOX_NAME = "devbox"
Vagrant.configure("2") do |config|
config.vm.box = "geerlingguy/debian10"
config.vm.box = ENV["DEVBOX_BASE_BOX"] || "geerlingguy/debian10"
config.vm.network "private_network", ip: ENV["DEVBOX_IP"] || "192.168.200.4", adapter: 2
config.vm.hostname = "devbox.devops.detss.corpintra.net"
......
......@@ -35,9 +35,10 @@ Issues with nvidia graphics card (NVIDIA Corporation GK106GLM [Quadro K2100M]).
# base boxes
* geerlingguy https://app.vagrantup.com/geerlingguy
* gerlingguy/debian10 (https://github.com/geerlingguy/packer-debian-10)
* gerlingguy/debian10 (https://github.com/geerlingguy/packer-debian-10) `tested`
* geerlingguy/ubuntu1804
* Ubuntu https://app.vagrantup.com/ubuntu/
* ubuntu/bionic64 (Ubuntu 18.04)
* ubuntu/bionic64 (Ubuntu 18.04) `DID NOT BOOT v20190918.0.0`
* Generic https://app.vagrantup.com/generic/
* Roboxes (https://roboxes.org/) is a project that encapsulates Packer templates for building base boxes suitable for use with Vagrant, Docker, or as generic open virtualization appliances. A subset of the templates are built and available from the Vagrant Cloud.
......
# List of improvements to this setup
### Vagrant
Improvements relating to vagrant and its configuration.
#### Do not destroy attached storage disks
https://stackoverflow.com/questions/45038248/vagrant-detach-vdi-file-before-destroy-or-just-dont-remove-it
https://stackoverflow.com/a/51859546
* Does not work yet
```
# detach drives before destroying box to ensure home partition will survive
config.trigger.before :destroy do
# info "dettaching drives"
DISKS.each do |disk|
vb.customize ['storageattach', "devbox", '--storagectl', 'SATA Controller', '--port', disk["port"], '--device', 0, '--type', 'hdd', '--medium', "none"]
end
end
```
\ No newline at end of file
......@@ -7,10 +7,6 @@
- name: "IntelliJ IDEA Ultimate"
- name: "PyCharm Professional"
pre_tasks:
- name: "Update apt cache"
apt:
update_cache: yes
cache_valid_time: 86400 # one day
- import_tasks: tasks/partitioning.yml
tags: partition
roles:
......
......@@ -6,6 +6,11 @@
loop_control:
loop_var: disk
- name: "Update apt cache"
apt:
update_cache: yes
cache_valid_time: 86400 # one day
- name: Install rsync
package:
name: ["rsync", "parted"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment