[libvirt] [libvirt-virshcmdref 01/14] update documentation for command attach-device

--- source/attach-device.xml | 143 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 137 insertions(+), 6 deletions(-) diff --git a/source/attach-device.xml b/source/attach-device.xml index efa46f0..18e3262 100644 --- a/source/attach-device.xml +++ b/source/attach-device.xml @@ -5,20 +5,151 @@ <description> <text> - Attach device from an XML file + Attach a device from an XML file </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="required"> + <keyword requirement="optional">--file</keyword> + <value type="string" requirement="required">file</value> + <description> + <text> + the XML file describing the device to be attached + </text> + <text> + "--file" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="required">--persistent</keyword> + <description> + <text> + with this option, the XML file of domain will be updated + </text> + </description> + </parameter> + </options> <availability from="0.2.3" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal> +virsh # <bold>attach-device</bold> <value>example-domain</value> <value>/tmp/new-nic.xml</value></terminal> + <text> + Attaches a NIC which is defined by <value>/tmp/new-nic.xml</value> to domain <value>example-domain</value>. + </text> + </example> + </examples> - <examples type="fullcontext" /> - - <reference type="seealso" /> + <examples type="fullcontext"> + <example> + <text> + In this example we will attach a NIC to a running domain which doesn't have a NIC. + The domain is defined as: + </text> + <terminal> +<domain type='kvm'> + <name>example-domain</name> + <uuid>6853c36f-af03-4968-a31d-1f3a9c3f699a</uuid> + <memory>1048576</memory> + <currentMemory>1048576</currentMemory> + <vcpu>1</vcpu> + <os> + <type arch='x86_64' machine='pc-0.12'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/local/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' cache='writeback'/> + <source file='/mnt/data/libvirt-images/vm2.img'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </disk> + <input type='mouse' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes'/> + <video> + <model type='cirrus' vram='9216' heads='1'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </memballoon> + </devices> +</domain></terminal> + <text> + Bring up the domain. From the output of <value>lspci</value> we can see that there is no NIC + present. + </text> + <terminal>00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) +00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] +00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] +00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01) +00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03) +00:02.0 VGA compatible controller: Cirrus Logic GD 5446 +00:03.0 RAM memory: Red Hat, Inc Virtio memory balloon +00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device</terminal> + <text> + Now we attach a NIC to the domain: + </text> + <terminal>virsh # <bold>attach-device</bold> <value>example-domain</value> <value>/tmp/new-nic.xml</value></terminal> + <text> + the content of <value>/tmp/new-nic.xml</value> is: + </text> + <terminal> +<interface type='network'> + <source network='default'/> +</interface></terminal> + <text> + We can see that the attached NIC is listed by <value>lspci</value>: + </text> + <terminal>00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) +00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] +00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] +00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01) +00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03) +00:02.0 VGA compatible controller: Cirrus Logic GD 5446 +00:03.0 RAM memory: Red Hat, Inc Virtio memory balloon +00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device +00:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)</terminal> + </example> + </examples> + <reference type="seealso"> + <item> + <link type="internal" href="detach-device" /> + <name> + detach-device + </name> + <description> + Detach a device from an XML file + </description> + </item> + </reference> </command> -- 1.7.3.1

