Minor improvements documentation and use of lv_api_do

This commit is contained in:
Jesse Gardner 2021-03-22 19:10:05 -07:00
parent ff65da8adb
commit fe078c2598
4 changed files with 22 additions and 33 deletions

26
man.md
View File

@ -31,7 +31,7 @@ requires:
Bash 4.0+
qemu-img
libvirt tools:
libvirt tools:
virt-clone
virt-xml
virt-xml-validate
@ -280,10 +280,10 @@ OTHER COMMANDS
As described in the limitations section, there are ways that qq2clone
can lose track of a clone. If this happens, it will remain in qq2clones
database, its ID number will remain reserved, and its image files may
not be deleted and take up space doing nothing. the **check** command
tries to find and fix this and other problems. The *TEMPLATE-NAME*
argument is optional, and restricts the check to that template and its
clones. Otherwise, all templates are checked
not be deleted and take up space doing nothing. The **check** command
finds and fixes occurences of this problem. The *TEMPLATE-NAME* argument
is optional, and restricts the check to that template and its clones.
Otherwise, all templates are checked
**config** list, **config** info \[*OPTION*\], **config** edit \[*OPTION*\]
List all configuration options and their current value, get info about a
@ -428,16 +428,12 @@ reason that the default directory storage-qq2clone does not start with
.
If the UUID of a clone is changed, qq2clone will no longer be able to
track it and will not be able to perform commands on it anymore. If
virsh undefine is run on a clone, qq2clone will not be able to see it
once it is turned off. This limitation will be eliminated or reduced in
the future, when qq2clone moves away from relying on virsh and
implements direct usage of the libvirt API. It could be addressed now by
using transient domains, but that would require qq2clone to do more
things manually instead of just invoking virsh. Since the plan is to
transition to a different approach later, that would be wasted effort.
For now, if you find yourself in this position just use **qq2clone**
check.
track it and will not be able to perform commands on it anymore. This
will be addressed in the future using custom metadata in the libvirt
domain XML. If the user undefines a domain, this will obviously cause it
to disappear from qq2clones perspective when it is turned off, creating
a discrepancy in its database. This can be fixed with **qq2clone**
**check**.
qq2clone can only produce clones by making qcow2 image files. The
backing file need not be qcow2, but the images produced by qq2clone

View File

@ -271,8 +271,8 @@ domains, their state will be restored
: As described in the limitations section, there are ways that qq2clone
can lose track of a clone. If this happens, it will remain in qq2clone's
database, its ID number will remain reserved, and its image files may not
be deleted and take up space doing nothing. the **check** command tries to
find and fix this and other problems. The *TEMPLATE-NAME* argument is
be deleted and take up space doing nothing. The **check** command
finds and fixes occurences of this problem. The *TEMPLATE-NAME* argument is
optional, and restricts the check to that template and its clones.
Otherwise, all templates are checked

View File

@ -175,7 +175,7 @@ read -r check <&3
local line
while read -r line <&3; do
[[ "$line" == "EOF" ]] && break
write_pipe 0 "${line:1}"
echo "$line" >&3
done
return 0

View File

@ -35,7 +35,7 @@ requires:
\f[C]
Bash 4.0+
qemu\-img
libvirt tools:
libvirt tools:
virt\-clone
virt\-xml
virt\-xml\-validate
@ -302,8 +302,7 @@ can lose track of a clone.
If this happens, it will remain in qq2clone\[cq]s database, its ID
number will remain reserved, and its image files may not be deleted and
take up space doing nothing.
the \f[B]check\f[R] command tries to find and fix this and other
problems.
The \f[B]check\f[R] command finds and fixes occurences of this problem.
The \f[I]TEMPLATE\-NAME\f[R] argument is optional, and restricts the
check to that template and its clones.
Otherwise, all templates are checked
@ -483,18 +482,12 @@ the default directory storage\-qq2clone does not start with `.'
.PP
If the UUID of a clone is changed, qq2clone will no longer be able to
track it and will not be able to perform commands on it anymore.
If virsh undefine is run on a clone, qq2clone will not be able to see it
once it is turned off.
This limitation will be eliminated or reduced in the future, when
qq2clone moves away from relying on virsh and implements direct usage of
the libvirt API.
It could be addressed now by using transient domains, but that would
require qq2clone to do more things manually instead of just invoking
virsh.
Since the plan is to transition to a different approach later, that
would be wasted effort.
For now, if you find yourself in this position just use
\f[B]qq2clone\f[R] check.
This will be addressed in the future using custom metadata in the
libvirt domain XML.
If the user undefines a domain, this will obviously cause it to
disappear from qq2clone\[cq]s perspective when it is turned off,
creating a discrepancy in its database.
This can be fixed with \f[B]qq2clone\f[R] \f[B]check\f[R].
.PP
qq2clone can only produce clones by making qcow2 image files.
The backing file need not be qcow2, but the images produced by qq2clone