Commit 95e598c8 authored by Reimar Stier's avatar Reimar Stier

Resize home partition, add disk type vdi/vmdk

parent 564c84d4
...@@ -53,9 +53,10 @@ Vagrant.configure("2") do |config| ...@@ -53,9 +53,10 @@ Vagrant.configure("2") do |config|
end end
DISKS.each do |disk| DISKS.each do |disk|
datadisk = "disks/" + disk["name"] + ".vmdk" diskType = disk["type"] || "vmdk"
datadisk = "disks/" + disk["name"] + "." + diskType
unless File.exist?(datadisk) unless File.exist?(datadisk)
vb.customize ['createmedium', '--filename', datadisk,'--format', 'VMDK', '--variant', 'Standard', '--size', disk["size"] * 1024] vb.customize ['createmedium', '--filename', datadisk,'--format', diskType, '--variant', 'Standard', '--size', disk["size"] * 1024]
end end
vb.customize ['storageattach', "devbox", '--storagectl', 'SATA Controller', '--port', disk["port"], '--device', 0, '--type', 'hdd', '--medium', datadisk] vb.customize ['storageattach', "devbox", '--storagectl', 'SATA Controller', '--port', disk["port"], '--device', 0, '--type', 'hdd', '--medium', datadisk]
end end
......
...@@ -5,6 +5,7 @@ storage_disks: ...@@ -5,6 +5,7 @@ storage_disks:
port: 1 port: 1
device: "/dev/sdb" device: "/dev/sdb"
mount: "/home" mount: "/home"
type: "vdi"
- name: docker - name: docker
size: 40 size: 40
port: 3 port: 3
......
...@@ -21,3 +21,24 @@ Copy&Paste no longer working after update. Reinstall guest additions in guest sy ...@@ -21,3 +21,24 @@ Copy&Paste no longer working after update. Reinstall guest additions in guest sy
Check system service: "systemctl status vboxadd" Check system service: "systemctl status vboxadd"
If necessary attach guest additions in virtualbox and reinstall them from mounted path in e.g. "/opt/VBoxGuestAdditions-6.0.10/init/vboxadd" If necessary attach guest additions in virtualbox and reinstall them from mounted path in e.g. "/opt/VBoxGuestAdditions-6.0.10/init/vboxadd"
### Resize disk
Resize Virtualbox/Vagrant disk image outside on the host system and inside in the virtual machine.
* Resize disk image
```
VBoxManage clonemedium "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifymedium "cloned.vdi" --resize 120000
VBoxManage clonemedium "cloned.vdi" "resized.vmdk" --format vmdk
```
* Resize disk inside virtual machine
```
lsof /home
umount /home
e2fsck -f /dev/sdX1
fdisk -l # delete disk and re-add with new size
e2fsck -f /dev/sdX1
resize2fs /dev/sdX1
partprobe
systemctl restart lightdm
```
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