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

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



"Daniel P. Berrange" <berrange redhat com> 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)


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