.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "VIRT-ADMIN" 1 "" "" "Virtualization Support" .SH NAME virt-admin \- daemon administration interface .SH SYNOPSIS .sp \fBvirt\-admin\fP [\fIOPTION\fP]... [\fICOMMAND_STRING\fP] .sp \fBvirt\-admin\fP [\fIOPTION\fP]... \fICOMMAND\fP [\fIARG\fP]... .SH DESCRIPTION .sp The \fBvirt\-admin\fP program is the main administration interface for modifying the libvirt daemon configuration at runtime, changing daemon behaviour as well as for monitoring and managing all clients connected to the daemon. .sp The basic structure of most virt\-admin usage is: .INDENT 0.0 .INDENT 3.5 .sp .EX virt\-admin [OPTION]... [ARG]... .EE .UNINDENT .UNINDENT .sp Where \fIcommand\fP is one of the commands listed below. Any \fIcommand\fP starting with \fB#\fP is treated as a comment and silently ignored, all other unrecognized \fIcommands\fP are diagnosed. .sp The \fBvirt\-admin\fP program can be used either to run one \fICOMMAND\fP by giving the command and its arguments on the shell command line, or a \fICOMMAND_STRING\fP which is a single shell argument consisting of multiple \fICOMMAND\fP actions and their arguments joined with whitespace and separated by semicolons or newlines between commands, where unquoted backslash\-newline pairs are elided. Within \fICOMMAND_STRING\fP, virt\-admin understands the same single, double, and backslash escapes as the shell, although you must add another layer of shell escaping in creating the single shell argument, and any word starting with unquoted \fI#\fP begins a comment that ends at newline. If no command is given in the command line, \fBvirt\-admin\fP will then start a minimal interpreter waiting for your commands, and the \fBquit\fP command will then exit the program. .sp The \fBvirt\-admin\fP program understands the following \fIOPTIONS\fP\&. .sp \fB\-c\fP, \fB\-\-connect\fP \fIURI\fP .sp Connect to the specified \fIURI\fP, as if by the \fBconnect\fP command, instead of the default connection. See \fI\%NOTES\fP\&. .sp \fB\-d\fP, \fB\-\-debug\fP \fILEVEL\fP .sp Enable debug messages at integer \fILEVEL\fP and above. \fILEVEL\fP can range from 0 to 4 (default). See the documentation of \fBVIRT_ADMIN_DEBUG\fP environment variable below for the description of each \fILEVEL\fP\&. .sp \fB\-h\fP, \fB\-\-help\fP .sp Ignore all other arguments, and behave as if the \fBhelp\fP command were given instead. .sp \fB\-l\fP, \fB\-\-log\fP \fIFILE\fP .sp Output logging details to \fIFILE\fP\&. .sp \fB\-q\fP, \fB\-\-quiet\fP .sp Avoid extra informational messages. .sp \fB\-v\fP, \fB\-\-version[=short]\fP .sp Ignore all other arguments, and prints the version of the libvirt library virt\-admin is coming from .sp \fB\-V\fP, \fB\-\-version=long\fP .sp Ignore all other arguments, and prints the version of the libvirt library virt\-admin is coming from. .SH NOTES .sp The \fBvirt\-admin\fP supports both the monolithic \fBlibvirtd\fP daemon and the \fI\%modular daemons\fP whichever is in use by your system. The connection \fIURI\fP used with \fB\-c/\-\-connect\fP or the \fI\%connect\fP command is based on the name of the controlled daemon e.g.: \fBvirtqemud:///system\fP, \fBlibvirtd:///system\fP\&. .sp Running \fBvirt\-admin\fP requires root privileges when communicating with the system instance of a daemon (\fIURI\fP ending in \fB/system\fP) due to the communications channels used to talk to the daemon. .SH GENERIC COMMANDS .sp The following commands are generic. .SS help .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX help [command\-or\-group] .EE .UNINDENT .UNINDENT .sp This lists each of the virt\-admin commands. When used without options, all commands are listed, one per line, grouped into related categories, displaying the keyword for each group. .sp To display detailed information for a specific command, use its name as the option. .SS quit, exit .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX quit exit .EE .UNINDENT .UNINDENT .sp quit this interactive terminal .SS version .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX version .EE .UNINDENT .UNINDENT .sp will print out the version info about which libvirt library was this client built from. As opposed to \fIvirsh\fP client, the output already includes the version of the daemon. .sp \fBExample:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX $ virt\-admin version Compiled against library: libvirt 1.2.21 Using library: libvirt 1.2.21 Running against daemon: 1.2.20 .EE .UNINDENT .UNINDENT .SS cd .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX cd [directory] .EE .UNINDENT .UNINDENT .sp Will change current directory to \fIdirectory\fP\&. The default directory for the \fBcd\fP command is the home directory or, if there is no \fIHOME\fP variable in the environment, the root directory. .sp This command is only available in interactive mode. .SS pwd .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX pwd .EE .UNINDENT .UNINDENT .sp Will print the current directory. .SS connect .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX connect [URI] .EE .UNINDENT .UNINDENT .sp (Re)\-Connect to a daemon\(aqs administrating server. The \fIURI\fP parameter specifies how to connect to the administrating server. If \fILIBVIRT_ADMIN_DEFAULT_URI\fP or \fIuri_default\fP (see below) were set, \fIconnect\fP is automatically issued every time a command that requires an active connection is executed. Note that this only applies if there is no connection at all or there is an inactive one. .sp See \fI\%NOTES\fP on picking the correct \fIURI\fP corresponding to a libvirt daemon. .sp To find the currently used URI, check the \fIuri\fP command documented below. .SS uri .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX uri .EE .UNINDENT .UNINDENT .sp Prints the administrating server canonical URI, can be useful in shell mode. If no \fIuri\fP was specified, neither \fILIBVIRT_ADMIN_DEFAULT_URI\fP environment variable nor \fIuri_default\fP option (libvirt\-admin.conf) were set, libvirtd:///system is used. .SH DAEMON COMMANDS .sp The following commands allow one to monitor the daemon\(aqs state as well as directly change its internal configuration. .SS server\-list .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX server\-list .EE .UNINDENT .UNINDENT .sp Lists all manageable servers contained within the daemon the client is currently connected to. .SS daemon\-log\-filters .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX daemon\-log\-filters [\-\-filters string] .EE .UNINDENT .UNINDENT .sp When run without arguments, this returns the currently defined set of logging filters. Providing an argument will cause the command to define a new set of logging filters. .INDENT 0.0 .IP \(bu 2 \fI\-\-filters\fP .UNINDENT .sp Define a new set of logging filters where multiple filters are delimited by space. Each filter must conform to the form described in detail by \fI/etc/libvirt/libvirtd.conf\fP (section \(aqLogging filters\(aq). .sp \fBExample:\fP .sp To define a filter which suppresses all e.g. \(aqvirObjectUnref\(aq DEBUG messages, use the following: .INDENT 0.0 .INDENT 3.5 .sp .EX $ virt\-admin daemon\-log\-filters \(dq4:util.object\(dq .EE .UNINDENT .UNINDENT .sp (Note the \(aq.\(aq symbol which can be used to more fine\-grained filters tailored to specific modules, in contrast, to affect the whole directory containing several modules this would become \(dq4:util\(dq): .SS daemon\-log\-outouts .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX daemon\-log\-outputs [\-\-outputs string] .EE .UNINDENT .UNINDENT .sp When run without arguments, this returns the currently defined set of logging outputs. Providing an argument will cause the command to define a new set of logging outputs. .INDENT 0.0 .IP \(bu 2 \fI\-\-outputs\fP .UNINDENT .sp Define a new set of logging outputs where multiple outputs are delimited by space. Each output must conform to the form described in detail by \fI/etc/libvirt/libvirtd.conf\fP (section \(aqLogging outputs\(aq). .sp \fBExample:\fP .sp To replace the current setting for logging outputs with one that writes to a file while logging errors only, the following could be used: .INDENT 0.0 .INDENT 3.5 .sp .EX $ virt\-admin daemon\-log\-outputs \(dq4:file:\(dq .EE .UNINDENT .UNINDENT .sp To define multiple outputs at once they need to be delimited by spaces: .INDENT 0.0 .INDENT 3.5 .sp .EX $ virt\-admin daemon\-log\-outputs \(dq4:stderr 2:syslog:\(dq .EE .UNINDENT .UNINDENT .SS daemon\-timeout .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX daemon\-timeout \-\-timeout NUM .EE .UNINDENT .UNINDENT .sp Sets the daemon timeout to the value of \(aq\-\-timeout\(aq argument. Use \fB\-\-timeout 0\fP to disable auto\-shutdown of the daemon. .SH SERVER COMMANDS .sp The following commands manipulate daemon\(aqs server internal configuration. The \fIserver\fP is specified by its name. .SS server\-threadpool\-info .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX server\-threadpool\-info server .EE .UNINDENT .UNINDENT .sp Retrieve server\(aqs threadpool attributes. These attributes include: .INDENT 0.0 .IP \(bu 2 \fIminWorkers\fP as the bottom limit to the number of active workers, .IP \(bu 2 \fImaxWorkers\fP as the top limit to the number of active workers, .IP \(bu 2 \fInWorkers\fP as the current number of workers in the threadpool, .IP \(bu 2 \fIfreeWorkers\fP as the current number of workers available for a task, .IP \(bu 2 \fIprioWorkers\fP as the current number of priority workers in the threadpool, and .IP \(bu 2 \fIjobQueueDepth\fP as the current depth of threadpool\(aqs job queue. .UNINDENT .sp \fBBackground\fP .sp Each daemon server utilizes a threadpool to accomplish tasks requested by clients connected to it. Every time a client request arrives to the server, it checks whether there is a worker available to accomplish the given task or it should create a new worker for the job (rather than being destroyed, the worker becomes free once the task is finished). Creating new workers, however, is only possible when the current number of workers is still below the configured upper limit. In addition to these \(aqstandard\(aq workers, a threadpool also contains a special set of workers called \fIpriority\fP workers. Their purpose is to perform tasks that, unlike tasks carried out by normal workers, are within libvirt\(aqs full control and libvirt guarantees that such a task cannot hang, thus will always finish. An example of such a task this would be destroying a domain: .INDENT 0.0 .INDENT 3.5 .sp .EX $ virsh destroy . .EE .UNINDENT .UNINDENT .SS server\-threadpool\-set .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX server\-threadpool\-set server [\-\-min\-workers count] [\-\-max\-workers count] [\-\-priority\-workers count] .EE .UNINDENT .UNINDENT .sp Change threadpool attributes on a server. Only a fraction of all attributes as described in \fIserver\-threadpool\-info\fP is supported for the setter. .INDENT 0.0 .IP \(bu 2 \fI\-\-min\-workers\fP .sp The bottom limit to number of active workers in a threadpool. .IP \(bu 2 \fI\-\-max\-workers\fP .sp The upper limit to number of active workers in a threadpool. If used in combination with option \fI\-\-min\-workers\fP, the value for the upper limit has to be greater than the value for the bottom limit, otherwise the command results in an error. .IP \(bu 2 \fI\-\-priority\-workers\fP .sp The current number of active priority workers in a threadpool. .UNINDENT .SS server\-clients\-info .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX server\-clients\-info server .EE .UNINDENT .UNINDENT .sp Get information about the current setting of limits regarding connections of new clients. This information comprises of the limits to the maximum number of clients connected to \fIserver\fP, maximum number of clients waiting for authentication, in order to be connected to the server, as well as the current runtime values, more specifically, the current number of clients connected to \fIserver\fP and the current number of clients waiting for authentication. .sp \fBExample:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX # virt\-admin server\-clients\-info libvirtd nclients_max : 120 nclients : 3 nclients_unauth_max : 20 nclients_unauth : 0 .EE .UNINDENT .UNINDENT .SS server\-clients\-set .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX server\-clients\-set server [\-\-max\-clients count] [\-\-max\-unauth\-clients count] .EE .UNINDENT .UNINDENT .sp Set new client\-related limits on \fIserver\fP\&. .INDENT 0.0 .IP \(bu 2 \fI\-\-max\-clients\fP .sp Change the upper limit of the maximum overall number of clients connected to \fIserver\fP to value \fBcount\fP\&. The value for this limit has to be always greater than the value of \fI\-\-max\-unauth\-clients\fP\&. .IP \(bu 2 \fI\-\-max\-unauth\-clients\fP .sp Change the upper limit of the maximum number of clients waiting for authentication, in order to be connected to \fIserver\fP, to value \fBcount\fP\&. The value for this limit has to be always lower than the value of \fI\-\-max\-clients\fP\&. .UNINDENT .SS server\-update\-tls .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX server\-update\-tls server .EE .UNINDENT .UNINDENT .sp Update tls context on \fIserver\fP\&. .INDENT 0.0 .IP \(bu 2 \fIserver\fP .sp Available servers on a daemon. Currently only supports \(aqlibvirtd\(aq or \(aqvirtproxyd\(aq. .UNINDENT .SH CLIENT COMMANDS .sp The following commands provide management and monitoring of clients connected to one of daemon\(aqs available servers. Clients are specified by their numeric ID which is obtained by listing all clients connected to a specified server (see command \fBclient\-list\fP). .SS client\-list .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX client\-list server .EE .UNINDENT .UNINDENT .sp Print a table showing the list of clients connected to , also providing information about transport type used on client\(aqs connection (supported transports include \fBunix\fP, \fBtcp\fP, and \fBtls\fP), as well as providing information about client\(aqs connection time (system local time is used). .SS client\-info .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX client\-info server client .EE .UNINDENT .UNINDENT .sp Retrieve identity information about \fIclient\fP from \fIserver\fP\&. The attributes returned may vary depending on the connection transport used. Transport\-dependent attributes include local client process\(aqs pid, uid, user name, and group name, as well as socket address of the remote peer, see \fBExamples\fP below. .sp On the other hand, transport\-independent attributes include client\(aqs SELinux context (if enabled on the host) and SASL username (if SASL authentication is enabled within daemon). .sp \fBExamples:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX # virt\-admin client\-info libvirtd 1 id : 1 connection_time: 2016\-05\-03 13:27:04+0200 transport : unix readonly : yes unix_user_id : 0 unix_user_name : root unix_group_id : 0 unix_group_name: root unix_process_id: 10201 # virt\-admin client\-info libvirtd 2 id : 2 connection_time: 2016\-05\-03 13:30:33+0200 transport : tcp readonly : no sock_addr : 127.0.0.1:57060 .EE .UNINDENT .UNINDENT .SS client\-disconnect .sp \fBSyntax:\fP .INDENT 0.0 .INDENT 3.5 .sp .EX client\-disconnect server client .EE .UNINDENT .UNINDENT .sp Close a connection originating from \fIclient\fP\&. The \fIserver\fP argument specifies the name of the server \fIclient\fP is currently connected to. .SH ENVIRONMENT .sp The following environment variables can be set to alter the behaviour of \fBvirt\-admin\fP .INDENT 0.0 .IP \(bu 2 VIRT_ADMIN_DEBUG=<0 to 4> .sp Turn on verbose debugging of virt\-admin commands. Valid levels are .INDENT 2.0 .IP \(bu 2 VIRT_ADMIN_DEBUG=0 .sp DEBUG \- Messages at ALL levels get logged .IP \(bu 2 VIRT_ADMIN_DEBUG=1 .sp INFO \- Logs messages at levels INFO, NOTICE, WARNING and ERROR .IP \(bu 2 VIRT_ADMIN_DEBUG=2 .sp NOTICE \- Logs messages at levels NOTICE, WARNING and ERROR .IP \(bu 2 VIRT_ADMIN_DEBUG=3 .sp WARNING \- Logs messages at levels WARNING and ERROR .IP \(bu 2 VIRT_ADMIN_DEBUG=4 .sp ERROR \- Messages at only ERROR level gets logged. .UNINDENT .IP \(bu 2 VIRT_ADMIN_LOG_FILE=\(ga\(gaLOGFILE\(ga\(ga .sp The file to log virt\-admin debug messages. .IP \(bu 2 LIBVIRT_ADMIN_DEFAULT_URI .sp The daemon whose admin server to connect to by default. Set this to a URI, in the same format as accepted by the \fBconnect\fP option. This overrides the default URI set in any client config file. .IP \(bu 2 VIRT_ADMIN_HISTSIZE .sp The number of commands to remember in the command history. The default value is 500. .IP \(bu 2 LIBVIRT_DEBUG=LEVEL .sp Turn on verbose debugging of all libvirt API calls. Valid levels are .INDENT 2.0 .IP \(bu 2 LIBVIRT_DEBUG=1 .sp Messages at level DEBUG or above .IP \(bu 2 LIBVIRT_DEBUG=2 .sp Messages at level INFO or above .IP \(bu 2 LIBVIRT_DEBUG=3 .sp Messages at level WARNING or above .IP \(bu 2 LIBVIRT_DEBUG=4 .sp Messages at level ERROR or above .UNINDENT .UNINDENT .sp For further information about debugging options consult \fI\%https://libvirt.org/logging.html\fP .SH AUTHORS .sp Please refer to the AUTHORS file distributed with libvirt. .SH BUGS .sp Please report all bugs you discover. This should be done via either: .INDENT 0.0 .IP 1. 3 the mailing list .sp \fI\%https://libvirt.org/contact.html\fP .IP 2. 3 the bug tracker .sp \fI\%https://libvirt.org/bugs.html\fP .UNINDENT .sp Alternatively, you may report bugs to your software distributor / vendor. .SH COPYRIGHT .sp Copyright (C) 2015 Red Hat, Inc., and the authors listed in the libvirt AUTHORS file. .SH LICENSE .sp \fBvirt\-admin\fP is distributed under the terms of the GNU LGPL v2+. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .SH SEE ALSO .sp virsh(1), virt\-xml\-validate(1), virt\-host\-validate(1), \fI\%https://libvirt.org/\fP .\" Generated by docutils manpage writer. .