Skip to content

Instantly share code, notes, and snippets.

@vitali2y
Created November 25, 2018 23:06
Show Gist options
  • Save vitali2y/80dd7f603898bd5dc81273092e412b34 to your computer and use it in GitHub Desktop.
Save vitali2y/80dd7f603898bd5dc81273092e412b34 to your computer and use it in GitHub Desktop.
Creating, running, and destroying a Ubuntu 16.04 minimal cloud image KVM under Linux Mint 18.3
@vitali2y
Copy link
Author

vitali2y commented Feb 4, 2019

Deleting a virtual machine:

evergreen ~ # virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     ubuntu-16.04-amd64             shut off
 -     ubuntu-16.04-node1             shut off
 -     ubuntu-16.04-node2             shut off
evergreen ~ # virsh dumpxml --domain ubuntu-16.04-node1 | grep 'source file'
      <source file='/home/vit/prjs/~...~/node1/ubuntu-16.04-amd64.img'/>
      <source file='/home/vit/prjs/~...~/node1/config.img'/>
evergreen ~ # ls -la /home/vit/prjs/~...~/node1/ubuntu-16.04-amd64.img /home/vit/prjs/~...~/node1/config.img
-rw-rw-r-- 1 libvirt-qemu kvm       374784 Dec  5 23:50 /home/vit/prjs/~...~/node1/config.img
-rw-r--r-- 1 root         root 10546774016 Feb  1 02:00 /home/vit/prjs/~...~/node1/ubuntu-16.04-amd64.img
evergreen ~ # virsh undefine --domain ubuntu-16.04-node1
Domain ubuntu-16.04-node1 has been undefined
evergreen ~ # virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     ubuntu-16.04-amd64             shut off
 -     ubuntu-16.04-node2             shut off

evergreen ~ # 

@vitali2y
Copy link
Author

vitali2y commented Sep 6, 2019 via email

@vitali2y
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment