Commit Graph

535 Commits

Author SHA1 Message Date
Martin Kletzander
862bea96d9 virsh: Use consistent naming for blkdeviotune options
All options started with underscores, but we switched them to dashes
later on, making the style consistent.  The latest addition, however,
did not respect that, so let's change that as well.  It is tempting to
just change the name instead of adding alias, especially since nobody
ever used it, which we know thanks to the fact that it didn't work.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2017-01-29 19:57:12 +01:00
Nitesh Konkar
a4ec42805c virsh: Fix manpage typo
Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2017-01-26 15:13:58 -05:00
Nitesh Konkar
1c1e6c1e18 virsh: Modify description for LIBVIRT_DEBUG=4 in manpage
As LIBVIRT_DEBUG=4 logs only error messages and there
are no levels above it, adjusting the description in
the man page accordingly.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2017-01-26 15:13:58 -05:00
Nitesh Konkar
4dd19ea913 docs: Reword virsh manpage for --uuid --name --details options
This commit is similar to commit 0977ada8.The virsh manpage
lists options --uuid and --name as mutually exclusive if
option --details is specified when actually the option
--details is mutually exclusive and can't go with options
--uuid and/or --name. This patch rewords the virsh manpage
to state the correct meaning.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2017-01-26 15:13:58 -05:00
Chen Hanxiao
b5817855c0 virsh: pool-list: allow both --uuid and --name in one cmd
This patch will allow --uuid and --name in one cmd.
The pool's UUID and name will be printed side by side.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-01-18 09:12:31 -05:00
Chen Hanxiao
0d9bcd6ffa virsh: pool-list: introduce --name for printing pool's name only
This patch will introduce option --name.
If specified, only name of pools will be printed out.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-01-18 08:46:14 -05:00
Chen Hanxiao
3fe791f8c9 virsh: pool-list: introduce --uuid for printing pool's UUID only
This patch will introduce option --uuid.
If specified, only UUID of pools will be printed out.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-01-18 08:46:14 -05:00
Daniel P. Berrange
2d0c4947ab Revert "perf: Add cache_l1d perf event support"
This reverts commit ae16c95f1b.
2017-01-16 16:54:34 +00:00
Chen Hanxiao
b29f7528ec virsh: pool-info: introduce option --bytes
By default, pool-info will convert sizes to human friendly units.

This patch will introduce option [--bytes].
If specified, the raw sizes will be in the output.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-01-10 19:24:41 -05:00
John Ferlan
f573f84eb7 storage: Add overwrite flag checking for logical pool
https://bugzilla.redhat.com/show_bug.cgi?id=1373711

Add support and documentation for the [NO_]OVERWRITE flags for the
logical backend.

Update virsh.pod with a description of the process for usage of
the flags and building of the pool's volume group.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2017-01-10 08:44:50 -05:00
John Ferlan
a48c674fba storage: Move and rename disk backend label checking
Rather than have the Disk code having to use PARTED to determine if
there's something on the device, let's use the virStorageBackendDeviceProbe.
and only fallback to the PARTED probing if the BLKID code isn't built in.

This will also provide a mechanism for the other current caller (File
System Backend) to utilize a PARTED parsing algorithm in the event that
BLKID isn't built in to at least see if *something* exists on the disk
before blindly trying to use. The PARTED error checking will not find
file system types, but if there is a partition table set on the device,
it will at least cause a failure.

Move virStorageBackendDiskValidLabel and virStorageBackendDiskFindLabel
to storage_backend and rename/rework the code to fit the new model.

Update the virsh.pod description to provide a more generic description
of the process since we could now use either blkid or parted to find
data on the target device.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2017-01-10 08:44:50 -05:00
John Ferlan
f23d4bbce3 storage: Fix implementation of no-overwrite for file system backend
https://bugzilla.redhat.com/show_bug.cgi?id=1363586

