as a device ordering hint. The optional <code>bus</code>
attribute specifies the type of disk device to emulate;
possible values are driver specific, with typical values being
- "ide", "scsi", "virtio", "xen", "usb" or "sata". If omitted, the bus
+ "ide", "scsi", "virtio", "xen", "usb", "sata", or
+ "sd" <span class="since">"sd" since 1.1.2</span>. If omitted, the bus
type is inferred from the style of the device name (e.g. a device named
'sda' will typically be exported using a SCSI bus). The optional
attribute <code>tray</code> indicates the tray status of the
"xen",
"usb",
"uml",
- "sata")
+ "sata",
+ "sd")
VIR_ENUM_DECL(qemuDiskCacheV1)
case VIR_DOMAIN_DISK_BUS_XEN:
ret = virAsprintf(&dev_name, "xenblk%d", devid);
break;
+ case VIR_DOMAIN_DISK_BUS_SD:
+ ret = virAsprintf(&dev_name, "sd%d", devid);
+ break;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported disk name mapping for bus '%s'"),
break;
case VIR_DOMAIN_DISK_BUS_XEN:
- /* Xen has no address type currently, so assign based on index */
+ case VIR_DOMAIN_DISK_BUS_SD:
+ /* Xen and SD have no address type currently, so assign
+ * based on index */
break;
}
virCommandAddArg(cmd, "-drive");
/* Unfortunately it is not possible to use
- -device for floppies, or Xen paravirt
+ -device for floppies, xen PV, or SD
devices. Fortunately, those don't need
static PCI addresses, so we don't really
care that we can't use -device */
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
- if (disk->bus != VIR_DOMAIN_DISK_BUS_XEN) {
+ if (disk->bus != VIR_DOMAIN_DISK_BUS_XEN &&
+ disk->bus != VIR_DOMAIN_DISK_BUS_SD) {
withDeviceArg = true;
} else {
virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE);
def->bus = VIR_DOMAIN_DISK_BUS_VIRTIO;
else if (STREQ(values[i], "xen"))
def->bus = VIR_DOMAIN_DISK_BUS_XEN;
+ else if (STREQ(values[i], "sd"))
+ def->bus = VIR_DOMAIN_DISK_BUS_SD;
} else if (STREQ(keywords[i], "media")) {
if (STREQ(values[i], "cdrom")) {
def->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
if (def->bus == VIR_DOMAIN_DISK_BUS_IDE) {
ignore_value(VIR_STRDUP(def->dst, "hda"));
- } else if (def->bus == VIR_DOMAIN_DISK_BUS_SCSI) {
+ } else if (def->bus == VIR_DOMAIN_DISK_BUS_SCSI ||
+ def->bus == VIR_DOMAIN_DISK_BUS_SD) {
ignore_value(VIR_STRDUP(def->dst, "sda"));
} else if (def->bus == VIR_DOMAIN_DISK_BUS_VIRTIO) {
ignore_value(VIR_STRDUP(def->dst, "vda"));