{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"interface", VSH_OT_DATA, VSH_OFLAG_REQ, N_("interface device (MAC Address)")},
{"state", VSH_OT_DATA, VSH_OFLAG_REQ, N_("new state of the device")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist interface state")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{NULL, 0, 0, NULL}
};
unsigned char macaddr[VIR_MAC_BUFLEN];
const char *element;
const char *attr;
- bool persistent;
+ bool config;
bool ret = false;
unsigned int flags = 0;
int i;
if (vshCommandOptString(cmd, "state", &state) <= 0)
goto cleanup;
- persistent = vshCommandOptBool(cmd, "persistent");
+ config = vshCommandOptBool(cmd, "config");
if (STRNEQ(state, "up") && STRNEQ(state, "down")) {
vshError(ctl, _("invalid link state '%s'"), state);
}
/* get persistent or live description of network device */
- desc = virDomainGetXMLDesc(dom, persistent?VIR_DOMAIN_XML_INACTIVE:0);
+ desc = virDomainGetXMLDesc(dom, config ? VIR_DOMAIN_XML_INACTIVE : 0);
if (desc == NULL) {
vshError(ctl, _("Failed to get domain description xml"));
goto cleanup;
}
- if (persistent)
+ if (config)
flags = VIR_DOMAIN_AFFECT_CONFIG;
else
flags = VIR_DOMAIN_AFFECT_LIVE;
static const vshCmdOptDef opts_domif_getlink[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"interface", VSH_OT_DATA, VSH_OFLAG_REQ, N_("interface device (MAC Address)")},
- {"persistent", VSH_OT_BOOL, 0, N_("Get persistent interface state")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("Get persistent interface state")},
{NULL, 0, 0, NULL}
};
return false;
}
- if (vshCommandOptBool(cmd, "persistent"))
+ if (vshCommandOptBool(cmd, "config"))
flags = VIR_DOMAIN_XML_INACTIVE;
desc = virDomainGetXMLDesc(dom, flags);
static const vshCmdOptDef opts_attach_device[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"file", VSH_OT_DATA, VSH_OFLAG_REQ, N_("XML file")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist device attachment")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{NULL, 0, 0, NULL}
};
return false;
}
- if (vshCommandOptBool(cmd, "persistent")) {
+ if (vshCommandOptBool(cmd, "config")) {
flags = VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1)
flags |= VIR_DOMAIN_AFFECT_LIVE;
static const vshCmdOptDef opts_detach_device[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"file", VSH_OT_DATA, VSH_OFLAG_REQ, N_("XML file")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist device detachment")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{NULL, 0, 0, NULL}
};
goto cleanup;
}
- if (vshCommandOptBool(cmd, "persistent")) {
+ if (vshCommandOptBool(cmd, "config")) {
flags = VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1)
flags |= VIR_DOMAIN_AFFECT_LIVE;
static const vshCmdOptDef opts_update_device[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"file", VSH_OT_DATA, VSH_OFLAG_REQ, N_("XML file")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist device update")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{"force", VSH_OT_BOOL, 0, N_("force device update")},
{NULL, 0, 0, NULL}
};
return false;
}
- if (vshCommandOptBool(cmd, "persistent")) {
+ if (vshCommandOptBool(cmd, "config")) {
flags = VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1)
flags |= VIR_DOMAIN_AFFECT_LIVE;
{"mac", VSH_OT_DATA, 0, N_("MAC address")},
{"script", VSH_OT_DATA, 0, N_("script used to bridge network interface")},
{"model", VSH_OT_DATA, 0, N_("model type")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist interface attachment")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{"inbound", VSH_OT_DATA, VSH_OFLAG_NONE, N_("control domain's incoming traffics")},
{"outbound", VSH_OT_DATA, VSH_OFLAG_NONE, N_("control domain's outgoing traffics")},
{NULL, 0, 0, NULL}
xml = virBufferContentAndReset(&buf);
- if (vshCommandOptBool(cmd, "persistent")) {
+ if (vshCommandOptBool(cmd, "config")) {
flags = VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1)
flags |= VIR_DOMAIN_AFFECT_LIVE;
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"type", VSH_OT_DATA, VSH_OFLAG_REQ, N_("network interface type")},
{"mac", VSH_OT_STRING, 0, N_("MAC address")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist interface detachment")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{NULL, 0, 0, NULL}
};
goto cleanup;
}
- if (vshCommandOptBool(cmd, "persistent")) {
+ if (vshCommandOptBool(cmd, "config")) {
flags = VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1)
flags |= VIR_DOMAIN_AFFECT_LIVE;
{"cache", VSH_OT_STRING, 0, N_("cache mode of disk device")},
{"type", VSH_OT_STRING, 0, N_("target device type")},
{"mode", VSH_OT_STRING, 0, N_("mode of device reading and writing")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist disk attachment")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{"sourcetype", VSH_OT_STRING, 0, N_("type of source (block|file)")},
{"serial", VSH_OT_STRING, 0, N_("serial of disk device")},
{"shareable", VSH_OT_BOOL, 0, N_("shareable between domains")},
xml = virBufferContentAndReset(&buf);
- if (vshCommandOptBool(cmd, "persistent")) {
+ if (vshCommandOptBool(cmd, "config")) {
flags = VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1)
flags |= VIR_DOMAIN_AFFECT_LIVE;
static const vshCmdOptDef opts_detach_disk[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"target", VSH_OT_DATA, VSH_OFLAG_REQ, N_("target of disk device")},
- {"persistent", VSH_OT_BOOL, 0, N_("persist disk detachment")},
+ {"persistent", VSH_OT_ALIAS, 0, "config"},
+ {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
{NULL, 0, 0, NULL}
};
VSH_PREPARE_DISK_XML_NONE)))
goto cleanup;
- if (vshCommandOptBool(cmd, "persistent")) {
+ if (vshCommandOptBool(cmd, "config")) {
flags = VIR_DOMAIN_AFFECT_CONFIG;
if (virDomainIsActive(dom) == 1)
flags |= VIR_DOMAIN_AFFECT_LIVE;
Get network interface stats for a running domain.
-=item B<domif-setlink> I<domain> I<interface-device> I<state> I<--persistent>
+=item B<domif-setlink> I<domain> I<interface-device> I<state> [I<--config>]
Modify link state of the domain's virtual interface. Possible values for
-state are "up" and "down. If --persistent is specified, only the persistent
-configuration of the domain is modified.
+state are "up" and "down. If I<--config> is specified, only the persistent
+configuration of the domain is modified, for compatibility purposes,
+I<--persistent> is alias of I<--config>.
I<interface-device> can be the interface's target name or the MAC address.
-=item B<domif-getlink> I<domain> I<interface-device> I<--persistent>
+=item B<domif-getlink> I<domain> I<interface-device> [I<--config>]
+
+Query link state of the domain's virtual interface. If I<--config>
+is specified, query the persistent configuration, for compatibility
+purposes, I<--persistent> is alias of I<--config>.
-Query link state of the domain's virtual interface. If --persistent
-is specified, query the persistent configuration.
I<interface-device> can be the interface's target name or the MAC address.
=item B<domiftune> I<domain> I<interface-device>
=over 4
-=item B<attach-device> I<domain-id> I<FILE>
+=item B<attach-device> I<domain-id> I<FILE> [I<--config>]
Attach a device to the domain, using a device definition in an XML file.
See the documentation to learn about libvirt XML format for a device.
+If I<--config> is specified, alter persistent configuration, effect observed
+on next boot, for compatibility purposes, I<--persistent> is alias of
+I<--config>.
For cdrom and floppy devices, this command only replaces the media within
the single existing device; consider using B<update-device> for this usage.
For passthrough host devices, see also B<nodedev-detach>, needed if
=item B<attach-disk> I<domain-id> I<source> I<target>
[I<--driver driver>] [I<--subdriver subdriver>] [I<--cache cache>]
-[I<--type type>] [I<--mode mode>] [I<--persistent>] [I<--sourcetype soucetype>]
+[I<--type type>] [I<--mode mode>] [I<--config>] [I<--sourcetype soucetype>]
[I<--serial serial>] [I<--shareable>] [I<--rawio>] [I<--address address>]
[I<--multifunction>]
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<mode> can specify the two specific mode I<readonly> or I<shareable>.
-I<persistent> indicates the changes will affect the next boot of the domain.
+I<--config> indicates the changes will affect the next boot of the domain,
+for compatibility purposes, I<--persistent> is alias of I<--config>.
I<sourcetype> can indicate the type of source (block|file)
I<cache> can be one of "default", "none", "writethrough", "writeback",
"directsync" or "unsafe".
=item B<attach-interface> I<domain-id> I<type> I<source>
[I<--target target>] [I<--mac mac>] [I<--script script>] [I<--model model>]
-[I<--persistent>] [I<--inbound average,peak,burst>] [I<--outbound average,peak,burst>]
+[I<--config>] [I<--inbound average,peak,burst>] [I<--outbound average,peak,burst>]
Attach a new network interface to the domain.
I<type> can be either I<network> to indicate a physical network device or
I<script> allows to specify a path to a script handling a bridge instead of
the default one.
I<model> allows to specify the model type.
-I<persistent> indicates the changes will affect the next boot of the domain.
+I<--config> indicates the changes will affect the next boot of the domain,
+for compatibility purposes, I<--persistent> is alias of I<--config>.
I<inbound> and I<outbound> control the bandwidth of the interface. I<peak>
and I<burst> are optional, so "average,peak", "average,,burst" and
"average" are also legal.
as the back-end on the node. If not provided a device named "vnetN" or "vifN"
will be created automatically.
-=item B<detach-device> I<domain-id> I<FILE>
+=item B<detach-device> I<domain-id> I<FILE> [I<--config>]
Detach a device from the domain, takes the same kind of XML descriptions
as command B<attach-device>.
+If I<--config> is specified, alter persistent configuration, effect observed
+on next boot, for compatibility purposes, I<--persistent> is alias of
+I<--config>.
For passthrough host devices, see also B<nodedev-reattach>, needed if
the device does not use managed mode.
-=item B<detach-disk> I<domain-id> I<target>
+=item B<detach-disk> I<domain-id> I<target> [I<--config>]
Detach a disk device from a domain. The I<target> is the device as seen
from the domain.
+If I<--config> is specified, alter persistent configuration, effect observed
+on next boot, for compatibility purposes, I<--persistent> is alias of
+I<--config>.
-=item B<detach-interface> I<domain-id> I<type> [I<--mac mac>]
+=item B<detach-interface> I<domain-id> I<type> [I<--mac mac>] [I<--config>]
Detach a network interface from a domain.
I<type> can be either I<network> to indicate a physical network device or
I<bridge> to indicate a bridge to a device. It is recommended to use the
I<mac> option to distinguish between the interfaces if more than one are
present on the domain.
+If I<--config> is specified, alter persistent configuration, effect observed
+on next boot, for compatibility purposes, I<--persistent> is alias of
+I<--config>.
-=item B<update-device> I<domain-id> I<file> [I<--persistent>] [I<--force>]
+=item B<update-device> I<domain-id> I<file> [I<--config>] [I<--force>]
Update the characteristics of a device associated with I<domain-id>, based on
-the device definition in an XML I<file>. If the I<--persistent> option is
-used, the changes will affect the next boot of the domain. The I<--force>
-option can be used to force device update, e.g., to eject a CD-ROM even if it
-is locked/mounted in the domain. See the documentation to learn about libvirt
-XML format for a device.
+the device definition in an XML I<file>.
+If the I<--config> option is used, the changes will affect the next boot of
+the domain, for compatibility purposes, I<--persistent> is alias of
+I<--config>.
+The I<--force> option can be used to force device update, e.g., to eject a
+CD-ROM even if it is locked/mounted in the domain. See the documentation to
+learn about libvirt XML format for a device.
=item B<change-media> I<domain-id> I<path> [I<--eject>] [I<--insert>]
[I<--update>] [I<source>] [I<--force>] [[I<--live>] [I<--config>] | [I<--current>]]