User Tools

Site Tools


vm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vm [2025/04/12 04:06] ealmrvm [2025/05/17 12:47] (current) ealmr
Line 1: Line 1:
 +====== QEMU ======
 +
 +resize qcow2 size:
 +
 +  qemu-img resize /path/to/qcow2 20G
 +  qemu-img resize /path/to/qcow2 +20G
 +
 +grow guest partition size:
 +
 +  growpart /dev/vda X
 +  # grow ext4
 +  resize2fs /dev/vdaX
 +  # grow btrfs
 +  btrfs filesystem resize max /
 +
 ====== Hyper-V ====== ====== Hyper-V ======
  
Line 6: Line 21:
  
 ====== WSL ====== ====== WSL ======
 +
 +general commands:
  
   wsl --mount --vhd <VHD> --bare   wsl --mount --vhd <VHD> --bare
Line 12: 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:
 +
 +<code>
 +https://superuser.com/questions/1617298/wsl-2-running-ubuntu-x-server-cant-open-display/1834709#1834709
 +cat > /etc/systemd/system/wslg.service <<EOF
 +[Unit]
 +Description=symlink /tmp/.X11-unix
 +After=systemd-tmpfiles-setup.service
 +
 +[Service]
 +Type=oneshot
 +ExecStart=rmdir /tmp/.X11-unix
 +ExecStart=ln -s /mnt/wslg/.X11-unix /tmp/
 +
 +[Install]
 +WantedBy=sysinit.target
 +EOF
 +</code>
 +
 +enable this service:
  
 +  systemctl enable wslg
 ====== Configs ====== ====== Configs ======
  
vm.1744430774.txt.gz · Last modified: by ealmr

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki