virsh create somefile.xml
creates my machine just fine but when I shut the machine down the whole thing disappears. Machines I made with the virt-manager GUI are persistent (stick around after shutdown) and the xml file is derived from those virt-manager created machines.
Use
virsh define somefile.xml
andvirsh start domain-name
, doing this the VM will be persistent. I can't check right now, but I think you can usevirsh define
on an already started VM and this will make it persistent.If you don't have the xml for the running vm (eg. after transient migration), you can do
To check:
The VM should now be listed. Or
There should be a line with 'Persistent: yes'.