Re: [libvirt] OS Eject & Removable Media

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

 



Yeah, that's pretty much the problem in a nutshell. No notificatons
from QEMU

The only immediate option i see is to run 'info block' every time we
invoke virDomainGetXMLDesc(), in order to check if the CDROM media has
been ejected. Mildly disgusting, but probably doable.


Thanks for the quick and friendly reply!  It's nice to have confirmation.

Looking through the code with creating a qemu driver patch (specifically) in mind, it looks like I'd need to create a function, probably similar to info blockstats, that took a dom and a path argument, and returned a file, or if it was specific to this task, took an additional filepath to compare against, and return a true or false.

Then I'd want to add some functionality into either DomainXMLFromNative which might be too high-level, or possibly ParseCommandLineDisk in qemu_conf.c (which is ugly from a naming convention perspective, but simpler since all the data is right there.)

I'd compare the returned filename with dev->src (in ParseCommandLineDisk) and change the src to null if there's no mounted media.

I'm not so great at c coding, but I think I can hack something out if this sounds reasonable so far.

Thanks,

Jacob Leaver

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]