I'm trying to unmount a guest cdrom using libvirt_domain_update_device (via php-libvirt). The guest cdrom is currently mounted via Ceph, via this XML: <disk type='network' device='cdrom'> <driver name='qemu' type='raw'/> <auth username='cdroms'> <secret type='ceph' uuid='XXXX'/> </auth> <source protocol='rbd' name='cdrom/test'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> In order to unmount it, I'm trying to use this XML: <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> However, I'm getting an error from libvirt: 'internal error: invalid secret type 'ceph''. I suspect this is because it's still trying to use the authentication information from the old cdrom definition. How do I convince it to not do this? I've tried specifiying an empty <auth/> block, but that generates it's own error ('missing username for auth')
Okay, let's try this another way... how are people dynamically attaching/removing cdroms from guests, without requiring a guest restart? On 5/22/2014 4:14 PM, Brian Rak wrote:> I'm trying to unmount a guest cdrom using libvirt_domain_update_device > (via php-libvirt). The guest cdrom is currently mounted via Ceph, via > this XML: > > <disk type='network' device='cdrom'> > <driver name='qemu' type='raw'/> > <auth username='cdroms'> > <secret type='ceph' uuid='XXXX'/> > </auth> > <source protocol='rbd' name='cdrom/test'/> > <target dev='hdc' bus='ide'/> > <readonly/> > <address type='drive' controller='0' bus='1' target='0' unit='0'/> > </disk> > > In order to unmount it, I'm trying to use this XML: > > <disk type='file' device='cdrom'> > <driver name='qemu' type='raw'/> > <target dev='hdc' bus='ide'/> > <readonly/> > <alias name='ide0-1-0'/> > <address type='drive' controller='0' bus='1' target='0' > unit='0'/> > </disk> > > However, I'm getting an error from libvirt: 'internal error: invalid > secret type 'ceph''. I suspect this is because it's still trying to > use the authentication information from the old cdrom definition. How > do I convince it to not do this? I've tried specifiying an empty > <auth/> block, but that generates it's own error ('missing username > for auth') > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
On Thu, May 29, 2014 at 11:52:49AM -0400, Brian Rak wrote:> Okay, let's try this another way... how are people dynamically > attaching/removing cdroms from guests, without requiring a guest restart?You can't dynamically attach / detach IDE devices at all. If you're using an IDE cdrom, the most you can do is change the media inserted in the tray - you can't hotplug the entire device. I've heard rumours it might be possible to use SCSI CDROM which might support hotplug, but I've never tried that, so can't say whether it'll work with libvirt. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Hello all, I'm wondering if in KVM a template is used to create the new VM xml config file, and if yes where it's located. Is it also possible to use a "common" config file with some params to be used by all the VMs ? or is it possible to include a common config file in the .xml ? Thank you! Cheers, Franco