Commit id '27758859' introduced the "NO_OVERWRITE" flag check for
file system backends; however, the implementation, documentation,
and algorithm was inconsistent. For the "flag" description for the
API the flag was described as "Do not overwrite existing pool";
however, within the storage backend code the flag is described
as "it probes to determine if filesystem already exists on the
target device, renurning an error if exists".

The code itself was implemented using the paradigm to set up the
superblock probe by creating a filter that would cause the code
to only search for the provided format type. If that type wasn't
found, then the algorithm would return success allowing the caller
to format the device. If the format type already existed on the
device, then the code would fail indicating that the a filesystem
of the same type existed on the device.

The result is that if someone had a file system of one type on the
device, it was possible to overwrite it if a different format type
was specified in updated XML effectively trashing whatever was on
the device already.

This patch alters what NO_OVERWRITE does for a file system backend
to be more realistic and consistent with what should be expected when
the caller requests to not overwrite the data on the disk.

Rather than filter results based on the expected format type, the
code will allow success/failure be determined solely on whether the
blkid_do_probe calls finds some known format on the device. This
adjustment also allows removal of the virStoragePoolProbeResult
enum that was under utilized.

If it does find a formatted file system different errors will be
generated indicating a file system of a specific type already exists
or a file system of some other type already exists.

In the original virsh support commit id 'ddcd5674', the description
for '--no-overwrite' within the 'pool-build' command help output
has an ambiguous "of this type" included in the short description.
Compared to the longer description within the "Build a given pool."
section of the virsh.pod file it's more apparent that the meaning
of this flag would cause failure if a probe of the target already
has a filesystem.

So this patch also modifies the short description to just be the
antecedent of the 'overwrite' flag, which matches the API description.
This patch also modifies the grammar in virsh.pod for no-overwrite
as well as reworking the paragraph formats to make it easier to read.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2017-01-10 08:44:50 -05:00
Laine Stump
24d4a0a1fb docs: fix list of domain states in virsh manpage
The virsh manpage lists "shutdown" and "dying" as two of the possible
domain states that could be listed in the output of the "virsh list"
command. However, a domain that is being shutdown will be listed as
"in shutdown", and the "dying" state doesn't even exist (and never
has, as far as I can tell from looking through git history - it was
shown in the original import of the virsh.pod file in 2006; there was
no VIR_DOMAIN_DYING state then, there wasn't one when those lines of
virsh.pod were tweaked in 2008, and there still isn't one
today. Apparently it was just something that sounded like a good idea
to someone at some time, but was never implemented...)

Resolves: https://bugzilla.redhat.com/1408778
2017-01-10 03:41:09 -05:00
Nitesh Konkar
ae16c95f1b perf: Add cache_l1d perf event support
This patch adds support and documentation for
a generalized hardware cache event called cache_l1d
perf event.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2017-01-09 18:15:31 -05:00
Nitesh Konkar
0977ada851 docs: Reword virsh manpage for --uuid --name --table options
The virsh manpage lists options --uuid and --name as
mutually exclusive along option --table when actually
the option --table is mutually exclusive and can't go
with options --uuid and/or --name. This patch rewords the
virsh manpage to state the correct meaning.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2017-01-09 18:03:19 -05:00
Nitesh Konkar
779073c575 virsh: Fix English grammar in the virsh perf manpage 2017-01-09 17:38:59 -05:00
Daniel P. Berrange
d6398c869c virsh: add secret lifecycle event handling
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-01-09 15:53:49 +00:00
Chen Hanxiao
96b1f091e7 virsh: Fix grammar - s/rather then/rather than
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-01-07 09:09:54 -05:00
John Ferlan
f62e418c86 virsh: Allow display of the physical volume size
Add a new qualifier '--physical' to the 'vol-info' command in order to
dispaly the physical size of the volume. The size can differ from the
allocation value depending on the volume file time. In particular, qcow2
volumes will have a physical value larger than allocation. This also occurs
for sparse files, although for those the capacity is the largest size;
whereas, for qcow2 capacity is the logical size.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-12-20 13:54:03 -05:00
Nitesh Konkar
71bbe65311 perf: add ref_cpu_cycles perf event support
This patch adds support and documentation for
the ref_cpu_cycles perf event.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-12-15 17:32:03 -05:00
Nitesh Konkar
9ae79400ff perf: add stalled_cycles_backend perf event support
This patch adds support and documentation for
the stalled_cycles_backend perf event.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-12-15 16:47:05 -05:00
Nitesh Konkar
060c159b08 perf: add stalled_cycles_frontend perf event support
This patch adds support and documentation
for the stalled_cycles_frontend perf event.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-12-15 16:47:05 -05:00
Nitesh Konkar
7d34731067 perf: add bus_cycles perf event support
This patch adds support and documentation
for the bus_cycles perf event.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-12-15 16:47:05 -05:00
Nitesh Konkar
8981d7925e perf: add branch_misses perf event support
This patch adds support and documentation
for the branch_misses perf event.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-12-12 18:04:52 -05:00
Nitesh Konkar
8546adf80b perf: add one more perf event support
With current perf framework, this patch adds support and documentation
for the branch_instructions perf event.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-12-07 07:03:57 -05:00
John Ferlan
d92b09cd75 virsh: Add group name to blkdeviotune output
https://bugzilla.redhat.com/show_bug.cgi?id=1336564

