vm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| vm [2025/04/12 04:05] – ealmr | vm [2025/05/17 12:47] (current) – ealmr | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== QEMU ====== | ||
| + | |||
| + | resize qcow2 size: | ||
| + | |||
| + | qemu-img resize / | ||
| + | qemu-img resize / | ||
| + | |||
| + | grow guest partition size: | ||
| + | |||
| + | growpart /dev/vda X | ||
| + | # grow ext4 | ||
| + | resize2fs /dev/vdaX | ||
| + | # grow btrfs | ||
| + | btrfs filesystem resize max / | ||
| + | |||
| + | ====== Hyper-V ====== | ||
| + | |||
| + | convert qcow2 image to vhdx: | ||
| + | |||
| + | qemu-img convert -p -f qcow2 -O vhdx / | ||
| + | |||
| ====== WSL ====== | ====== WSL ====== | ||
| + | |||
| + | general commands: | ||
| wsl --mount --vhd <VHD> --bare | wsl --mount --vhd <VHD> --bare | ||
| Line 6: | Line 29: | ||
| Resize-VHD –Path <VHD> –SizeBytes 30GB | Resize-VHD –Path <VHD> –SizeBytes 30GB | ||
| | | ||
| + | shrink VHD: | ||
| + | |||
| + | optimize-vhd -Path .\ext4.vhdx -Mode full | ||
| + | |||
| + | to fix DISPLAY on Arch, create following systemd service: | ||
| + | |||
| + | < | ||
| + | https:// | ||
| + | cat > / | ||
| + | [Unit] | ||
| + | Description=symlink / | ||
| + | After=systemd-tmpfiles-setup.service | ||
| + | |||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | ExecStart=rmdir / | ||
| + | ExecStart=ln -s / | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=sysinit.target | ||
| + | EOF | ||
| + | </ | ||
| + | |||
| + | enable this service: | ||
| + | systemctl enable wslg | ||
| ====== Configs ====== | ====== Configs ====== | ||
vm.1744430704.txt.gz · Last modified: by ealmr