--- source/detach-device.xml | 124 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 120 insertions(+), 4 deletions(-) diff --git a/source/detach-device.xml b/source/detach-device.xml index 0475e19..85ab17b 100644 --- a/source/detach-device.xml +++ b/source/detach-device.xml @@ -9,16 +9,132 @@ </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="required"> + <keyword requirement="optional">--file</keyword> + <value type="string" requirement="required">file</value> + <description> + <text> + the XML file describing the device to be detached + </text> + <text> + "--file" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="required">--persistent</keyword> + <description> + <text> + with this option, the XML file of domain will be updated + </text> + </description> + </parameter> + </options> <availability from="0.2.3" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal> +virsh # <bold>detach-device</bold> <value>example-domain</value> <value>/tmp/nic.xml</value></terminal> + <text> + Detaches a NIC which is defined by <value>/tmp/nic.xml</value> from domain <value>example-domain</value>. + </text> + </example> + </examples> - <examples type="fullcontext" /> + <examples type="fullcontext"> + <example> + <text> + In this example we will detach a NIC from a domain which is defined as: + </text> + <terminal> +<domain type='kvm'> + <name>example-domain</name> + <uuid>6853c36f-af03-4968-a31d-1f3a9c3f699a</uuid> + <memory>1048576</memory> + <currentMemory>1048576</currentMemory> + <vcpu>1</vcpu> + <os> + <type arch='x86_64' machine='pc-0.12'>hvm</type> + <boot dev='hd'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/local/bin/qemu-system-x86_64</emulator> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' cache='writeback'/> + <source file='/mnt/data/libvirt-images/vm2.img'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </disk> + <interface type='network'> + <mac address='52:54:00:93:20:3c'/> + <source network='default'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </interface> + <input type='mouse' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes'/> + <video> + <model type='cirrus' vram='9216' heads='1'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </memballoon> + </devices> +</domain></terminal> + <text> + To detach the NIC, we run the command: + </text> + <terminal>virsh # <bold>detach-device</bold> <value>example-domain</value> <value>/tmp/nic.xml</value></terminal> + <text> + the content of file <value>/tmp/nic.xml</value> is: + </text> + <terminal><interface type='network'> + <mac address='52:54:00:93:20:3c'/> + <source network='default'/> +</interface></terminal> + <text> + Notice the mac address is included in the xml file. We must provide + enough information to identify the device to be detached. + </text> + </example> + </examples> - <reference type="seealso" /> + <reference type="seealso"> + <item> + <link type="internal" href="attach-device" /> + <name> + attach-device + </name> + <description> + Attach a device from an XML file + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:14 AM, Hu Tao wrote:
--- source/detach-device.xml | 124 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 120 insertions(+), 4 deletions(-)
diff --git a/source/detach-device.xml b/source/detach-device.xml index 0475e19..85ab17b 100644 --- a/source/detach-device.xml
+<description> +<text> + the XML file describing the device to be detached
Same story as attach-device for a follow-up tweak; and perhaps also mention that the xml does not completely have to match the domain's xml, as long as it is an unambiguous subset (hmm, for that to be true, I guess I'd better ack Michal's pending patch). ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Thu, Aug 25, 2011 at 12:21:08PM -0600, Eric Blake wrote:
On 08/25/2011 02:14 AM, Hu Tao wrote:
--- source/detach-device.xml | 124 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 120 insertions(+), 4 deletions(-)
diff --git a/source/detach-device.xml b/source/detach-device.xml index 0475e19..85ab17b 100644 --- a/source/detach-device.xml
+<description> +<text> + the XML file describing the device to be detached
Same story as attach-device for a follow-up tweak; and perhaps also mention that the xml does not completely have to match the domain's xml, as long as it is an unambiguous subset (hmm, for that to be true, I guess I'd better ack Michal's pending patch).
OK, I'll send patches to update the doc.
ACK and pushed.
-- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
-- Thanks, Hu Tao

--- source/autostart.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 48 insertions(+), 3 deletions(-) diff --git a/source/autostart.xml b/source/autostart.xml index 60c0edc..e9ad738 100644 --- a/source/autostart.xml +++ b/source/autostart.xml @@ -10,16 +10,61 @@ </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--disable</keyword> + <description> + <text> + with this option, disable autostarting; without this option, + enable autostarting + </text> + </description> + </parameter> + </options> <availability from="0.2.1" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>autostart</bold> <value>example-domain</value></terminal> + <text> + Enable autostarting of domain <value>example-domain</value>. + </text> + </example> + <example> + <terminal>virsh # <bold>autostart</bold> <value>example-domain</value> <italic>--disable</italic></terminal> + <text> + Disable autostarting of domain <value>example-domain</value>. + </text> + </example> + </examples> <examples type="fullcontext" /> - <reference type="seealso" /> + <reference type="seealso"> + <item> + <link type="internal" href="dominfo" /> + <name> + dominfo + </name> + <description> + This command can show autostarting status of a domain. + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:14 AM, Hu Tao wrote:
--- source/autostart.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/source/autostart.xml b/source/autostart.xml index 60c0edc..e9ad738 100644 --- a/source/autostart.xml +++ b/source/autostart.xml
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- common.sh | 2 +- source/blkiotune.xml | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletions(-) create mode 100644 source/blkiotune.xml diff --git a/common.sh b/common.sh index f48ea40..13e8995 100755 --- a/common.sh +++ b/common.sh @@ -6,7 +6,7 @@ DOMAIN_COMMANDS="attach-device attach-disk attach-interface autostart hostname managedsave managedsave-remove maxvcpus memtune migrate migrate-setmaxdowntime reboot restore resume save schedinfo setmaxmem setmem setvcpus shutdown start suspend ttyconsole undefine update-device - vcpucount vcpuinfo vcpupin version vncdisplay" + vcpucount vcpuinfo vcpupin version vncdisplay blkiotune" MONITOR_COMMANDS="domblkinfo domblkstat domifstat dominfo dommemstat domstate list" diff --git a/source/blkiotune.xml b/source/blkiotune.xml new file mode 100644 index 0000000..6354b99 --- /dev/null +++ b/source/blkiotune.xml @@ -0,0 +1,85 @@ +<?xml version='1.0' encoding='utf-8' ?> + +<command> + <name>blkiotune</name> + + <description> + <text> + Get or set blkio parameters + </text> + </description> + + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--weight</keyword> + <value type="number" requirement="required">weight</value> + <description> + <text> + IO weight in range [100, 1000] + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="required">--config</keyword> + <description> + <text> + affect next boot + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="required">--live</keyword> + <description> + <text> + affect running domain + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="required">--current</keyword> + <description> + <text> + affect current domain + </text> + </description> + </parameter> + </options> + + <availability from="0.8.9" /> + + <notes /> + + <examples type="usage"> + <example> + <terminal> +virsh # <bold>blkiotune</bold> <value>example-domain</value></terminal> + <text> + Shows the values of blkio parameters of domain <value>example-domain</value>. + </text> + </example> + <example> + <terminal> +virsh # <bold>blkiotune</bold> <value>example-domain</value> <italic>--weight</italic> <value>500</value></terminal> + <text> + Sets IO weight of domain <value>example-domain</value> to <value>500</value>. + </text> + </example> + </examples> + + <examples type="fullcontext" /> + + <reference type="seealso" /> + +</command> -- 1.7.3.1

