提交 2ad83bf4 编写于 作者: P Peter Krempa 提交者: Eric Blake

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.
上级 d6fb2943
......@@ -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;
......
......@@ -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;
......
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册