Skip to content
Commits on Source (8)
# Contribute to virt-manager
## Bug reporting
The preferred place for bug reports is bugzilla.redhat.com. This
is documented more at https://virt-manager.org/bugs/
Small issues can be reported in the
[github issue tracker](https://github.com/virt-manager/virt-manager/issues).
Anything that's non-trivial, or is a feature request, should be filed in
bugzilla.
Please only file issues if they apply to the latest version of
virt-manager. If you are using an older version from a distro,
please file a bug with them.
When filing a bug, please reproduce the issue with the `--debug`
flag passed to the tool and attach the full output in the bug
report.
## Writing patches
The following commands will be useful for anyone writing patches:
```sh
./setup.py test # Run local unit test suite
./setup.py pylint # Run pylint/pycodestyle checking
```
Any patches shouldn't change the output of 'test' or 'pylint'. Depending
on what version of libvirt or pylint is installed, you may see some
pre-existing errors from these commands. The important thing is that
any changes you make do not add additional errors.
The 'pylint' command requires [`pylint`](https://github.com/PyCQA/pylint)
and [`pycodestyle`](https://github.com/pycqa/pycodestyle) to be installed.
If [`codespell`](https://github.com/codespell-project/codespell) is installed,
it will be invoked as well.
One useful way to manually test virt-manager's UI is using libvirt's
unit test driver. From the source directory, Launch virt-manager like:
```sh
./virt-manager --connect test://$PWD/tests/testdriver.xml
```
This testdriver has many fake XML definitions that can be used to see each bit
of virt-manager's UI. It also enables testing the various wizards without
having to alter your host virt config.
The command line tools can be tested similarly. To run a virt-install
command that won't alter your host config, you can do:
```sh
./virt-install --connect test:///default --debug ...
```
`--connect test:///default` here is libvirt's built in unit test driver.
We use [glade-3](https://glade.gnome.org/) for building most of virt-manager's
UI. See the files in the ui/ directory.
## Submitting patches
The [virt-manager git repo](https://github.com/virt-manager/virt-manager)
is hosted on github. Small patches are acceptable via github pull-request,
but anything non-trivial should be sent to the
[virt-tools-list mailing list](https://www.redhat.com/mailman/listinfo/virt-tools-list).
Sending patches using `git send-email` is preferred, but `git format-patch`
output attached to an email is also fine.
## Introductory tasks
Extending the virt-install or virt-xml command line is a good introductory
task for virt-manager. See [the wiki](https://github.com/virt-manager/virt-manager/wiki)
for both a patch tutorial, and a list of libvirt `<domain>` XML options
that still need to be added to our command line.
## Translations
Translations are handled at `fedora.zanata.org`. Please register for a Fedora
account and request access to a translation team, as described at
[Translate on Zanata](https://fedoraproject.org/wiki/L10N/Translate_on_Zanata),
and contribute at
[virt-manager at Zanata](https://fedora.zanata.org/project/view/virt-manager/).
## Advanced testing
There's a few standalone specialty tests:
```sh
./setup.py test_ui # dogtail UI test suite. This takes over your desktop
./setup.py test_urls # Test fetching media from live distro URLs
./setup.py test_initrd_inject # Test live virt-install --initrd-inject
```
All test 'test*' commands have a `--debug` option if you are hitting problems. For more options, see `./setup.py test --help`.
# HACKING
The following commands will be useful for anyone writing patches:
```sh
./setup.py test # Run local unit test suite
./setup.py pylint # Run a pylint script against the codebase
./setup.py codespell # Run a codespell script against the codebase
```
Any patches shouldn't change the output of 'test', 'pylint' or 'codespell'. The
'pylint' requires [`pylint`](https://github.com/PyCQA/pylint) and
[`pycodestyle`](https://github.com/pycqa/pycodestyle) to be installed. The
'codespell' requires
[`codespell`](https://github.com/codespell-project/codespell) to be installed.
Our pylint script uses a blacklist rather than a whitelist approach,
so it could throw some false positives or useless messages. If you think
your patch exposes one of these, bring it up on the mailing list.
'test*' have a `--debug` option if you are hitting problems.
For more options, use `./setup.py test --help`.
One useful way to manually test virt-manager's UI is using libvirt's
unit test driver. From the source directory, Launch virt-manager like:
```sh
virt-manager --connect test://$PWD/tests/testdriver.xml
```
This testdriver has many fake XML definitions that can be used to see each bit
of virt-manager's UI. It also enables testing the various wizards without
having to alter your host virt config.
Also, there's a few standalone specialty tests:
```sh
./setup.py test_urls # Test fetching media from distro URLs
./setup.py test_initrd_inject # Test --initrd-inject
```
We use [glade-3](https://glade.gnome.org/) for building virt-manager's UI.
It is recommended you have a fairly recent version of `glade-3`. If a small UI
change seems to rewrite the entire glade file, you likely have a too old
(or too new :) glade version.
## Submitting patches
Patches should be developed against a git checkout and **not** a source
release(see [git repository](https://github.com/virt-manager/virt-manager)).
Patches should be sent to the
[mailing list](https://www.redhat.com/mailman/listinfo/virt-tools-list).
Using git format-patch/send-email is preferred, but an attachment with
format-patch output is fine too.
Small patches are acceptable via github pull-request, but anything
non-trivial should be sent to the mailing list.
## Translations
Translations are handled at `fedora.zanata.org`. Please register for a Fedora
account and request access to a translation team, as described at
[Translate on Zanata](https://fedoraproject.org/wiki/L10N/Translate_on_Zanata).
And contribute to
[virt-manager at Zanata](https://fedora.zanata.org/project/view/virt-manager/).
......@@ -30,13 +30,20 @@ A detailed dependency list can be found in
Minimum version requirements of major components:
- python >= 3.3
- gtk3 >= 3.14
- python >= 3.4
- gtk3 >= 3.22
- libvirt-python >= 0.6.0
- pygobject3 >= 3.14
- pygobject3 >= 3.22
- libosinfo >= 0.2.10
- gtksourceview >= 3
On Debian or Ubuntu based distributions, you need to install the
`gobject-introspection` bindings for some dependencies like `libvirt-glib`
and `libosinfo`. Look for package names that start with `'gir'`, for example
`gir1.2-libosinfo-1.0`.
## Optional software
`virt-manager` can optionally use [libguestfs](http://libguestfs.org/)
for inspecting the guests. For this, `python-libguestfs` >= 1.22 is needed.
# to be included/excluded from the tarball produced by sdist
include COPYING HACKING.md INSTALL.md NEWS.md README.md
include COPYING CONTRIBUTING.md INSTALL.md NEWS.md README.md
include MANIFEST.in
include setup.py
include virt-*
......@@ -10,7 +10,6 @@ recursive-include po *
recursive-include tests *
recursive-include ui *
recursive-include virtManager *
recursive-include virtcli *
recursive-include virtconv *
recursive-include virtinst *
global-exclude *.pyc
# Virtual Machine Manager News
## Release 2.2.1 (July 03, 2019)
- CVE-2019-10183: Replace --unattended user-password and admin-password with
user-password-file and admin-password-file (Fabiano Fidêncio)
- Consistent --memballoon default across non-x86 (Andrea Bolognani)
- virt-install: add --numatune memnode.* (Athina Plaskasoviti)
- Drop hard dep on gtksourceview4, gtksourceview3 is fine as well
## Release 2.2.0 (June 17, 2019)
- libvirt XML viewing and editing UI for new and existing domain, pools,
volumes, networks
- virt-install: libosinfo --unattended support (Fabiano Fidêncio, Cole
Robinson)
- Improve CPU model security defaults (Pavel Hrdina)
- virt-install: new --install option. Ex: virt-install --install fedora29
- virt-install: new --install kernel=,initrd=
- virt-install: --disk, --memory, --name defaults from libosinfo (Fabiano
Fidêncio, Cole Robinson)
- virt-install: add device suboption aliases which consistently match
libvirt XML naming
- virt-xml: new --start, --no-define options (Marc Hartmayer)
- virt-install: Add driver_queues argument to --controller (Vasudeva Kamath)
- RISC-V support (Andrea Bolognani)
- Device default improvements for non-x86 KVM (Andrea Bolognani)
- Redesigned 'New Network' wizard
- libguestfs inspection improvements (Pino Toscano)
- virt-install: Add support for xenbus controller (Jim Fehlig)
- cli: Add --disk wwn=,rawio= (Athina Plaskasoviti)
- cli: Add --memballoon autodeflate=,stats.period= (Athina Plaskasoviti)
- cli: Add --iothreads (Athina Plaskasoviti)
- cli: Add --numatune memory.placement (Athina Plaskasoviti)
- cli: Add --launchSecurity option (Erik Skultety)
- cli: Fill in --memorybacking options
- cli: --smartcard: support database= and certificate[0-9]*=
- cli: --sysinfo: Add chasis suboptions
- cli: --metadata: add genid= and genid_enable=
- cli: --vcpus: add vcpus.vcpu[0-9]* config
- cli: fill in all common char source options for --serial, --parellel,
--console, --channel, --smartcard, --rng, --redirdev
## Release 2.1.0 (February 03, 2019)
- Bash autocompletion support (Lin Ma, Cole Robinson)
- UI and command line --vsock support (Slavomir Kaslev)
- virt-xml: Add --os-variant option (Andrea Bolognani)
- virt-install: use libosinfo cpu, mem, disk size defaults (Fabiano
Fidencio)
- virt-install: Better usage of libosinfo -unknown distro IDs (Fabiano
Fidencio)
- virt-install: More usage of libosinfo for ISO --location detection
- virt-install: Add --location LOCATION,kernel=X,initrd=Y for pointing to
kernel/initrd in media that virt-install/libosinfo fails to detect
## Release 2.0.0 (October 15, 2018)
- Finish port to Python 3 (Radostin Stoyanov, Cole Robinson)
- Improved VM defaults for supported OS: q35 PCIe, usb3, CPU host-model
......
Metadata-Version: 1.0
Name: virt-manager
Version: 2.0.0
Version: 2.2.1
Summary: UNKNOWN
Home-page: http://virt-manager.org
Author: Cole Robinson
......
# Virtual Machine Manager
This application provides a graphical tool for managing virtual machines
via the [libvirt](https://libvirt.org) library.
The front end of the application uses the GTK / Glade libraries for
all user interaction components. The back end uses libvirt for managing
Qemu/KVM and Xen virtual machines, as well as LXC containers. The UI is
primarily tested with KVM, but is intended to be reasonably portable to any
virtualization backend libvirt supports.
`virt-manager` is a graphical tool for managing virtual machines
via [libvirt](https://libvirt.org). Most usage is with QEMU/KVM
virtual machines, but Xen and libvirt LXC containers are well
supported. Common operations for any libvirt driver should work.
Several command line tools are also provided:
......@@ -17,7 +13,12 @@ Several command line tools are also provided:
- `virt-convert`: Convert VMX or OVF configs to libvirt virtual machines
For dependency info and installation instructions, see the
[INSTALL.md](INSTALL.md) file.
[INSTALL.md](INSTALL.md) file. If you just want to quickly test the
code from a git checkout, you can launch any of the commands like:
```sh
./virt-manager --debug ...
```
## Contact
......@@ -26,8 +27,8 @@ For dependency info and installation instructions, see the
mailing list.
- For IRC we use #virt on OFTC.
- For bug reporting info, see
[BugReporting](https://virt-manager.org/page/BugReporting).
[virt-manager bug reporting](https://virt-manager.org/bugs).
- There are further project details on the
[virt-manager](https://virt-manager.org/) website.
- See the [HACKING.md](HACKING.md) file for info about submitting patches or
- See the [CONTRIBUTING.md](CONTRIBUTING.md) file for info about submitting patches or
contributing translations.
#!/bin/bash
# Run something, muting output or redirecting it to the debug stream
# depending on the value of _ARC_DEBUG.
__python_argcomplete_run() {
if [[ -z "$_ARC_DEBUG" ]]; then
"$@" 8>&1 9>&2 1>/dev/null 2>&1
else
"$@" 8>&1 9>&2 1>&9 2>&1
fi
}
_python_argcomplete() {
if [[ "$COMP_WORDBREAKS" != *,* ]]; then
COMP_WORDBREAKS="${COMP_WORDBREAKS},"
fi
local IFS=$'\013'
local SUPPRESS_SPACE=0
if compopt +o nospace 2> /dev/null; then
SUPPRESS_SPACE=1
fi
COMP_WORDS[4]=""
COMPREPLY=( $(IFS="$IFS" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
COMP_TYPE="$COMP_TYPE" \
_ARGCOMPLETE_COMP_WORDBREAKS="\"'><;|&(:" \
_ARGCOMPLETE=1 \
_ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \
__python_argcomplete_run "$1") )
if [[ $? != 0 ]]; then
unset COMPREPLY
elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "$COMPREPLY" =~ [=/:]$ ]]; then
compopt -o nospace
fi
}
complete -o nospace -o default -F _python_argcomplete ::SCRIPTNAME::
......@@ -35,6 +35,12 @@
<summary>Custom connection description</summary>
<description>Custom connection description, used in the manager window. If empty, the app generates a default on demand.</description>
</key>
<key name="window-size" type="(ii)">
<default>(-1, -1)</default>
<summary>Conn details window dimensions</summary>
<description>Connection details window dimensions</description>
</key>
</schema>
......@@ -47,6 +53,12 @@
<description>Show system tray icon while app is running</description>
</key>
<key name="xmleditor-enabled" type="b">
<default>false</default>
<summary>Enable XML editting UI</summary>
<description>Enable XML editting UI</description>
</key>
<key name="enable-libguestfs-vm-inspection" type="b">
<default>true</default>
<summary>Enable libguestfs VM inspection</summary>
......
......@@ -30,6 +30,13 @@
</screenshots>
<url type="homepage">https://www.virt-manager.org/</url>
<url type="bugtracker">https://bugzilla.redhat.com/enter_bug.cgi?product=Virtualization%20Tools&amp;component=virt-manager</url>
<url type="translate">https://fedora.zanata.org/project/view/virt-manager/</url>
<update_contact>virt-tools-list@redhat.com</update_contact>
<translation type="gettext">virt-manager</translation>
<keywords>
<keyword>virtualization</keyword>
<keyword>libvirt</keyword>
<keyword>qemu</keyword>
<keyword>kvm</keyword>
</keywords>
</component>
virt-manager (1:2.2.1-1) unstable; urgency=medium
* Drop superfluous python-requests dependency (Closes: #921618)
* tests: Mark test as superficial
* New upstream version 2.2.1
(Closes: #933707)
* Rediff patches
* Drop /u/share/virtcli from installed dirs
* Switch to debhelper 12
* Install app-data
* Install bash completions
-- Guido Günther <agx@sigxcpu.org> Thu, 26 Sep 2019 17:30:36 +0200
virt-manager (1:2.0.0-3) unstable; urgency=medium
* Mark autopkgtest scripts executable
......
......@@ -8,7 +8,7 @@ Vcs-Git: https://salsa.debian.org/libvirt-team/virt-manager.git
Vcs-Browser: https://salsa.debian.org/libvirt-team/virt-manager
Homepage: http://virt-manager.org/
Build-Depends:
debhelper (>= 10~),
debhelper (>= 12~),
dh-python,
intltool,
libglib2.0-bin,
......
......@@ -13,7 +13,7 @@ so we don't have to worry about picking up the wrong version
6 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/setup.py b/setup.py
index 2e1215c..17c497f 100755
index 275087b..1f7aa98 100755
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,8 @@
......@@ -24,11 +24,11 @@ index 2e1215c..17c497f 100755
# See the COPYING file in the top-level directory.
-
import glob
import fnmatch
import os
import sys
if sys.version_info.major < 3:
print("virt-manager is python3 only. Run this as ./setup.py")
diff --git a/virt-clone b/virt-clone
index d1eedee..823990d 100755
index 472bd3e..79355da 100755
--- a/virt-clone
+++ b/virt-clone
@@ -1,4 +1,4 @@
......@@ -38,7 +38,7 @@ index d1eedee..823990d 100755
# Copyright(c) FUJITSU Limited 2007.
#
diff --git a/virt-convert b/virt-convert
index 1b7b796..6f44902 100755
index df7fa84..ca4f212 100755
--- a/virt-convert
+++ b/virt-convert
@@ -1,4 +1,4 @@
......@@ -46,9 +46,9 @@ index 1b7b796..6f44902 100755
+#!/usr/bin/python3
#
# Copyright 2008, 2013, 2014 Red Hat, Inc.
# Joey Boggs <jboggs@redhat.com>
#
diff --git a/virt-install b/virt-install
index a7f247f..e09553e 100755
index af6c75b..0cd5da7 100755
--- a/virt-install
+++ b/virt-install
@@ -1,4 +1,4 @@
......@@ -58,7 +58,7 @@ index a7f247f..e09553e 100755
# Copyright 2005-2014 Red Hat, Inc.
#
diff --git a/virt-manager b/virt-manager
index 15d5109..b608ff7 100755
index ca6a593..b4b7eb2 100755
--- a/virt-manager
+++ b/virt-manager
@@ -1,4 +1,4 @@
......@@ -68,7 +68,7 @@ index 15d5109..b608ff7 100755
# Copyright (C) 2006, 2014 Red Hat, Inc.
# Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com>
diff --git a/virt-xml b/virt-xml
index 9bdde95..b8fddac 100755
index 71445c9..de5cd2d 100755
--- a/virt-xml
+++ b/virt-xml
@@ -1,4 +1,4 @@
......@@ -76,4 +76,4 @@ index 9bdde95..b8fddac 100755
+#!/usr/bin/python3
#
# Copyright 2013-2014 Red Hat, Inc.
# Cole Robinson <crobinso@redhat.com>
#
usr/bin/virt-manager
usr/share/man/man1/virt-manager.1
usr/share/icons/
usr/share/appdata/virt-manager.appdata.xml
usr/share/applications
usr/share/glib-2.0
usr/share/locale
......
......@@ -2,6 +2,7 @@ usr/bin/virt-clone
usr/bin/virt-convert
usr/bin/virt-install
usr/bin/virt-xml
usr/share/bash-completion/completions/
usr/share/man/man1/virt-install.1
usr/share/man/man1/virt-convert.1
usr/share/man/man1/virt-clone.1
......@@ -10,7 +11,5 @@ usr/share/virt-manager/virt-clone
usr/share/virt-manager/virt-convert
usr/share/virt-manager/virt-install
usr/share/virt-manager/virt-xml
usr/share/virt-manager/virtcli
usr/share/virt-manager/virtconv
usr/share/virt-manager/virtinst
......@@ -100,6 +100,13 @@ Force cloning the passed disk target ('hdc', 'sda', etc.). By default,
C<virt-clone> will skip certain disks, such as those marked 'readonly' or
'shareable'.
=item B<--skip-copy> TARGET
Skip cloning the passed disk target ('hdc', 'sda', etc.). By default,
C<virt-clone> will clone certain disk images, typically read/write
devices. Use this to skip copying of a specific device, so the new
VM uses the same storage path as the original VM.
=item B<--nonsparse>
Fully allocate the new storage if the path being cloned is a sparse file.
......@@ -203,7 +210,7 @@ new guest can do a filesystem resize when it boots.
=head1 BUGS
Please see https://virt-manager.org/page/BugReporting
Please see L<https://virt-manager.org/bugs>
=head1 COPYRIGHT
......
......@@ -127,7 +127,7 @@ Convert the specified .vmx file. Any references disk images must be in the same
=head1 BUGS
Please see https://virt-manager.org/page/BugReporting
Please see L<https://virt-manager.org/bugs>
=head1 COPYRIGHT
......
This diff is collapsed.
......@@ -17,7 +17,7 @@ Each B<virt-xml> invocation requires 3 things: name of an existing domain to alt
--add-device: Append a new device definition to the XML
--remove-device: Remove an existing device definition
--edit: Edit an existing XML block
--build-xml: Just build the requested XML block and print it (no domain or input XML are required here).
--build-xml: Just build the requested XML block and print it. No domain or input are required here, but it's recommended to provide them, so virt-xml can fill in optimal defaults.
An XML change is one instance of any of the XML options provided by virt-xml, for example --disk or --boot.
......@@ -118,6 +118,8 @@ This option will error if specified with a non-device XML option (see --edit sec
Just build the specified XML, and print it to stdout. No input domain or input XML is required. Example: '--build-xml --disk DISK-OPTIONS' will just print the new <disk> device.
However if the generated XML is targeted for a specific domain, it's recommended to pass it to virt-xml, so the tool can set optimal defaults.
This option will error if specified with an XML option that does not map cleanly to a specific XML block, like --vcpus or --memory.
=back
......@@ -137,12 +139,20 @@ If the specified domain is running, attempt to alter the running VM configuratio
Keep in mind, most XML properties and devices do not support live update operations, so don't expect it to succeed in all cases.
Note that --update implies --define: it can't be used in isolation.
By default this also implies B<--define>.
=item B<--define>
Define the requested XML change. This is typically the default if no output option is specified, but if a --print option is specified, --define is required to force the change.
=item B<--no-define>
Explicitly do not define the XML. For example if you only want to alter the runtime state of a VM, combine this with B<--update>.
=item B<--start>
Start the VM after performing the requeseted changes. If combined with --no-define, this will create transient VM boot with the requested changes.
=item B<--print-diff>
Print the generated XML change in unified diff format. If only this output option is specified, all other output options are disabled and no persistent change is made.
......@@ -160,6 +170,30 @@ Before defining or updating the domain, show the generated XML diff and interact
=head1 GUEST OS OPTIONS
=over 4
=item B<--os-variant> OS_VARIANT
Optimize the guest configuration for a specific operating system (ex.
'fedora29', 'rhel7', 'win10'). While not required, specifying this
options is HIGHLY RECOMMENDED, as it can greatly increase performance
by specifying virtio among other guest tweaks.
If the guest has been installed using virt-manager version 2.0.0 or newer,
providing this information should not be necessary, as the OS variant will
have been stored in the guest configuration during installation and virt-xml
will retrieve it from there automatically.
Use the command "osinfo-query os" to get the list of the accepted OS
variants.
=back
=head1 XML OPTIONS
=over 4
......@@ -178,19 +212,39 @@ Before defining or updating the domain, show the generated XML diff and interact
=item B<--cpu>
=item B<--security>
=item B<--iothreads>
=item B<--seclabel>
=item B<--cputune>
=item B<--numatune>
=item B<--memtune>
=item B<--blkiotune>
=item B<--memorybacking>
=item B<--features>
=item B<--clock>
=item B<--pm>
=item B<--events>
=item B<--resources>
=item B<--sysinfo>
=item B<--qemu-commandline>
=item B<--launchSecurity>
=item B<--boot>
=item B<--filesystem>
=item B<--idmap>
=item B<--controller>
......@@ -206,6 +260,8 @@ Before defining or updating the domain, show the generated XML diff and interact
=item B<--hostdev>
=item B<--filesystem>
=item B<--sound>
=item B<--watchdog>
......@@ -226,8 +282,6 @@ Before defining or updating the domain, show the generated XML diff and interact
=item B<--memdev>
=item B<--qemu-commandline>
These options alter the XML for a single class of XML elements. More complete documentation is found in L<virt-install(1)>.
Generally these options map pretty straightforwardly to the libvirt XML, documented at L<https://libvirt.org/formatdomain.html>
......@@ -331,6 +385,12 @@ Create a 10G qcow2 disk image and attach it to 'fedora18' for the next VM startu
# virt-xml fedora18 --add-device \
--disk /var/lib/libvirt/images/newimage.qcow2,format=qcow2,size=10
Same as above, but ensure the disk is attached to the most appropriate bus
for the guest OS by providing information about it on the command line:
# virt-xml fedora18 --os-variant fedora18 --add-device \
--disk /var/lib/libvirt/images/newimage.qcow2,format=qcow2,size=10
Hotunplug the disk vdb from the running domain 'rhel7':
# virt-xml rhel7 --update --remove-device --disk target=vdb
......@@ -347,6 +407,9 @@ Add qemu command line passthrough:
# virt-xml f25 --edit --confirm --qemu-commandline="-device FOO"
Use boot device 'network' for a single transient boot:
# virt-xml myvm --no-define --start --edit --boot network
=head1 CAVEATS
......@@ -354,7 +417,7 @@ Virtualization hosts supported by libvirt may not permit all changes that might
=head1 BUGS
Please see https://virt-manager.org/page/BugReporting
Please see L<https://virt-manager.org/bugs>
=head1 COPYRIGHT
......