How to add a swap drive to your system

How to add a swap drive to your system, in this case I did this for a virtual machine (qemu) running Arch Linux. See at the bottom for information about the virtual drive for qemu. List current available to system disks: sudo blkid List all disks: sudo lsblk Format as swap: sudo mkswap /dev/vdb gives back the UUID Now the new swap disk will be shown when executing this again: sudo blkid (also give the UUID) ...

2. Oktober 2019 · 1 Minute · utzer

Resize qemu VM disk

VM runterfahren Image der VM vergrössern: sudo qemu-img resize /var/lib/libvirt/images/vm_disk.img +15GB Je nach Setup ist sudo nicht nötig, durch den Befehl wird die Diskimagedatei um 15 GB vergrößert. VM starten Weiter geht es in der VM auf der Konsole. Partitioen mit parted anzeigen lassen: parted -l Ausgabe so oder ähnlich: Model: Virtio Block Device (virtblk) Disk /dev/vda: 53,7GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 53,7GB 53,7GB primary btrfs boot ...

16. März 2019 · 2 Minuten · utzer