Add the ability to set/display the group_name for block device iotune

Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-12-05 18:30:38 -05:00
Nitesh Konkar
d276da48bc Fix typos and grammar
Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-11-23 12:08:15 -05:00
Jiri Denemark
29dc9a52d7 virsh: Document --rdma-pin-all migrate option properly
https://bugzilla.redhat.com/show_bug.cgi?id=1368351

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-11-22 21:32:54 +01:00
Jiri Denemark
38f7f297c8 virsh: Add support for VIR_MIGRATE_PARAM_PERSIST_XML
Commit v1.3.3-181-gb028e9d7c implmented support for
VIR_MIGRATE_PARAM_PERSIST_XML migration parameter, but forgot to update
virsh.

https://bugzilla.redhat.com/show_bug.cgi?id=835300

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-11-22 21:24:55 +01:00
Martin Kletzander
eacecd7437 virsh: Fix on_shutdown to on_poweroff
The 'on_shutdown' was the name in Xen, there was never such option in
libvirt's domain XML.

Reported-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-10-27 08:45:11 +02:00
John Ferlan
13022ce430 virsh: Add _length parameters to virsh output
https://bugzilla.redhat.com/show_bug.cgi?id=1349898

Add the duration parameters to the virsh input/output for blkdeviotune
command and describe them in the pod file.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-10-25 17:20:17 -04:00
Viktor Mihajlovski
c1be22f971 doc: update virsh domstats documentation for vcpu statistics
Added description for new vcpu.<num>.halted statistics value.
While there, also added a description for vcpu.<num>.wait and
clarified the units displayed for time and wait.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
2016-10-24 18:54:25 -04:00
Viktor Mihajlovski
6aa324fbeb doc: Describe the VCPU states returned by virsh vcpuinfo
Added a brief description of the VCPU states.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2016-10-21 11:02:49 -04:00
Nitesh Konkar
d4a9b21511 virsh: Fix typos in manpage
Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-10-12 17:55:25 -04:00
Nitesh Konkar
a75259d977 virsh: Fix commas in manpage to enhance readability.
Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
2016-10-12 17:55:25 -04:00
Chen Hanxiao
599e966efb virsh domdisplay: introduce '--all' for showing all possible graphical displays
For one VM, it could had more than one graphical display.
Such as we coud add both vnc and spice display to a VM.

This patch introduces '--all' for showing all
possible graphical display of a active VM.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2016-10-10 04:21:38 +02:00
John Ferlan
12629888fc docs: Alter descriptions of perf cpu_cycles
https://bugzilla.redhat.com/show_bug.cgi?id=1381714

