Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vagrantsetup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
devbox
vagrantsetup
Commits
95e598c8
Commit
95e598c8
authored
Nov 29, 2021
by
Reimar Stier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resize home partition, add disk type vdi/vmdk
parent
564c84d4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
Vagrantfile
Vagrantfile
+3
-2
disks.yml
disks/disks.yml
+1
-0
Virtualbox.md
doc/Virtualbox.md
+21
-0
No files found.
Vagrantfile
View file @
95e598c8
...
...
@@ -53,9 +53,10 @@ Vagrant.configure("2") do |config|
end
DISKS
.
each
do
|
disk
|
datadisk
=
"disks/"
+
disk
[
"name"
]
+
".vmdk"
diskType
=
disk
[
"type"
]
||
"vmdk"
datadisk
=
"disks/"
+
disk
[
"name"
]
+
"."
+
diskType
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
vb
.
customize
[
'storageattach'
,
"devbox"
,
'--storagectl'
,
'SATA Controller'
,
'--port'
,
disk
[
"port"
],
'--device'
,
0
,
'--type'
,
'hdd'
,
'--medium'
,
datadisk
]
end
...
...
disks/disks.yml
View file @
95e598c8
...
...
@@ -5,6 +5,7 @@ storage_disks:
port
:
1
device
:
"
/dev/sdb"
mount
:
"
/home"
type
:
"
vdi"
-
name
:
docker
size
:
40
port
:
3
...
...
doc/Virtualbox.md
View file @
95e598c8
...
...
@@ -21,3 +21,24 @@ Copy&Paste no longer working after update. Reinstall guest additions in guest sy
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"
### 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
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment