On 08/11/2011 09:27 AM, Peter Krempa wrote:
---
tools/virsh.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/virsh.pod | 11 +++++
2 files changed, 131 insertions(+), 0 deletions(-)
Again, I think the new virsh commands can be useful, but would need to
map on top of virDomainUpdateDevice rather than new API, meaning this
patch needs a v2.
+static const vshCmdOptDef opts_domif_setlink[] = {
+ {"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")},
Do we want to go with our usual --live/--config/--current? That is, I
can change the link state of the running VM, of the next boot of the VM,
or of whichever state the VM is in (whether running or inactive)?
Especially since other virsh commands around virDomainUpdateDevice
expose those three flags.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org