On 08/25/2011 02:14 AM, Hu Tao wrote:
--- common.sh | 2 +- source/blkiotune.xml | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletions(-) create mode 100644 source/blkiotune.xml
diff --git a/common.sh b/common.sh index f48ea40..13e8995 100755 --- a/common.sh +++ b/common.sh @@ -6,7 +6,7 @@ DOMAIN_COMMANDS="attach-device attach-disk attach-interface autostart hostname managedsave managedsave-remove maxvcpus memtune migrate migrate-setmaxdowntime reboot restore resume save schedinfo setmaxmem setmem setvcpus shutdown start suspend ttyconsole undefine update-device - vcpucount vcpuinfo vcpupin version vncdisplay" + vcpucount vcpuinfo vcpupin version vncdisplay blkiotune"
I sorted this list. ACK with that fixed, and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- source/attach-interface.xml | 180 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 176 insertions(+), 4 deletions(-) diff --git a/source/attach-interface.xml b/source/attach-interface.xml index 199bf98..cc5d9ad 100644 --- a/source/attach-interface.xml +++ b/source/attach-interface.xml @@ -9,16 +9,188 @@ </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="required"> + <keyword requirement="optional">--type</keyword> + <value type="string" requirement="required">type</value> + <description> + <text> + network interface type + </text> + <text> + "--type" itself is optional + </text> + </description> + </parameter> + <parameter requirement="required"> + <keyword requirement="optional">--source</keyword> + <value type="string" requirement="required">source</value> + <description> + <text> + source of network interface + </text> + <text> + "--source" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--target</keyword> + <value type="string" requirement="required">target</value> + <description> + <text> + target network name + </text> + <text> + "--target" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--target</keyword> + <value type="string" requirement="required">target</value> + <description> + <text> + target network name + </text> + <text> + "--target" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--mac</keyword> + <value type="string" requirement="required">mac</value> + <description> + <text> + MAC address + </text> + <text> + "--mac" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--script</keyword> + <value type="string" requirement="required">script</value> + <description> + <text> + script used to bridge network interface + </text> + <text> + "--script" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--model</keyword> + <value type="string" requirement="required">model</value> + <description> + <text> + model type + </text> + <text> + "--model" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--persistent</keyword> + <description> + <text> + persist interface attachment + </text> + </description> + </parameter> + </options> + <availability from="0.3.0" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>attach-interface</bold> <value>example-domain</value> <italic>--type</italic> <value>network</value> <italic>--source</italic> <value>default</value> <italic>--persistent</italic></terminal> + <text> + attaches a NIC which is connected to virtual network <value>default</value>. + </text> + </example> + </examples> - <examples type="fullcontext" /> + <examples type="fullcontext"> + <example> + <text> + In this example we will bridge a domain to a local LAN by attaching + a NIC to the domain. Before attaching NIC, we have to setup a bridge + and add the host NIC that is connected to the local LAN to the bridge. + </text> + <text> + the host NIC connected to the local LAN is: + </text> + <terminal># ifconfig vmnet8 +vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08 + inet addr:172.16.244.1 Bcast:172.16.244.255 Mask:255.255.255.0 + inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:0 errors:0 dropped:0 overruns:0 frame:0 + TX packets:30 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:1000 + RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)</terminal> + <text> + setup a bridge and add the host NIC to it: + </text> + <terminal># brctl addbr myvnet0 +# brctl show +bridge name bridge id STP enabled interfaces +myvnet0 8000.000000000000 no +# ifconfig vmnet8 0.0.0.0 +# brctl addif myvnet0 vmnet8 +# brctl show +bridge name bridge id STP enabled interfaces +myvnet0 8000.005056c00008 no vmnet8</terminal> + <text> + attach a NIC to the domain: + </text> + <terminal>virsh attach-interface example-domain --type bridge --source myvnet0</terminal> + <text> + Bring up bridge <value>myvnet0</value>, now domain <value>example-domain</value> + is bridged to the local LAN that <value>vmnet8</value> is connected to. + </text> + </example> + </examples> - <reference type="seealso" /> + <reference type="seealso"> + <item> + <link type="internal" href="detach-interface" /> + <name> + detach-interface + </name> + <description> + Detach a network interface + </description> + </item> + <item> + <link type="external" href="http://libvirt.org/formatdomain.html#elementsNICS" /> + <name> + domain XML format of network interfaces + </name> + <description> + describes the XML format of network interfaces + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:14 AM, Hu Tao wrote:
--- source/attach-interface.xml | 180 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 176 insertions(+), 4 deletions(-)
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 08/25/2011 04:14 AM, Hu Tao wrote:
--- source/attach-interface.xml | 180 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 176 insertions(+), 4 deletions(-)
diff --git a/source/attach-interface.xml b/source/attach-interface.xml
+<parameter requirement="optional"> +<keyword requirement="optional">--script</keyword> +<value type="string" requirement="required">script</value> +<description> +<text> + script used to bridge network interface
Actually, for qemu domains the script parameter is only acceptable when the interface type is "ethernet" (a "generic ethernet" interface), and for Xen domains only when the interface type is "bridge". In all other cases it is currently ignored (but should log an error).
+</text> +<text> + "--script" itself is optional +</text> +</description> +</parameter>

