On Mon, Nov 03, 2008 at 04:33:12PM +0100, Daniel Veillard wrote: > On Mon, Nov 03, 2008 at 12:52:40PM +0000, Daniel P. Berrange wrote: > > Latest QEMU code now allows setting of the UUID in its SMBIOS data tables > > via the -uuid command line arg. THis patch makes use of that feature by > > pasing in the libvirt UUID for the VM. While doing this I also added > > support for the Xenner specific -domid flag > > Seems some people were waiting for this :-) > http://blog.loftninjas.org/?p=261 > > > @@ -901,10 +903,10 @@ static int qemudStartVMDaemon(virConnect > > ret = virExec(conn, argv, progenv, &keepfd, &vm->pid, > > vm->stdin_fd, &vm->stdout_fd, &vm->stderr_fd, > > VIR_EXEC_NONBLOCK); > > - if (ret == 0) { > > - vm->def->id = driver->nextvmid++; > > + if (ret == 0) > > vm->state = migrateFrom ? VIR_DOMAIN_PAUSED : VIR_DOMAIN_RUNNING; > > - } > > + else > > + vm->def->id = -1; > > Okay, i had a bit of trouble with that part of the patch, but I assume > that since the id can come from the config file, it's already set at > that point and we update to -1 only if the exec failed. Originally we didn't allocate the ID value until after building the command line, but since we need to pass -domid to Xenner, I had to move it to allocate the ID value before. So we have this extra cleanup step to blank out the ID if domain startup fails Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list