virsh: doc: Fix supported driver types for attach-disk command

Virsh man page lists driver types to be used with attach-device
command, but does not specify that those are usable only with the XEN
Hypervisor.

This patch adds statement, that those options specified are applicable
only on the Xen hypervisor and adds option usable with qemu emulator.

This patch also changes type of error returned by QEMU driver if the
user specifies incompatible driver type from VIR_ERR_INTERNAL_ERROR to
VIR_ERR_CONFIG_UNSUPPORTED.
This commit is contained in:
Peter Krempa 2011-09-19 14:57:07 +02:00 committed by Eric Blake
parent d6fb294346
commit 2ad83bf448
3 changed files with 4 additions and 3 deletions

View File

@ -3657,7 +3657,7 @@ qemuBuildCommandLine(virConnectPtr conn,
if (disk->driverName != NULL &&
!STREQ(disk->driverName, "qemu")) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported driver name '%s' for disk '%s'"),
disk->driverName, disk->src);
goto error;

View File

@ -5208,7 +5208,7 @@ qemuDomainAttachDeviceDiskLive(struct qemud_driver *driver,
int ret = -1;
if (disk->driverName != NULL && !STREQ(disk->driverName, "qemu")) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported driver name '%s' for disk '%s'"),
disk->driverName, disk->src);
goto end;

View File

@ -1184,7 +1184,8 @@ the single existing device; consider using B<update-device> for this usage.
Attach a new disk device to the domain.
I<source> and I<target> are paths for the files and devices.
I<driver> can be I<file>, I<tap> or I<phy> depending on the kind of access.
I<driver> can be I<file>, I<tap> or I<phy> for the Xen hypervisor depending on
the kind of access; or I<qemu> for the QEMU emulator.
I<type> can indicate I<cdrom> or I<floppy> as alternative to the disk default,
although this use only replaces the media within the existing virtual cdrom or
floppy device; consider using B<update-device> for this usage instead.