On Thu, Aug 25, 2011 at 04:18:38PM -0400, Laine Stump wrote:
On 08/25/2011 04:14 AM, Hu Tao wrote:
--- source/attach-interface.xml | 180 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 176 insertions(+), 4 deletions(-)
diff --git a/source/attach-interface.xml b/source/attach-interface.xml
+<parameter requirement="optional"> +<keyword requirement="optional">--script</keyword> +<value type="string" requirement="required">script</value> +<description> +<text> + script used to bridge network interface
Actually, for qemu domains the script parameter is only acceptable when the interface type is "ethernet" (a "generic ethernet" interface), and for Xen domains only when the interface type is "bridge". In all other cases it is currently ignored (but should log an error).
Thanks, I'll send patch later to update the doc. -- Thanks, Hu Tao

--- source/detach-interface.xml | 65 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 62 insertions(+), 3 deletions(-) diff --git a/source/detach-interface.xml b/source/detach-interface.xml index 7786fcb..f995c49 100644 --- a/source/detach-interface.xml +++ b/source/detach-interface.xml @@ -9,16 +9,75 @@ </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="required"> + <keyword requirement="optional">--type</keyword> + <value type="string" requirement="required">type</value> + <description> + <text> + type can be <value>network</value> and <value>bridge</value> + </text> + <text> + "--type" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--mac</keyword> + <value type="string" requirement="required">mac</value> + <description> + <text> + MAC address of the network interface to be detached + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--persistent</keyword> + <description> + <text> + persist interface detachment + </text> + </description> + </parameter> + </options> <availability from="0.3.0" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>detach-interface</bold> <value>example-domain</value> <italic>--mac</italic> <value>'52:54:00:06:76:dd'</value> <italic>--type</italic> <value>bridge</value></terminal> + <text> + detach NIC which has mac <value>52:54:00:06:76:dd</value> and type <value>bridge</value>. + </text> + </example> + </examples> <examples type="fullcontext" /> - <reference type="seealso" /> + <reference type="seealso"> + <item> + <link type="internal" href="attach-interface" /> + <name> + attach-interface + </name> + <description> + Attach a network interface + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:14 AM, Hu Tao wrote:
--- source/detach-interface.xml | 65 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 62 insertions(+), 3 deletions(-)
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- source/vcpupin.xml | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 108 insertions(+), 4 deletions(-) diff --git a/source/vcpupin.xml b/source/vcpupin.xml index 77ef7d3..48a06b5 100644 --- a/source/vcpupin.xml +++ b/source/vcpupin.xml @@ -5,20 +5,124 @@ <description> <text> - Pin guest domain virtual CPUs to physical host CPUs + Pin guest domain virtual CPUs to physical host CPUs or show pinning information </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--vcpu</keyword> + <value type="string" requirement="required">vcpu-number</value> + <description> + <text> + vcpu number + </text> + <text> + "--vcpu" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--vcpu</keyword> + <value type="string" requirement="required">vcpu-number</value> + <description> + <text> + vcpu number + </text> + <text> + "--vcpu" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--cpulist</keyword> + <value type="string" requirement="required">cpulist</value> + <description> + <text> + list of physical cpus to which vcpu is pinned. + </text> + <text> + "--cpulist" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--config</keyword> + <description> + <text> + affect next boot + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--live</keyword> + <description> + <text> + affect running domain + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--current</keyword> + <description> + <text> + affect current domain + </text> + </description> + </parameter> + </options> + <availability from="0.1.4" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>vcpupin</bold> <value>example-domain</value></terminal> + <text> + shows vpu pinning information of domain <value>example-domain</value>. + </text> + </example> + <example> + <terminal>virsh # <bold>vcpupin</bold> <value>example-domain</value> <value>0</value> <value>0,2</value></terminal> + <text> + pins virtual cpu 0 of domain <value>example-domain</value> to physical cpus 0 and 2. + </text> + </example> + <example> + <terminal>virsh # <bold>vcpupin</bold> <value>example-domain</value> <value>1</value> <value>0-2,5</value></terminal> + <text> + pins virtual cpu 1 of domain <value>example-domain</value> to physical cpus 0, 1, 2 and 5. + </text> + </example> + + </examples> <examples type="fullcontext" /> - <reference type="seealso" /> + <reference type="seealso"> + <item> + <link type="internal" href="vcpuinfo" /> + <name> + vcpuinfo + </name> + <description> + shows domain virtual cpu information. + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- source/vcpupin.xml | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 108 insertions(+), 4 deletions(-)
diff --git a/source/vcpupin.xml b/source/vcpupin.xml index 77ef7d3..48a06b5 100644 --- a/source/vcpupin.xml +++ b/source/vcpupin.xml @@ -5,20 +5,124 @@
<description> <text> - Pin guest domain virtual CPUs to physical host CPUs + Pin guest domain virtual CPUs to physical host CPUs or show pinning information
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- source/vcpuinfo.xml | 39 +++++++++++++++++++++++++++++++++++---- 1 files changed, 35 insertions(+), 4 deletions(-) diff --git a/source/vcpuinfo.xml b/source/vcpuinfo.xml index e8748f0..09b2024 100644 --- a/source/vcpuinfo.xml +++ b/source/vcpuinfo.xml @@ -5,20 +5,51 @@ <description> <text> - Returns basic information about a guest domains virtual CPUs + Returns basic information about a guest domain's virtual CPUs </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + </options> <availability from="0.1.4" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>vcpuinfo</bold> <value>example-domain</value></terminal> + <text> + shows basic virtual CPUs information of domain <value>example-domain</value>. + </text> + </example> + </examples> <examples type="fullcontext" /> - <reference type="seealso" /> + <reference type="seealso"> + <item> + <link type="internal" href="vcpupin" /> + <name> + vcpupin + </name> + <description> + Pin guest domain virtual CPUs to physical host CPUs or show + pinning information. + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- source/vcpuinfo.xml | 39 +++++++++++++++++++++++++++++++++++---- 1 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/source/vcpuinfo.xml b/source/vcpuinfo.xml index e8748f0..09b2024 100644 --- a/source/vcpuinfo.xml +++ b/source/vcpuinfo.xml @@ -5,20 +5,51 @@
<description> <text> - Returns basic information about a guest domains virtual CPUs + Returns basic information about a guest domain's virtual CPUs
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- source/setmem.xml | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 46 insertions(+), 3 deletions(-) diff --git a/source/setmem.xml b/source/setmem.xml index bfdbfec..d7c7154 100644 --- a/source/setmem.xml +++ b/source/setmem.xml @@ -9,16 +9,59 @@ </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="required"> + <keyword requirement="optional">--kilobytes</keyword> + <value type="number" requirement="required">size</value> + <description> + <text> + size of memory allocated in the guest domain. + </text> + <text> + "--kilobytes" itself is optional + </text> + </description> + </parameter> + </options> <availability from="0.1.4" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>setmem</bold> <value>example-domain</value> <value>1048576</value></terminal> + <text> + sets the current memory allocation to 1G in domain <value>example-domain</value>. + </text> + + </example> + </examples> <examples type="fullcontext" /> - <reference type="seealso" /> + <reference type="seealso"> + <item> + <link type="internal" href="setmaxmem" /> + <name> + setmaxmem + </name> + <description> + Change the maximum memory allocation limit in the guest domain + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- source/setmem.xml | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/source/setmem.xml b/source/setmem.xml index bfdbfec..d7c7154 100644 --- a/source/setmem.xml +++ b/source/setmem.xml
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- source/setmaxmem.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 46 insertions(+), 4 deletions(-) diff --git a/source/setmaxmem.xml b/source/setmaxmem.xml index 2c17559..e35c025 100644 --- a/source/setmaxmem.xml +++ b/source/setmaxmem.xml @@ -9,16 +9,58 @@ </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="required"> + <keyword requirement="optional">--kilobytes</keyword> + <value type="number" requirement="required">size</value> + <description> + <text> + size of maximum memory can be allocated in the guest domain. + </text> + <text> + "--kilobytes" itself is optional + </text> + </description> + </parameter> + </options> <availability from="0.1.4" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>setmaxmem</bold> <value>example-domain</value> <value>1048576</value></terminal> + <text> + change the maximum memory allocation limit to 1G for domain <value>example-domain</value>. + </text> - <examples type="fullcontext" /> + </example> + </examples> - <reference type="seealso" /> + <examples type="fullcontext" /> + <reference type="seealso"> + <item> + <link type="internal" href="setmem" /> + <name> + setmem + </name> + <description> + Change the current memory allocation in the guest domain. + </description> + </item> + </reference> </command> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- source/setmaxmem.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/source/setmaxmem.xml b/source/setmaxmem.xml index 2c17559..e35c025 100644 --- a/source/setmaxmem.xml +++ b/source/setmaxmem.xml
ACK with nit and pushed.
+<text> + size of maximum memory can be allocated in the guest domain.
s/memory can/memory that can/ -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- source/schedinfo.xml | 76 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 74 insertions(+), 2 deletions(-) diff --git a/source/schedinfo.xml b/source/schedinfo.xml index 58855a8..f5e5b3e 100644 --- a/source/schedinfo.xml +++ b/source/schedinfo.xml @@ -9,13 +9,85 @@ </text> </description> - <options /> + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--set</keyword> + <value type="string" requirement="required">string</value> + <description> + <text> + parameter=value + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--weight</keyword> + <value type="number" requirement="required">weight</value> + <description> + <text> + weight for XEN_CREDIT + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--cap</keyword> + <value type="number" requirement="required">cap</value> + <description> + <text> + cap for XEN_CREDIT + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--current</keyword> + <description> + <text> + get/set current scheduler info + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--config</keyword> + <description> + <text> + get/set value to be used on next boot + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--live</keyword> + <description> + <text> + get/set value from running domain + </text> + </description> + </parameter> + </options> + <availability from="0.2.3" /> <notes /> - <examples type="usage" /> + <examples type="usage"> + <example> + <terminal>virsh # <bold>schedinfo</bold> <value>example-domain</value> <italic>--set</italic> <value>cpu_shares=800</value></terminal> + <text> + sets <value>cpu</value> cgroup parameter cpu.shares to <value>800</value>. + </text> + </example> + </examples> <examples type="fullcontext" /> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- source/schedinfo.xml | 76 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 74 insertions(+), 2 deletions(-)
diff --git a/source/schedinfo.xml b/source/schedinfo.xml index 58855a8..f5e5b3e 100644 --- a/source/schedinfo.xml +++ b/source/schedinfo.xml
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- source/memtune.xml | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/source/memtune.xml b/source/memtune.xml index 9dbce75..dd7038c 100644 --- a/source/memtune.xml +++ b/source/memtune.xml @@ -90,6 +90,33 @@ </description> </parameter> + <parameter requirement="optional"> + <keyword requirement="required">--config</keyword> + <description> + <text> + affect next boot + </text> + </description> + </parameter> + + <parameter requirement="optional"> + <keyword requirement="required">--live</keyword> + <description> + <text> + affect running domain + </text> + </description> + </parameter> + + <parameter requirement="optional"> + <keyword requirement="required">--current</keyword> + <description> + <text> + affect current domain + </text> + </description> + </parameter> + </options> <availability from="0.8.5" /> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- source/memtune.xml | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/source/memtune.xml b/source/memtune.xml index 9dbce75..dd7038c 100644 --- a/source/memtune.xml +++ b/source/memtune.xml
ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- common.sh | 2 +- source/send-key.xml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletions(-) create mode 100644 source/send-key.xml diff --git a/common.sh b/common.sh index 13e8995..51dc3e1 100755 --- a/common.sh +++ b/common.sh @@ -6,7 +6,7 @@ DOMAIN_COMMANDS="attach-device attach-disk attach-interface autostart hostname managedsave managedsave-remove maxvcpus memtune migrate migrate-setmaxdowntime reboot restore resume save schedinfo setmaxmem setmem setvcpus shutdown start suspend ttyconsole undefine update-device - vcpucount vcpuinfo vcpupin version vncdisplay blkiotune" + vcpucount vcpuinfo vcpupin version vncdisplay blkiotune send-key" MONITOR_COMMANDS="domblkinfo domblkstat domifstat dominfo dommemstat domstate list" diff --git a/source/send-key.xml b/source/send-key.xml new file mode 100644 index 0000000..03369b4 --- /dev/null +++ b/source/send-key.xml @@ -0,0 +1,80 @@ +<?xml version='1.0' encoding='utf-8' ?> + +<command> + <name>send-key</name> + + <description> + <text> + Send keycodes to the guest + </text> + </description> + + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--codeset</keyword> + <description> + <text> + the codeset of keycodes, possible values are: linux, xt, atset1, + atset2, atset3, os_x, xt_kbd, usb and win32, default:linux + </text> + </description> + </parameter> + <parameter requirement="optional"> + <keyword requirement="optional">--holdtime</keyword> + <description> + <text> + the time (in millisecond) the keys will be held for + </text> + </description> + </parameter> + <parameter requirement="required"> + <value type="string" requirement="required">keycode</value> + <description> + <text> + key codes to send to domain + </text> + </description> + </parameter> + </options> + + <availability from="0.9.4" /> + + <notes /> + + <examples type="usage"> + <example> + <terminal>virsh # <bold>send-key</bold> <value>example-domain</value> <value>37 18 21</value></terminal> + <text> + sends keys 'k', 'e' and 'y' to domain <value>example-domain</value>. + </text> + </example> + <example> + <terminal>virsh # <bold>send-key</bold> <value>example-domain</value> <value>KEY_RIGHTCTRL KEY_C</value></terminal> + <text> + sends keys right CTRL and 'c' to domain <value>example-domain</value>. + </text> + </example> + <example> + <terminal>virsh # <bold>send-key</bold> <value>example-domain</value> <italic>--holdtime</italic> 1000 <value>0x15 18 0xf</value></terminal> + <text> + sends keys 'y', 'e' and TAB to domain <value>example-domain</value>, holding them for 1 second. + </text> + </example> + </examples> + + <examples type="fullcontext" /> + + <reference type="seealso" /> +</command> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- common.sh | 2 +- source/send-key.xml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletions(-) create mode 100644 source/send-key.xml
diff --git a/common.sh b/common.sh index 13e8995..51dc3e1 100755 --- a/common.sh +++ b/common.sh @@ -6,7 +6,7 @@ DOMAIN_COMMANDS="attach-device attach-disk attach-interface autostart hostname managedsave managedsave-remove maxvcpus memtune migrate migrate-setmaxdowntime reboot restore resume save schedinfo setmaxmem setmem setvcpus shutdown start suspend ttyconsole undefine update-device - vcpucount vcpuinfo vcpupin version vncdisplay blkiotune" + vcpucount vcpuinfo vcpupin version vncdisplay blkiotune send-key"
I sorted this list (had to, given the merge conflict from my earlier sorting :)
+<text> + the codeset of keycodes, possible values are: linux, xt, atset1, + atset2, atset3, os_x, xt_kbd, usb and win32, default:linux
I added RFB to this list, based on Dan's pending patches.
+<availability from="0.9.4" /> + +<notes /> + +<examples type="usage">
Git complained about trailing whitespace on those two blank lines. ACK, nits fixed, and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

