[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Allow changing ejectable device in domains using default qemu emulator



Stuart Jansen wrote:
> When a qemu domain is launched but an emulator is not explicitly
> defined, the default emulator is used. Attempts to attach ejectable
> devices to a domains using the default emulator fail with the error:
> "Error Connecting CDROM: internal error\nCannot determine QEMU argv
> syntax (null)".
> 

<snip>

> 
> In addition, if we simply set vm->dev->emulator =
> strdup(virDomainDefDefaultEmulator()) in qemudStartVMDaemon() then
> virDomainDefFormat() will dump <emulator>...</emulator> for domains that
> did't actually have it explicitly defined. I don't know if this is a bug
> or improvement, but it is a change in behavior.
> 

I think this is the real bug. Whatever emulator we use
to launch the VM should show up in the domain xml, and
fixing this would make the reported issue go away as
you say.

I think the way to do it is to alter 
virDomainDefDefaultEmulator to return NULL if no emulator
is found, rather than error. The we can call it at parse
time, rather than offload it to each driver that needs it.
The error should trickle down to somewhere else so I don't
think this approach loses anything. This would also make
all other calls to virDomainDefDefaultEmulator redundant.

I could be missing something though :)

Thanks,
Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]