[libvirt] [PATCH 1/2] virsh: Tweak attach-* documentation

as we are missing: attach-disk: --type can accept 'lun' too, not just cdrom or floppy. attach-disk: --target specify logical device name, not path attach-interface: --target silently drops strings with vnet* prefix --- tools/virsh.pod | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 910a187..4729127 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1586,10 +1586,11 @@ needed if the device does not use managed mode. [I<--multifunction>] 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> 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, +I<source> is path for the files and devices. I<target> controls the bus or +device under which the disk is exposed to the guest OS. It indicates the +"logical" device name. 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<lun>, 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. I<mode> can specify the two specific mode I<readonly> or I<shareable>. @@ -1614,7 +1615,8 @@ Attach a new network interface to the domain. I<type> can be either I<network> to indicate a physical network device or I<bridge> to indicate a bridge to a device. I<source> indicates the source device. -I<target> allows to indicate the target device in the guest. +I<target> allows to indicate the target device in the guest. Names starting +with 'vnet' are considered as auto-generated an hence blanked out. I<mac> allows to specify the MAC address of the network interface. I<script> allows to specify a path to a script handling a bridge instead of the default one. -- 1.7.8.5

as we support qed format as well. --- tools/virsh.pod | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 4729127..fce8fef 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2163,11 +2163,11 @@ I<capacity> is the size of the volume to be created, as a scaled integer I<--allocation> I<size> is the initial size to be allocated in the volume, also as a scaled integer defaulting to bytes. I<--format> I<string> is used in file based storage pools to specify the volume -file format to use; raw, bochs, qcow, qcow2, vmdk. +file format to use; raw, bochs, qcow, qcow2, vmdk, qed. I<--backing-vol> I<vol-name-or-key-or-path> is the source backing volume to be used if taking a snapshot of an existing volume. I<--backing-vol-format> I<string> is the format of the snapshot backing volume; -raw, bochs, qcow, qcow2, vmdk, host_device. +raw, bochs, qcow, qcow2, vmdk, qed, host_device. =item B<vol-clone> [I<--pool> I<pool-or-uuid>] I<vol-name-or-key-or-path> I<name> -- 1.7.8.5

On 2012年06月18日 19:28, Michal Privoznik wrote:
as we support qed format as well. --- tools/virsh.pod | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod index 4729127..fce8fef 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2163,11 +2163,11 @@ I<capacity> is the size of the volume to be created, as a scaled integer I<--allocation> I<size> is the initial size to be allocated in the volume, also as a scaled integer defaulting to bytes. I<--format> I<string> is used in file based storage pools to specify the volume -file format to use; raw, bochs, qcow, qcow2, vmdk. +file format to use; raw, bochs, qcow, qcow2, vmdk, qed. I<--backing-vol> I<vol-name-or-key-or-path> is the source backing volume to be used if taking a snapshot of an existing volume. I<--backing-vol-format> I<string> is the format of the snapshot backing volume; -raw, bochs, qcow, qcow2, vmdk, host_device. +raw, bochs, qcow, qcow2, vmdk, qed, host_device.
=item B<vol-clone> [I<--pool> I<pool-or-uuid>] I<vol-name-or-key-or-path> I<name>
Looks fine, but rng and virsh help need to update too. And it's better to mention it's for file based storage pools. Osier

On 06/18/2012 05:52 AM, Osier Yang wrote:
specify the volume -file format to use; raw, bochs, qcow, qcow2, vmdk. +file format to use; raw, bochs, qcow, qcow2, vmdk, qed. I<--backing-vol> I<vol-name-or-key-or-path> is the source backing volume to be used if taking a snapshot of an existing volume. I<--backing-vol-format> I<string> is the format of the snapshot backing volume; -raw, bochs, qcow, qcow2, vmdk, host_device. +raw, bochs, qcow, qcow2, vmdk, qed, host_device.
=item B<vol-clone> [I<--pool> I<pool-or-uuid>] I<vol-name-or-key-or-path> I<name>
Looks fine, but rng and virsh help need to update too. And it's better to mention it's for file based storage pools.
You can use qcow2 on top of an LVM volume, so it is not just file based storage pools. Also, the rng right now takes a free-form string. It might be nice to polish the code into enumerating the exact values that we support instead of being free-form, but that's a bigger project. But yes, it means that our documentation is now chasing qemu because our rng is letting the free-form text through to be interpreted by qemu. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 2012年06月18日 19:28, Michal Privoznik wrote:
as we are missing: attach-disk: --type can accept 'lun' too, not just cdrom or floppy. attach-disk: --target specify logical device name, not path attach-interface: --target silently drops strings with vnet* prefix
Good catch for the attach-interface, we really need it.
--- tools/virsh.pod | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod index 910a187..4729127 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1586,10 +1586,11 @@ needed if the device does not use managed mode. [I<--multifunction>]
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> 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, +I<source> is path for the files and devices. I<target> controls the bus or +device under which the disk is exposed to the guest OS. It indicates the +"logical" device name. 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<lun>, 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. I<mode> can specify the two specific mode I<readonly> or I<shareable>. @@ -1614,7 +1615,8 @@ Attach a new network interface to the domain. I<type> can be either I<network> to indicate a physical network device or I<bridge> to indicate a bridge to a device. I<source> indicates the source device. -I<target> allows to indicate the target device in the guest. +I<target> allows to indicate the target device in the guest. Names starting +with 'vnet' are considered as auto-generated an hence blanked out. I<mac> allows to specify the MAC address of the network interface. I<script> allows to specify a path to a script handling a bridge instead of the default one.
ACK.

On 18.06.2012 13:43, Osier Yang wrote:
On 2012年06月18日 19:28, Michal Privoznik wrote:
as we are missing: attach-disk: --type can accept 'lun' too, not just cdrom or floppy. attach-disk: --target specify logical device name, not path attach-interface: --target silently drops strings with vnet* prefix
Good catch for the attach-interface, we really need it.
--- tools/virsh.pod | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod index 910a187..4729127 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1586,10 +1586,11 @@ needed if the device does not use managed mode. [I<--multifunction>]
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> 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, +I<source> is path for the files and devices. I<target> controls the bus or +device under which the disk is exposed to the guest OS. It indicates the +"logical" device name. 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<lun>, 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. I<mode> can specify the two specific mode I<readonly> or I<shareable>. @@ -1614,7 +1615,8 @@ Attach a new network interface to the domain. I<type> can be either I<network> to indicate a physical network device or I<bridge> to indicate a bridge to a device. I<source> indicates the source device. -I<target> allows to indicate the target device in the guest. +I<target> allows to indicate the target device in the guest. Names starting +with 'vnet' are considered as auto-generated an hence blanked out. I<mac> allows to specify the MAC address of the network interface. I<script> allows to specify a path to a script handling a bridge instead of the default one.
ACK.
Thanks, pushed. Michal
participants (3)
-
Eric Blake
-
Michal Privoznik
-
Osier Yang