
On Mon, Nov 12, 2012 at 05:18:41PM +0800, Chen Hanxiao wrote:
From: ChenHanxiao <chenhanxiao@cn.fujitsu.com>
If we add a virtio-disk, we need to add a SCSI controller with model 'virtio-scsi'. This patch allows libvirt to analyze disks XML with tag 'model':
<disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/sdb'/> <target dev='sda' bus='scsi' model = 'virtio-scsi'/> </disk>
If we got a disks XML with bus='scsi' model = 'virtio-scsi', we'll add a SCSI controller with model 'virtio-scsi' automatically.
Signed-off-by: ChenHanxiao <chenhanxiao@cn.fujitsu.com>
NACK duplicating the bus information on the <disk> is just not very pleasant. Applications should really be adding <controllers> explicitly - the auto-add of controllers is just to provide back-compat for applications that were written to add IDE disks before the <controller> concept was introduced. New apps should not rely on this. 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 :|