notebook/IT/virsh.md
2020-11-26 18:38:25 +01:00

967 B

virsh usefull command

standart

  • recover configuration xml from VM: virsh dumpxml windows7> windows7.xml
  • start VM: virsh start nas
  • shutdown VM: virsh shutdown win7
  • rename VM: virsh domrename --domain generic2 --new-name windows7
  • list all vm: virsh list --all
  • create with xml file:create --file debian8.xml
  • force shutdown:virsh destroy win7

snapshot:

  • list for domain virsh snapshot-list --domain nas
  • create snapshot virsh snapshot-create-as --domain {VM-NAME} --name {SNAPSHOT-NAME} --live
  • info snapshot: virsh snapshot-info --domain nas --snapshotname "ansible ping OK"
  • appliquer une snapshot: virsh snapshot-revert --domain --snapshotname "ansible ping OK" --running
  • delete snapshot: virsh snapshot-delete --domain freebsd --snapshotname 5Sep2016_S2

enabling guest function on arch

  • install spice-vdagent
  • add in etc/mkinitcpio.conf
MODULES=(virtio virtio_blk virtio_pci virtio_net)