Alter the descriptions to match what the cpu_cycles actually is
2016-10-07 13:27:16 -04:00
Peter Krempa
0f95f31c83 lib: Introduce VIR_DOMAIN_VCPU_HOTPLUGGABLE for virDomainSetVcpusFlags
For compatibility reasons virDomainSetVcpus needs to add vcpus as non
hotpluggable which means that the users will not be able to unplug it
after the VM has started. Add a flag that will allow to tell the API
that the unpluggable vcpus are okay.
2016-10-05 09:05:52 +02:00
Jim Fehlig
f4332dd2d8 doc: fix note about Xen credit scheduler
Commit 6c504d6a added a note to the virsh man page about the
deprecation of 'cap' and 'weight' settings for the credit
scheduler. To this day, the default scheduler in Xen is credit
and it supports setting 'cap' and 'weight'. Remove the deprecation
notice from the note on the Xen credit scheduler.

Reported-by: Volo M. <vm@vovs.net>
2016-09-28 07:47:07 -06:00
Erik Skultety
73a2510feb virsh: man: Do not document our old deprecated nodedev-dettach command
The command is deprecated due to being grammatically incorrect, but for
backwards compatibility reasons cannot be removed. However, we should not
document such commands.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
2016-09-20 15:17:40 +02:00
Nikolay Shirokovskiy
34a6e84748 virsh: add --keep-nvram option to undefine command
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
2016-09-13 09:31:50 +02:00
Qiaowei Ren
bae660869d perf: add more perf events support
With current perf framework, this patch adds support and documentation
for more perf events, including cache misses, cache references, cpu cycles,
and instructions.

Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
2016-09-02 17:00:58 -04:00
John Ferlan
6a0e41519c virsh: Rework the perf event names into a table.
Should be easier to read
2016-09-02 17:00:58 -04:00
John Ferlan
29b2f253af virsh: Add a forward reference to perf command from domstats --perf
Keep the details in one place...
2016-09-02 17:00:58 -04:00
Kothapally Madhu Pavan
04597a7038 Make --postcopy flag mandatory with --postcopy-after-precopy
--postcopy-after-precopy is just an aditional flag for
postcopy migration.

Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
2016-09-02 14:42:53 +02:00
Chen Hanxiao
73b647d418 virsh: clarify snapshot --live
In libvirt, snapshot means disk snapshot.
snapshot --live is more like VM checkpoint.
Make it clear in virsh.pod.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-08-10 13:29:54 +02:00
Jovanka Gulicoska
5b8643099a virsh: Introduce nodedev-event command
Add nodedev-event support for node device lifecycle events
2016-08-09 11:05:32 -04:00
John Ferlan
2197ea56d7 conf: Add IOThread quota and period scheduler/cputune defs
https://bugzilla.redhat.com/show_bug.cgi?id=1356937

Add the definitions to allow for viewing/setting cgroup period and quota
limits for IOThreads.

This is similar to the work done for emulator quota and period by
commit ids 'b65dafa' and 'e051c482'.

Being able to view/set the IOThread specific values is related to more
recent changes adding global period (commmit id '4d92d58f') and global
quota (commit id '55ecdae') definitions and qemu support (commit id
'4e17ff79' and 'fbcbd1b2'). With a global setting though, if somehow
the IOThread value in the cgroup hierarchy was set "outside of libvirt"
to a value that is incompatible with the global value.

Allowing control over IOThread specific values provides the capability
to alter the IOThread values as necessary.
2016-08-03 06:36:22 -04:00
Derbyshev Dmitry
438c204763 qemu: return balloon statistics when all domain statistics reported
To collect all balloon statistics for all guests it was necessary to make
several libvirt requests. Now it's possible to get all balloon statiscs via
single connectGetAllDomainStats call.

Signed-off-by: Derbyshev Dmitry <dderbyshev@virtuozzo.com>
2016-07-27 15:39:47 +02:00
Pavel Hrdina
f57fbd6c4a qemu: fix domain memory 'last-update' timestamp
This fixes commit 200a40f9 which introduced 'last-update' timestamp.

Signed-off-by: Derbyshev Dmitry <dderbyshev@virtuozzo.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-07-27 15:39:47 +02:00