--- common.sh | 3 ++- source/inject-nmi.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletions(-) create mode 100644 source/inject-nmi.xml diff --git a/common.sh b/common.sh index 51dc3e1..5db5ecb 100755 --- a/common.sh +++ b/common.sh @@ -6,7 +6,8 @@ DOMAIN_COMMANDS="attach-device attach-disk attach-interface autostart hostname managedsave managedsave-remove maxvcpus memtune migrate migrate-setmaxdowntime reboot restore resume save schedinfo setmaxmem setmem setvcpus shutdown start suspend ttyconsole undefine update-device - vcpucount vcpuinfo vcpupin version vncdisplay blkiotune send-key" + vcpucount vcpuinfo vcpupin version vncdisplay blkiotune send-key + inject-nmi" MONITOR_COMMANDS="domblkinfo domblkstat domifstat dominfo dommemstat domstate list" diff --git a/source/inject-nmi.xml b/source/inject-nmi.xml new file mode 100644 index 0000000..9144f90 --- /dev/null +++ b/source/inject-nmi.xml @@ -0,0 +1,43 @@ +<?xml version='1.0' encoding='utf-8' ?> + +<command> + <name>inject-nmi</name> + + <description> + <text> + Inject NMI to the guest + </text> + </description> + + <options> + <parameter requirement="required"> + <keyword requirement="optional">--domain</keyword> + <value type="string" requirement="required">domain</value> + <description> + <text> + domain name, id or uuid + </text> + <text> + "--domain" itself is optional + </text> + </description> + </parameter> + </options> + + <availability from="0.9.2" /> + + <notes /> + + <examples type="usage"> + <example> + <terminal>virsh # <bold>inject-nmi</bold> <value>example-domain</value></terminal> + <text> + inject NMI to domain <value>example-domain</value>. + </text> + </example> + </examples> + + <examples type="fullcontext" /> + + <reference type="seealso" /> +</command> -- 1.7.3.1

