.type = VSH_OT_STRING,
.help = N_("wwn of disk device")
},
+ {.name = "alias",
+ .type = VSH_OT_STRING,
+ .help = N_("custom alias name of disk device")
+ },
{.name = "rawio",
.type = VSH_OT_BOOL,
.help = N_("needs rawio capability")
*subdriver = NULL, *type = NULL, *mode = NULL,
*iothread = NULL, *cache = NULL, *io = NULL,
*serial = NULL, *straddr = NULL, *wwn = NULL,
- *targetbus = NULL;
+ *targetbus = NULL, *alias = NULL;
struct DiskAddress diskAddr;
bool isFile = false, functionReturn = false;
int ret;
vshCommandOptStringReq(ctl, cmd, "wwn", &wwn) < 0 ||
vshCommandOptStringReq(ctl, cmd, "address", &straddr) < 0 ||
vshCommandOptStringReq(ctl, cmd, "targetbus", &targetbus) < 0 ||
+ vshCommandOptStringReq(ctl, cmd, "alias", &alias) < 0 ||
vshCommandOptStringReq(ctl, cmd, "sourcetype", &stype) < 0)
goto cleanup;
if (serial)
virBufferAsprintf(&buf, "<serial>%s</serial>\n", serial);
+ if (alias)
+ virBufferAsprintf(&buf, "<alias name='%s'/>", alias);
+
if (wwn)
virBufferAsprintf(&buf, "<wwn>%s</wwn>\n", wwn);
=item B<attach-disk> I<domain> I<source> I<target> [[[I<--live>] [I<--config>]
| [I<--current>]] | [I<--persistent>]] [I<--targetbus bus>] [I<--driver
driver>] [I<--subdriver subdriver>] [I<--iothread iothread>]
-[I<--cache cache>] [I<--io io>] [I<--type type>]
+[I<--cache cache>] [I<--io io>] [I<--type type>] [I<--alias alias>]
[I<--mode mode>] [I<--sourcetype sourcetype>] [I<--serial serial>] [I<--wwn
wwn>] [I<--rawio>] [I<--address address>] [I<--multifunction>] [I<--print-xml>]
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.
+I<alias> can set user supplied alias.
I<mode> can specify the two specific mode I<readonly> or I<shareable>.
I<sourcetype> can indicate the type of source (block|file)
I<cache> can be one of "default", "none", "writethrough", "writeback",