mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-29 09:05:25 +00:00
33c1fc430d
I tried to attach a SCSI LUN to two different guests, and forgot to specify "shareable" in the hostdev XML. Attaching the device to the second guest failed, but the message was not helpful in telling me what I was doing wrong: $ cat scsi_scratch_disk.xml <hostdev mode='subsystem' type='scsi'> <source> <adapter name='scsi_host3'/> <address bus='0' target='15' unit='1074151456'/> </source> </hostdev> $ virsh attach-device dasd_sles_d99c scsi_scratch_disk.xml Device attached successfully $ virsh attach-device dasd_fedora_0e1e scsi_scratch_disk.xml error: Failed to attach device from scsi_scratch_disk.xml error: internal error: Unable to prepare scsi hostdev: scsi_host3:0:15:1074151456 I eventually discovered my error, but thought it was weird that Libvirt doesn't provide something more helpful in this case. Looking over the code we had just gone through, I commented out the "internal error" message, and got something more useful: $ virsh attach-device dasd_fedora_0e1e scsi_scratch_disk.xml error: Failed to attach device from scsi_scratch_disk.xml error: Requested operation is not valid: SCSI device 3:0:15:1074151456 is already in use by other domain(s) as 'non-shareable' Looking over the error paths here, we seem to issue better messages deeper in the callchain so these "internal error" messages overwrite any of them. Remove them, so that the more detailed errors are seen. Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> |
||
---|---|---|
.. | ||
EVENTHANDLERS.txt | ||
libvirtd_qemu.aug | ||
MIGRATION.txt | ||
qemu_agent.c | ||
qemu_agent.h | ||
qemu_alias.c | ||
qemu_alias.h | ||
qemu_block.c | ||
qemu_block.h | ||
qemu_blockjob.c | ||
qemu_blockjob.h | ||
qemu_capabilities.c | ||
qemu_capabilities.h | ||
qemu_capspriv.h | ||
qemu_cgroup.c | ||
qemu_cgroup.h | ||
qemu_command.c | ||
qemu_command.h | ||
qemu_conf.c | ||
qemu_conf.h | ||
qemu_domain_address.c | ||
qemu_domain_address.h | ||
qemu_domain.c | ||
qemu_domain.h | ||
qemu_driver.c | ||
qemu_driver.h | ||
qemu_hostdev.c | ||
qemu_hostdev.h | ||
qemu_hotplug.c | ||
qemu_hotplug.h | ||
qemu_hotplugpriv.h | ||
qemu_interface.c | ||
qemu_interface.h | ||
qemu_migration_cookie.c | ||
qemu_migration_cookie.h | ||
qemu_migration.c | ||
qemu_migration.h | ||
qemu_monitor_json.c | ||
qemu_monitor_json.h | ||
qemu_monitor_text.c | ||
qemu_monitor_text.h | ||
qemu_monitor.c | ||
qemu_monitor.h | ||
qemu_parse_command.c | ||
qemu_parse_command.h | ||
qemu_process.c | ||
qemu_process.h | ||
qemu_processpriv.h | ||
qemu_security.c | ||
qemu_security.h | ||
qemu.conf | ||
test_libvirtd_qemu.aug.in | ||
THREADS.txt |