Re: [libvirt] PATCH: Add <disk> bus attribute for Xen driver

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> 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@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]