User Tools

Site Tools


docs:tips_n_tricks:libvirt.html

libvirt / virsh / qemu

Create Debian VM

virt-install \
  --name my-debian-vm \
  --ram 2048 \
  --vcpus 2 \
  --disk path=/var/lib/xen/images/debian-vm.img,bus=xen,size=5 \
  --location "http://deb.debian.org/debian/dists/stable/main/installer-amd64/" \
  --os-variant debian11 \
  --graphics none \
  --network bridge=xenbr0,model=netfront \
  --virt-type xen \
  --extra-args 'console=serial'

Use –location http://archive.debian.org/debian/dists/wheezy/main/installer-amd64/ for outdated releases.

Remove VM

virsh undefine my-wheezy-vm
virsh vol-delete /var/lib/xen/images/wheezy-vm.img
docs/tips_n_tricks/libvirt.html.txt · Last modified: 19.01.2024 13:55 CET by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki