I wasn't going to mention that immediately since I see there are 'transient' properties for disks as well, and that makes them not save the changes, reverting to the original backing file on reboot. I wouldn't want to create a VM in 'transient' state without making sure I understood if that also applied. The domainCreateXML seems to be the transient VM mode according to this:
http://wiki.libvirt.org/page/VM_lifecycle#Transient_guest_domains_vs_Persistent_guest_domains Other than checking that, domainCreateXML sounds like it's the way to go if it keeps us from remembering the VM outside of cloudstack. On Thu, Feb 7, 2013 at 8:53 AM, Wido den Hollander (JIRA) <[email protected]> wrote: > > [ > https://issues.apache.org/jira/browse/CLOUDSTACK-600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573609#comment-13573609 > ] > > Wido den Hollander commented on CLOUDSTACK-600: > ----------------------------------------------- > > Checking the upstart script of libvirt-bin under Ubuntu shows it will destroy > all running VMs when going down, no mention of suspending them. > > We (the agent) should probably not use Connect.domainDefineXML for starting a > instance, but use Connect.domainCreateXML. The latter wil launch a instance > based on the XML, but won't make it persistent. > > Otherwise we can also use Domain.setAutostart() to make sure it's not > starting on boot, although that would look redundant to me and won't fix the > root cause. > > There should be a way to make XML definitions in libvirt not persistent so it > gets lost as soon as you reboot the hypervisor. > > For Java API, see: http://libvirt.org/sources/java/javadoc/ > >> When rebooting KVM local storage VM host, libvirt definitions deleted >> --------------------------------------------------------------------- >> >> Key: CLOUDSTACK-600 >> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-600 >> Project: CloudStack >> Issue Type: Bug >> Security Level: Public(Anyone can view this level - this is the >> default.) >> Components: KVM >> Affects Versions: pre-4.0.0 >> Reporter: Andrew Bayer >> >> This is definitely the case in 3.0.3, and I don't think the relevant code >> has been touched since. >> When you reboot a VM host running KVM local storage VMs, the VMs are deleted >> from libvirt. I presume this is due to CloudStack thinking it's migrating >> them away from the host, but obviously, given that we're on local storage, >> it's unable to do that. The result is that the VMs are not able to be >> restarted when the host comes back online. > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA administrators > For more information on JIRA, see: http://www.atlassian.com/software/jira