On 08/25/2011 02:15 AM, Hu Tao wrote:
--- common.sh | 3 ++- source/inject-nmi.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletions(-) create mode 100644 source/inject-nmi.xml
diff --git a/common.sh b/common.sh index 51dc3e1..5db5ecb 100755 --- a/common.sh +++ b/common.sh @@ -6,7 +6,8 @@ DOMAIN_COMMANDS="attach-device attach-disk attach-interface autostart hostname managedsave managedsave-remove maxvcpus memtune migrate migrate-setmaxdowntime reboot restore resume save schedinfo setmaxmem setmem setvcpus shutdown start suspend ttyconsole undefine update-device - vcpucount vcpuinfo vcpupin version vncdisplay blkiotune send-key" + vcpucount vcpuinfo vcpupin version vncdisplay blkiotune send-key + inject-nmi"
Sorted, again.
+<availability from="0.9.2" /> + +<notes /> +
Whitespace, again. ACK as fixed, and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 08/25/2011 02:14 AM, Hu Tao wrote:
--- source/attach-device.xml | 143 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 137 insertions(+), 6 deletions(-)
diff --git a/source/attach-device.xml b/source/attach-device.xml index efa46f0..18e3262 100644 --- a/source/attach-device.xml +<parameter requirement="required"> +<keyword requirement="optional">--file</keyword> +<value type="string" requirement="required">file</value> +<description> +<text> + the XML file describing the device to be attached
It takes me reading from here,...
+ Now we attach a NIC to the domain: +</text> +<terminal>virsh #<bold>attach-device</bold> <value>example-domain</value> <value>/tmp/new-nic.xml</value></terminal> +<text> + the content of<value>/tmp/new-nic.xml</value> is: +</text> +<terminal> +<interface type='network'> +<source network='default'/> +</interface></terminal>
...until here, after several examples, before I finally learn what forms a valid .xml file. I'm wondering if it would help exposition to mention what constitutes valid xml sooner in the page. Maybe: the XML file describing the device to be attached, with a root element of something that belongs inside <devices> of domain xml But that would be a separate cleanup that applies not only here to attach-device, but also to detach-device and update-device, so it can be a later patch. What you have is a strict improvement and looks correct, so ACK and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Thu, Aug 25, 2011 at 12:20:59PM -0600, Eric Blake wrote:
On 08/25/2011 02:14 AM, Hu Tao wrote:
--- source/attach-device.xml | 143 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 137 insertions(+), 6 deletions(-)
diff --git a/source/attach-device.xml b/source/attach-device.xml index efa46f0..18e3262 100644 --- a/source/attach-device.xml +<parameter requirement="required"> +<keyword requirement="optional">--file</keyword> +<value type="string" requirement="required">file</value> +<description> +<text> + the XML file describing the device to be attached
It takes me reading from here,...
+ Now we attach a NIC to the domain: +</text> +<terminal>virsh #<bold>attach-device</bold> <value>example-domain</value> <value>/tmp/new-nic.xml</value></terminal> +<text> + the content of<value>/tmp/new-nic.xml</value> is: +</text> +<terminal> +<interface type='network'> +<source network='default'/> +</interface></terminal>
...until here, after several examples, before I finally learn what forms a valid .xml file. I'm wondering if it would help exposition to mention what constitutes valid xml sooner in the page. Maybe:
the XML file describing the device to be attached, with a root element of something that belongs inside <devices> of domain xml
But that would be a separate cleanup that applies not only here to attach-device, but also to detach-device and update-device, so it can be a later patch.
OK.
What you have is a strict improvement and looks correct, so ACK and pushed.
-- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
-- Thanks, Hu Tao
participants (3)
-
Eric Blake
-
Hu Tao
-
Laine Stump