Re: [libvirt] PATCH: Add disk bus attribute for Xen driver
Daniel P. Berrange [EMAIL PROTECTED] wrote: To complement soren's patch adding a bus attribute to the QEMU driver, here is a minimal patch adding bus attribute to the Xen drivers. It merely adds it on when generating the XML. It isn't making any attempt to interpret it when creating a VM, since Xen does everything based off the disk node name anyway its (currently) redundant. The bus types supported are 'xen' for paravirt disks, or 'ide' and 'scsi' for HVM guests. ... Index: src/xend_internal.c ... +if (STRPREFIX(dst, xvd) || !hvm) { +bus = xen; +} else if (STRPREFIX(dst, sd)) { +bus = scsi; +} else { +bus = ide; +} ... Index: src/xm_internal.c === ... +if (STRPREFIX(dev, xvd) || !hvm) { +bus = xen; +} else if (STRPREFIX(dev, sd)) { +bus = scsi; +} else { +bus = ide; +} + ACK Looks good. (though maybe avoid that duplication) -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] PATCH: Add disk bus attribute for Xen driver
On Wed, May 07, 2008 at 01:17:46AM +0100, Daniel P. Berrange wrote: To complement soren's patch adding a bus attribute to the QEMU driver, here is a minimal patch adding bus attribute to the Xen drivers. It merely adds it on when generating the XML. It isn't making any attempt to interpret it when creating a VM, since Xen does everything based off the disk node name anyway its (currently) redundant. The bus types supported are 'xen' for paravirt disks, or 'ide' and 'scsi' for HVM guests. +1, this helps migrating from one hypervisor to another (or detecting if the migration would be harder), Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list