Hi there, I'm running KVM under Openstack . When I give virsh list command, I see some VM in NON persistent state. What does it mean? How can I move it to a persisten state ? I found that I cannot make a snapshot, from Openstack , of a machine which is in a NON PERSISTENT state. Regards Fiorenza -- Spazio Web S.r.l. V. Dante, 10 13900 Biella Tel.: +39 015 2431982 Fax.: +39 015 2522600 Numero d'Iscrizione al Registro Imprese presso CCIAA Biella, Cod.Fisc.e P.Iva: 02414430021 Iscriz. REA: BI - 188936 Cap. Soc.: €. 30.000 i.v.
On 03/23/2015 06:02 PM, Fiorenza Meini wrote:> When I give virsh list command, I see some VM in NON persistent state. > What does it mean? How can I move it to a persisten state ?Have those VMs attached some volumes or persistent storage in Cinder? Fabrizio
On 23.03.2015 16:02, Fiorenza Meini wrote:> Hi there, > I'm running KVM under Openstack . > > When I give virsh list command, I see some VM in NON persistent state. > What does it mean? How can I move it to a persisten state ?You can do that by running: virsh dumpxml $dom > dom.xml && virsh define dom.xml> > I found that I cannot make a snapshot, from Openstack , of a machine > which is in a NON PERSISTENT state.However, I don't think it's a good idea to go behind OpenStack's back and change things. Michal
On Mon, Mar 23, 2015 at 05:49:36PM +0100, Michal Privoznik wrote:> On 23.03.2015 16:02, Fiorenza Meini wrote: > > Hi there, > > I'm running KVM under Openstack . > > > > When I give virsh list command, I see some VM in NON persistent state. > > What does it mean? How can I move it to a persisten state ? > > You can do that by running: > > virsh dumpxml $dom > dom.xml && virsh define dom.xml > > > > > > I found that I cannot make a snapshot, from Openstack , of a machine > > which is in a NON PERSISTENT state. > > However, I don't think it's a good idea to go behind OpenStack's back > and change things.Michal is totally right, it gets really messy. If you have a live or offline Nova instance, and you're running current OpenStack stable release (e.g. 'Juno'). You can trivially make a snapshot: $ nova image-create vm snap1-of-vm --poll And, can boot instances off based on it: $ nova boot --flavor 1 --key_name oskey1 --image snap1-of-vm newvm -- /kashyap
On 3/23/2015 12:49 PM, Michal Privoznik wrote:> On 23.03.2015 16:02, Fiorenza Meini wrote: >> Hi there, >> I'm running KVM under Openstack . >> >> When I give virsh list command, I see some VM in NON persistent state. >> What does it mean? How can I move it to a persisten state ? > You can do that by running: > > virsh dumpxml $dom > dom.xml && virsh define dom.xmlYou want `virsh dumpxml --security-info $dom`, not just `virsh dumpxml`. There is a *critical* difference in that the former will preserve any passwords you have set (like say, VNC) whereas the latter will not. This is sadly not very obvious.