[libvirt-users] Changing default nic and storage types

Hi, Simple question that I can't track down any notable discussion about, let alone an answer... Is it possible to define what the "default" nic and storage types are? I am deploying images out of cobbler using koan and all of them are running virtio wherever applicable, but this is not the default, and at present there is no way within koan or cobbler to define what type of devices they should be. I've hard coded this device type declaration into koan, but don't like that in the slightest, and would typically expect to be able to just set "default=virtio" in a libvirt config file somewhere. I fear I'm actually not missing anything and it's just hard coded for the most compatible device with no recourse to override it. Thanks Chris

于 2010年11月16日 21:30, Chris Phillips 写道:
Hi,
Simple question that I can't track down any notable discussion about, let alone an answer...
Is it possible to define what the "default" nic and storage types are? I am deploying images out of cobbler using koan and all of them are running virtio wherever applicable, but this is not the default, and at present there is no way within koan or cobbler to define what type of devices they should be. I've hard coded this device type declaration into koan, but don't like that in the slightest, and would typically expect to be able to just set "default=virtio" in a libvirt config file somewhere.
I fear I'm actually not missing anything and it's just hard coded for the most compatible device with no recourse to override it.
It seems reasonable to add a new preference in "/etc/libvirt/qemu.conf". Now libvirt use "ide" as the bus type for disk device if it fails on the series detections. - Osier
Thanks
Chris
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

On 17/11/2010, at 5:38 PM, Osier Yang wrote:
于 2010年11月16日 21:30, Chris Phillips 写道:
Hi,
Simple question that I can't track down any notable discussion about, let alone an answer...
Is it possible to define what the "default" nic and storage types are? I am deploying images out of cobbler using koan and all of them are running virtio wherever applicable, but this is not the default, and at present there is no way within koan or cobbler to define what type of devices they should be. I've hard coded this device type declaration into koan, but don't like that in the slightest, and would typically expect to be able to just set "default=virtio" in a libvirt config file somewhere.
I fear I'm actually not missing anything and it's just hard coded for the most compatible device with no recourse to override it.
It seems reasonable to add a new preference in "/etc/libvirt/qemu.conf". Now libvirt use "ide" as the bus type for disk device if it fails on the series detections.
Might also be well placed as something in the "to be written" user preferences file too, so each user can specific their own defaults.

On Wed, Nov 17, 2010 at 02:38:49PM +0800, Osier Yang wrote:
于 2010年11月16日 21:30, Chris Phillips 写道:
Hi,
Simple question that I can't track down any notable discussion about, let alone an answer...
Is it possible to define what the "default" nic and storage types are? I am deploying images out of cobbler using koan and all of them are running virtio wherever applicable, but this is not the default, and at present there is no way within koan or cobbler to define what type of devices they should be. I've hard coded this device type declaration into koan, but don't like that in the slightest, and would typically expect to be able to just set "default=virtio" in a libvirt config file somewhere.
I fear I'm actually not missing anything and it's just hard coded for the most compatible device with no recourse to override it.
It seems reasonable to add a new preference in "/etc/libvirt/qemu.conf". Now libvirt use "ide" as the bus type for disk device if it fails on the series detections.
No, this doesn't belong in libvirt, because there is no default that you can choose which is best for all OS. Any change in global defaults is just moving the problem around, not fixing it. The long term solution for this with apps using libvirt is the libosinfo library which is intended to provide a set of metadata files describing the defaults for every known operating system, as well as letting the host admin customize those per OS defaults. Apps that provision VMs would use libosinfo when building up their XML description Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Wed, Nov 17, 2010 at 02:38:49PM +0800, Osier Yang wrote:
于 2010年11月16日 21:30, Chris Phillips 写道:
Hi,
Simple question that I can't track down any notable discussion about, let alone an answer...
Is it possible to define what the "default" nic and storage types are? I am deploying images out of cobbler using koan and all of them are running virtio wherever applicable, but this is not the default, and at present there is no way within koan or cobbler to define what type of devices they should be. I've hard coded this device type declaration into koan, but don't like that in the slightest, and would typically expect to be able to just set "default=virtio" in a libvirt config file somewhere.
I fear I'm actually not missing anything and it's just hard coded for the most compatible device with no recourse to override it.
It seems reasonable to add a new preference in "/etc/libvirt/qemu.conf". Now libvirt use "ide" as the bus type for disk device if it fails on the series detections.
No, this isn't the right place to address this. The reason we don't default to virtio is that actually very few operating systems support virtio. Any change in global defaults never fixes the problem, it just moves the problem around. The right answer to this is the libosinfo library which provides a comprehensive & customizable database of per-OS default hardware settings (and much more besides). Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (4)
-
Chris Phillips
-
Daniel P. Berrange
-
Justin Clift
-
Osier Yang