
On Thu, Jul 24, 2008 at 04:12:05PM +0100, Daniel P. Berrange wrote:
On Thu, Jul 24, 2008 at 10:41:31AM -0400, Guido G?nther wrote:
On Thu, Jul 24, 2008 at 10:01:32AM +0100, Daniel P. Berrange wrote: [..snip..]
You need to check for UUID clash too. Indeed. But before fixing this I wonder what the exact semantics of domainCreateLinux are. Is it correct that we don't call virDomainSaveConfiguration?
Yes, that is correct.
virDomainCreateLinux() starts a virtual machine with no config file. All trace of it will disappear when it shuts down - a so called 'transient' VM.
Alternatively you can define the config first with virDomainDefineXML() and then start it based on this definition with virDomainCreate(). This gives you a persistent VM.
Now, while a transient VM is running you can explicitly give it a config file by called virDomainDefineXML with the same uuid, thus turning it in to a persistent VM. The attache patch also checks the uuid. -- Guido