Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
extend_hard_disk_debian_vm [2021/07/15 19:18] warmachine created |
extend_hard_disk_debian_vm [2021/07/16 00:50] (current) warmachine |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | expand hard disk in linux vm | + | expand hard disk in linux vm\\ |
| - | + | \\ | |
| - | -merge all checkpoints | + | -merge all checkpoints\\ |
| - | -shutdown VM | + | -shutdown VM\\ |
| - | -make a copy of your virtual hard drive and store in another location | + | -make a copy of your virtual hard drive and store in another location |
| - | -rightclick VM, seetings, edit | + | -rightclick VM, seetings, edit\\ |
| - | -virtual hard drive from left menu | + | -virtual hard drive from left menu\\ |
| - | -edit | + | -edit\\ |
| - | -click next | + | -click next\\ |
| - | -choose expand, click next | + | -choose expand, click next\\ |
| - | -select new size, click finish, click OK | + | -select new size, click finish, click OK\\ |
| - | -start VM | + | -start VM\\ |
| - | + | \\ | |
| - | -ssh to VM | + | -ssh to VM\\ |
| - | -sudo fdisk /dev/sda | + | -sudo fdisk /dev/sda\\ |
| - | -p to list partitions | + | -p to list partitions\\ |
| - | -d to delete the partitions, then 1, d, 2, etc (data will not be lost) | + | -d to delete the partitions, then 1, d, 2, etc (data will not be lost)\\ |
| - | -n for a new partition | + | -n for a new partition\\ |
| - | -p for primary, 1 for 1st, 2048 for starting sector, largest possible for last sector | + | -p for primary, 1 for 1st, 2048 for starting sector, largest possible for last sector\\ |
| - | -if asked partition contains ext4 signare do you want to remove? choose no | + | -if asked partition contains ext4 signare do you want to remove? choose no\\ |
| - | -p to verify partitions and size | + | -p to verify partitions and size\\ |
| - | -a to make the partition bootable | + | -a to make the partition bootable\\ |
| - | -w to write changes. may get a message about re-reading the table failed. this is ok. | + | -w to write changes. may get a message about re-reading the table failed. this is ok.\\ |
| - | -sudo reboot | + | -sudo reboot\\ |
| - | -wait (it takes time to apply the changes, so if ssh doesn' | + | -wait (it takes time to apply the changes, so if ssh doesn' |
| - | -sudo resize2fs /dev/sda1 (this expands the partition to use the rest of the space we just reated) | + | -sudo resize2fs /dev/sda1 (this expands the partition to use the rest of the space we just reated)\\ |
| - | -df -h to confirm | + | -df -h to confirm\\ |
| - | + | \\ | |
| - | -if your swap partition was deleted, create a swap file | + | -if your swap partition was deleted, create a swap file\\ |
| - | -sudo fallocate -l 512M /swapfile | + | -sudo fallocate -l 512M /swapfile\\ |
| - | -sudo chmod 600 /swapfile | + | -sudo chmod 600 /swapfile\\ |
| - | -sudo mkswap /swapfile | + | -sudo mkswap /swapfile\\ |
| - | -sudo swapon /swapfile | + | -sudo swapon /swapfile\\ |
| - | -sudo swapon --show to verify | + | -sudo swapon --show to verify\\ |
| - | -sudo cp /etc/fstab / | + | -sudo cp /etc/fstab / |
| - | -echo '/ | + | -echo '/ |
| - | -sudo nano / | + | -sudo nano / |
| - | -add to the end: | + | -add to the end:\\ |
| - | vm.swappiness=10 | + | vm.swappiness=10\\ |
| - | vm.vfs_cache_pressure=50 | + | vm.vfs_cache_pressure=50\\ |
| - | -save | + | -save\\ |
| - | + | \\ | |
| - | go back into fstab and remove old swap partition uuid | + | go back into fstab and remove old swap partition uuid\\ |
| - | + | \\ | |
| - | + | \\ | |
| - | references: | + | references:\\ |
| - | + | \\ | |
| - | [[https:// | + | [[https:// |
| - | + | \\ | |
| - | [[https:// | + | [[https:// |
| - | + | \\ | |
| - | [[https:// | + | [[https:// |
| + | \\ | ||
Last modified: le 2021/07/15 19:18
