metalx1000

Debian Desktop Setup in Qemu VM

Mar 31st, 2024 (edited)
1,512
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.68 KB | None | 0 0
  1. sudo apt install -y guestfs-tools
  2.  
  3. #get VM Image
  4. wget "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-nocloud-amd64.qcow2" -O debian_small.qcow2
  5.  
  6. #resize image
  7. #create 10G empty iage
  8. qemu-img create -f qcow2 -o preallocation=metadata debian.qcow2 10G
  9. virt-resize --expand /dev/sda1 debian_small.qcow2 debian.qcow2
  10.  
  11.  
  12. #qemu-img resize debian_small.qcow2 +10G
  13. #sudo qemu-nbd -c /dev/nbd0 debian-12-nocloud-amd64.qcow2
  14. #sudo gparted /dev/nbd0
  15. #sudo qemu-nbd -d /dev/nbd0
  16.  
  17. # Start VM
  18. qemu-system-x86_64 -enable-kvm -m 4G -hda debian.qcow2
  19.  
  20. # In VM
  21. apt update
  22. apt upgrade
  23. apt install gpm tmux
  24. wget -qO- "https://filmsbykris.com/scripts/2024/debian_setup.txt"
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment