| Summary: | virsh attach-disk failed after libvirt update | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Takashi Sato <tsato> |
| Component: | libvirt | Assignee: | Scott Radvan <sradvan> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.5 | CC: | dallan, dyuan, eblake, jyang, mzhan, rlandman, weizhan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-07-11 14:03:59 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Takashi Sato
2011-04-07 05:40:18 UTC
static int qemudDomainChangeEjectableMedia(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDiskDefPtr disk,
{ unsigned long long qemuCmdFlags)
:
origdisk = NULL;
for (i = 0 ; i < vm->def->ndisks ; i++) {
if (vm->def->disks[i]->bus == disk->bus &&
STREQ(vm->def->disks[i]->dst, disk->dst)) {
origdisk = vm->def->disks[i];
break;
}
}
if (!origdisk) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
_("No device with bus '%s' and target '%s'"),
virDomainDiskBusTypeToString(disk->bus),
disk->dst);
return -1;
}
if (!origdisk->info.alias) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
_("missing disk device alias name for %s"), origdisk-
>dst);
return -1;
}
}
==
That is, origdisk->info.alias was not available.
And this data structure is defined as follows:
==
struct _virDomainDiskDef {
int type;
int device;
int bus;
char *src;
char *dst;
char *driverName;
char *driverType;
char *serial;
int cachemode;
int error_policy;
unsigned int readonly : 1;
unsigned int shared : 1;
virDomainDeviceInfo info; <<<<<<<<<<<<<<<<<
virStorageEncryptionPtr encryption;
};
==
This is the version of libvirt-0.8.2.
And I found that the member "virDomainDeviceInfo info"
does not exist on the version of libvirt-0.6.3:
==
struct _virDomainDiskDef {
int type;
int device;
int bus;
char *src;
char *dst;
char *driverName;
char *driverType;
int cachemode;
unsigned int readonly : 1;
unsigned int shared : 1;
int slotnum; /* pci slot number for unattach */
};
==
So there might be a compatibility issue between
libvirtd and kvm after the update.
|