Import Upstream version 4.1.0
This commit is contained in:
parent
023c8457f1
commit
5d006331c9
|
@ -1,22 +1,32 @@
|
|||
# Contribute to virt-manager
|
||||
|
||||
## Run code from git
|
||||
|
||||
Generally virt-* tools can be run straight from git. For example
|
||||
for virt-manager:
|
||||
|
||||
```
|
||||
git clone https://github.com/virt-manager/virt-manager
|
||||
cd virt-manager
|
||||
./virt-manager --debug
|
||||
```
|
||||
|
||||
The other tools like `virt-install` should work similarly. This
|
||||
expects you already have a distro provided version of virt-manager
|
||||
installed which pulled in all the necessary dependencies. If not,
|
||||
see [INSTALL.md](INSTALL.md) for more hints about finding the
|
||||
correct dependencies.
|
||||
|
||||
## Bug reporting
|
||||
|
||||
The preferred place for bug reports is bugzilla.redhat.com. This
|
||||
is documented more at https://virt-manager.org/bugs/
|
||||
Bug reports should go to our [github issue tracker](https://github.com/virt-manager/virt-manager/issues).
|
||||
|
||||
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.
|
||||
The bug tracker is for issues affecting the latest code only.
|
||||
If you are using a distro provided package like from Ubuntu or
|
||||
Fedora, please file a bug in their bug tracker.
|
||||
|
||||
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.
|
||||
If you suspect the bug also affects upstream code, please confirm
|
||||
it by running the latest code using the steps above.
|
||||
|
||||
|
||||
## Writing patches
|
||||
|
@ -24,11 +34,11 @@ report.
|
|||
The following commands will be useful for anyone writing patches:
|
||||
|
||||
```sh
|
||||
./setup.py test # Run local unit test suite
|
||||
pytest # Run local unit test suite
|
||||
./setup.py pylint # Run pylint/pycodestyle checking
|
||||
```
|
||||
|
||||
Any patches shouldn't change the output of 'test' or 'pylint'. Depending
|
||||
Any patches shouldn't change the output of 'pytest' 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.
|
||||
|
@ -38,6 +48,11 @@ 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.
|
||||
|
||||
Patches to `virtinst/` code should ideally not regress code coverage
|
||||
testing. Run `pytest --cov` to see a coverage report
|
||||
before and after your contribution, and ensure no new lines show up.
|
||||
Maintainers can help you out if you aren't sure how to test your code.
|
||||
|
||||
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
|
||||
|
@ -72,6 +87,15 @@ Sending patches using `git send-email` is preferred, but `git format-patch`
|
|||
output attached to an email is also fine.
|
||||
|
||||
|
||||
## UI design
|
||||
|
||||
If you are planning to add a feature to virt-manager's UI, please read
|
||||
[DESIGN.md](DESIGN.md) first. Features that do not fit the goals specified
|
||||
in that document may be rejected. If you are unsure if your feature is a
|
||||
good fit for virt-manager, please ask on the mailing list before you start
|
||||
coding!
|
||||
|
||||
|
||||
## Introductory tasks
|
||||
|
||||
Extending the virt-install or virt-xml command line is a good introductory
|
||||
|
@ -82,11 +106,11 @@ 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/).
|
||||
Translations are handled through the Weblate instance hosted by the Fedora Project.
|
||||
|
||||
* https://translate.fedoraproject.org/projects/virt-manager/virt-manager/
|
||||
* More info about translating as part of Fedora: https://fedoraproject.org/wiki/L10N/Translate_on_Weblate
|
||||
* The up to date translation `.pot` template is stored in the [`translations` branch](https://github.com/virt-manager/virt-manager/tree/translations) and synced with the `main` branch before release.
|
||||
|
||||
|
||||
## Advanced testing
|
||||
|
@ -94,9 +118,10 @@ and contribute at
|
|||
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
|
||||
pytest --uitests # dogtail UI test suite. This takes over your desktop
|
||||
pytest tests/test_urls.py # Test fetching media from live distro URLs
|
||||
pytest tests/test_inject.py # 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`.
|
||||
To see full debug output from test runs, use
|
||||
`pytest --capture=no --log-level=debug ...`
|
||||
|
|
14
COPYING
14
COPYING
|
@ -1,12 +1,12 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
|
@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
|
@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
|||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
|
@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
## virt-manager UI design philosophy
|
||||
|
||||
**virt-manager** is a UI toolbox-style frontend for libvirt. It provides UI access to common virt management tasks and operations. virt-manager aims to provide a simple UI, but not too simple that it excludes valid usecases. virt-manager prioritizes stability over features. Given the user definitions defined below, our goals are:
|
||||
|
||||
* **_Basic virt users_** should be able to meet their needs with virt-manager.
|
||||
* **_Intermediate virt users_** should find virt-manager sufficiently flexible for their needs.
|
||||
* **_Advanced virt users_** will not find explicit UI support for their advanced use cases, but virt-manager should still function correctly in the face of their manually configured advanced virt usage. virt-manager should not get in their way.
|
||||
|
||||
Here are some things that virt-manager explicitly is not:
|
||||
|
||||
* **gnome-boxes**: a heavily desktop integrated VM manager with an emphasis on UI design and simplifying virt management. They prioritize a seamless designed experience over flexibility, our goals are different.
|
||||
* **virt-viewer/remote-viewer**, **vncviewer**: our graphical VM window should 'just work' for most needs but any advanced console configuration is left up to these other better suited tools.
|
||||
* **VirtualBox**, **VMWare Workstation**: It's a nice idea to aim to be the equivalent of those apps for the QEMU+KVM+Libvirt stack. But to get there would require a level of resource investment that is unlikely to ever happen.
|
||||
* **oVirt**, **Openstack**: virt-manager does not aim to support management of many hosts with many VMs. virt-manager won't reject this case and we try within reason to keep it working. But the UI is not designed for it and we will not change the UI to facilitate these style of usecases.
|
||||
|
||||
## How do we evaluate UI changes
|
||||
|
||||
When is it worth it to expose something in the UI? Here's some criteria we will use:
|
||||
|
||||
* **How many users do we expect will use it**: This is handwavy of course but some things come up in email/IRC discussion regularly, and some are mentioned once in 5 years.
|
||||
|
||||
* **How critical is it for users who need/want it**: if it's an absolute blocker just to get a working config for some people, that can influence the discussion
|
||||
|
||||
* **How self explanatory is the feature**: 'Enable 3D acceleration' is fairly self explanatory. Disk io native vs threads, not so much.
|
||||
|
||||
* **How dangerous or difficult to use is the feature**: If it works in only specific cases or renders the VM unbootable for certain scenarios, this matters.
|
||||
|
||||
* **How much work is it to maintain, test**
|
||||
|
||||
* **How much work is it to implement**: If something requires significant app specific logic on top of libvirt, libosinfo, or spice-gtk that would also be useful to other virt apps, it is suspect. We should be aiming to share common functionality
|
||||
|
||||
|
||||
## User definitions
|
||||
|
||||
### Basic virt user
|
||||
|
||||
They know little or nothing about libvirt, qemu, and kvm, but they understand the high level concept of a virtual machine. They have a Windows or Linux distro ISO and they want to create a VM and interact with it graphically. They should be able to figure out how to do that by running virt-manager and following the UI. The defaults we provide for new VMs should be sufficient for their needs.
|
||||
|
||||
After the VM is installed, the UI should facilitate intuitive UI tasks like:
|
||||
|
||||
* lifecycle operations: start/stop/pause the VM; save, snapshot the VM; delete, clone the VM
|
||||
* rename the VM; change the VM title or description
|
||||
* eject/insert CDROM media; change VM boot order
|
||||
* increase VM memory
|
||||
* attach a host USB device to the VM; possibly add an additional disk to the VM
|
||||
* graphical operations like send a keycombo, screenshot
|
||||
|
||||
### Intermediate virt user
|
||||
|
||||
They know more about virt in general but we do not assume they have ever edited libvirt XML or run the qemu command line. They are a more intermediate tech user anyways. They may know about less standard virt features and they want to enable them for their VMs. Or they are using VMs as part of a specific workflow, possibly for a development environment, or hosting personal services on their own network, or managing VMs on a remote host. This is the fuzzy area. We want to support these people but each request needs to be handled on a case by case basis.
|
||||
|
||||
Here's some of the things the current UI supports that fit this bucket:
|
||||
|
||||
* Management of remote virt hosts
|
||||
* Management of non-qemu/kvm libvirt drivers: lxc, vz, xen, bhyve
|
||||
* Support for non-x86 VM creation: aarch64, armv7l, ppc64, s390x
|
||||
* Change VM CPU model or mode
|
||||
* UEFI config for new VMs
|
||||
* VM direct kernel/initrd boot
|
||||
* VM serial console access
|
||||
* VM use of network bridge or macvtap
|
||||
* Spice/virgl 3D acceleration usage
|
||||
* Libvirt storage pool management
|
||||
* Libvirt virtual network management
|
||||
* Ideally every VM UI edit operation should be justifiable in this context
|
||||
|
||||
### Advanced virt user or usecase
|
||||
|
||||
An advanced virt user likely has some experience with libvirt XML or the qemu command line. They may know that they need some specific libvirt XML value for their VMs. They may be running virt in an environment that depends on non-trivial non-standard host configuration.
|
||||
|
||||
We want virt-manager to still be useful to these users for fulfilling basic and intermediate needs, but not get in the way or prevent usage of their advanced config, within reason.
|
||||
|
||||
Some examples:
|
||||
|
||||
* **usecase**: managing many hosts and many VMs
|
||||
* **usecase**: require tweaking anything but the most standard <domain> performance options
|
||||
* **usecase**: generally anything that requires special host or guest configuration outside virt-manager
|
||||
* **user**: Generally anybody that knows the qemu command line or specific XML config options they want
|
||||
|
||||
|
||||
## Previously rejected/removed UI elements
|
||||
|
||||
* VM properties
|
||||
* [disk driver io=threads|native](https://github.com/virt-manager/virt-manager/commit/a162a3b845eee24f66baf63b3aeb82523b274b0d)
|
||||
* [disk scsi reservations](https://github.com/virt-manager/virt-manager/commit/b583ea7e66cd0b7117971cf55365355f78dd3670)
|
||||
* [disk detect_zeroes](https://github.com/virt-manager/virt-manager/commit/8377b7f7b69ed0716fbe2c2818979a273bcb7567)
|
||||
* [graphics spice TLS port](https://github.com/virt-manager/virt-manager/commit/bd82ef65292cc47cffc27b8f67d7987679c61bf3)
|
||||
* [graphics keymap selection](https://github.com/virt-manager/virt-manager/commit/7251ea25c2936b69284366abc787f1b33c199b15)
|
||||
* [network virtualport](https://github.com/virt-manager/virt-manager/commit/b4b497e28f3f3e32a05f4cf78c21f07022ee824b)
|
||||
* [Any explicit `<clock>`/`<timer>` config](https://www.redhat.com/archives/virt-tools-list/2019-January/thread.html#00041)
|
||||
* [Raw `<genid>` config](https://www.redhat.com/archives/virt-tools-list/2019-April/msg00001.html)
|
||||
* [Fine grained `<cpu><feature>` config](https://www.redhat.com/archives/virt-tools-list/2014-January/msg00180.html)
|
||||
* [Host network management via libvirt interface APIs](https://blog.wikichoon.com/2019/04/host-network-interfaces-panel-removed.html)
|
||||
* [VM hugepages/hugetlbfs](https://bugzilla.redhat.com/show_bug.cgi?id=1688641)
|
||||
* Most VM tuning: `<cputune>`, `<blkiotune>`, `<numatune>`, fine grained `<vcpus>` listing
|
||||
* Editing existing machine type/arch/ostype, UEFI config. Only advanced users can make it work, and they can edit the XML.
|
||||
|
||||
* Defaults
|
||||
* [Defaulting to sky high maxmem and maxvcpus](https://github.com/virt-manager/virt-manager/issues/141)
|
||||
|
||||
* Tight desktop integration stuff: registering as a default file handler, registering as a gnome search provider, etc. This is gnome-boxes territory
|
||||
* Serial console config options like [buffer scrollback size](https://bugzilla.redhat.com/show_bug.cgi?id=1610165). Use `virsh console` or cli tools if need flexibility.
|
||||
|
||||
* Advanced VNC/SPICE viewer config. virt-viewer should be the target app
|
||||
* VNC bit depth config
|
||||
* advanced mouse/keyboard grab support
|
||||
* advanced SPICE viewer options
|
||||
* [hiding viewer window borders/decorations](https://www.redhat.com/archives/virt-tools-list/2019-January/msg00000.html) [(and another)](https://github.com/virt-manager/virt-manager/pull/233)
|
||||
* [hiding window menu bar](https://bugzilla.redhat.com/show_bug.cgi?id=1091311)
|
||||
* [keypress delay](https://bugzilla.redhat.com/show_bug.cgi?id=1410943)
|
||||
* [SPICE/QXL multidisplay support](https://bugzilla.redhat.com/show_bug.cgi?id=885806)
|
||||
* support for [manual key combinations](https://bugzilla.redhat.com/show_bug.cgi?id=1014666), or adding custom values.
|
||||
* Any feature that goes beyond what virt-viewer or other clients provide. virt-manager should not be the home for clever console/viewer behavior
|
||||
|
||||
* UI scalability features to manage large amounts of VMs
|
||||
* [custom manager columns for VM organizing](https://www.redhat.com/archives/virt-tools-list/2019-April/msg00059.html)
|
||||
* [organizing VMs into collections/groups](https://bugzilla.redhat.com/show_bug.cgi?id=1193303) ([and another](https://bugzilla.redhat.com/show_bug.cgi?id=1548879))
|
||||
* multiselect operations on VMs/other objects ([like storage](https://bugzilla.redhat.com/show_bug.cgi?id=1698879))
|
||||
* hiding offline VMs or other view options
|
||||
* [Advanced VM name search support](https://github.com/virt-manager/virt-manager/issues/147). Note: GTK provides some support already: in the manager window, CTRL+F to open a searchbox, searches match from the beginning of VMs only, use arrow keys to jump between matches. Use VM 'title' field to customize how it is named in the manager window.
|
||||
|
||||
|
||||
## Use of the bug tracker
|
||||
|
||||
We plan to keep open bugs only for:
|
||||
|
||||
* bugs/problems that are actively affecting users, which the developers plan to fix eventually.
|
||||
* features/improvements that the developers plan to implement eventually.
|
||||
|
||||
The bug tracker will not be used as a wishlist. Users are free to
|
||||
file RFEs there, but they may be closed.
|
||||
|
||||
* A feature/enhancement request that does not match the design guidelines, will be CLOSED->WONTFIX, with an explanation
|
||||
* A feature/enhancement request that would be nice to have but the developers do not plan to fix, will be CLOSED->DEFERRED, with an explanation.
|
||||
|
||||
|
||||
## References
|
||||
|
||||
* [The original mailing list thread for this document](https://www.redhat.com/archives/virt-tools-list/2019-June/msg00108.html)
|
||||
* [Follow on discussion about some feature removals](https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html), [and a follow up](https://www.redhat.com/archives/virt-tools-list/2019-July/msg00005.html)
|
|
@ -6,6 +6,9 @@ changes, it can be done from the source directory:
|
|||
./virt-manager
|
||||
```
|
||||
|
||||
For more details on that, see [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
|
||||
To install the software into `/usr/local` (usually), you can do:
|
||||
```sh
|
||||
./setup.py install
|
||||
|
@ -25,15 +28,15 @@ To build an RPM, you can run:
|
|||
|
||||
## Pre-requisite software
|
||||
|
||||
A detailed dependency list can be found in
|
||||
[virt-manager.spec.in](virt-manager.spec.in) file.
|
||||
A detailed dependency list can be found in [virt-manager.spec](virt-manager.spec) file.
|
||||
|
||||
Minimum version requirements of major components:
|
||||
|
||||
- gettext >= 0.19.6
|
||||
- python >= 3.4
|
||||
- gtk3 >= 3.22
|
||||
- libvirt-python >= 0.6.0
|
||||
- pygobject3 >= 3.22
|
||||
- pygobject3 >= 3.31.3
|
||||
- libosinfo >= 0.2.10
|
||||
- gtksourceview >= 3
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# to be included/excluded from the tarball produced by sdist
|
||||
include COPYING CONTRIBUTING.md INSTALL.md NEWS.md README.md
|
||||
include COPYING CONTRIBUTING.md DESIGN.md INSTALL.md NEWS.md README.md
|
||||
include MANIFEST.in
|
||||
include setup.py
|
||||
include virt-*
|
||||
|
@ -10,6 +10,5 @@ recursive-include po *
|
|||
recursive-include tests *
|
||||
recursive-include ui *
|
||||
recursive-include virtManager *
|
||||
recursive-include virtconv *
|
||||
recursive-include virtinst *
|
||||
global-exclude *.pyc
|
||||
|
|
94
NEWS.md
94
NEWS.md
|
@ -1,5 +1,85 @@
|
|||
# Virtual Machine Manager News
|
||||
|
||||
## Release 4.1.0 (August 04, 2022)
|
||||
- Fix build with setuptools-61 (Peter Alfredsen, Miro Hrončok)
|
||||
- add UI and cli support for qemu-vdagent channel (Jonathon Jongsma)
|
||||
- cli: More --iothreads suboptions (Lin Ma)
|
||||
- launch_security: Use SEV-ES policy=0x07 if host supports it (Charles
|
||||
Arnold)
|
||||
- cli: Add support for URL query with disks (Martin Kletzander)
|
||||
|
||||
## Release 4.0.0 (March 02, 2022)
|
||||
- virt-install --os-variant/--osinfo is now a hard requirement for most
|
||||
cases
|
||||
- Add 'Enable shared memory' UI checkbox (Lin Ma)
|
||||
- add UI preference to default to UEFI for new VMs (Charles Arnold)
|
||||
- Add virtiofs filesystem driver UI option
|
||||
- Fill in all --cputune, --cpu, --shmem, --input, and --boot suboptions
|
||||
(Hugues Fafard)
|
||||
- virt-* mdev improvements (Shalini Chellathurai Saroja)
|
||||
- bhyve improvments (Roman Bogorodskiy)
|
||||
- Revive network portgroup UI
|
||||
- enable a TPM by default when UEFI is used (Daniel P. Berrangé)
|
||||
- Use cpu host-passthrough by default on qemu x86
|
||||
- use virtio-gpu video for most modern distros
|
||||
- Default to extra pcie root ports for q35
|
||||
- set discard=unmap by default for sparse disks and block devices
|
||||
- We now require xorissofs for --location ISO
|
||||
- We now use setuptools rather than just plain distutils
|
||||
|
||||
## Release 3.2.0 (November 14, 2020)
|
||||
- Slim down filesystem device editor UI
|
||||
- Fix TOCTTOU virt-install bugs (Martin Pitt)
|
||||
- Several other bug fixes
|
||||
|
||||
## Release 3.1.0 (September 30, 2020)
|
||||
- Return to using qcow2 sparse by default with libvirt 5.0.0+
|
||||
- Make VM window shortcuts less likely to conflict with guest usage
|
||||
- Fix 3.0.0 regression with spice audio
|
||||
- createvol: Add explicit option for qcow2 non-sparse
|
||||
- Unconditionally add USB redirdev to new VMs when using SPICE
|
||||
- Unconditionally add sound devices to new VMs
|
||||
- Translation string improvements (Pino Toscano)
|
||||
|
||||
## Release 3.0.0 (September 15, 2020)
|
||||
- virt-install --cloud-init support (Athina Plaskasoviti, Cole Robinson)
|
||||
- The virt-convert tool has been removed. Please use virt-v2v instead
|
||||
- A handful of UI XML configuration options have been removed. The XML
|
||||
editor can be used instead. For a larger discussion see this thread:
|
||||
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html
|
||||
- The 'New VM' UI now has a 'Manual Install' option which creates a VM
|
||||
without any required install media
|
||||
- In the 'New VM' UI, the network/pxe install option has been removed. If
|
||||
you need network boot, choose 'Manual Install' and set the boot device after
|
||||
initial VM creation
|
||||
- 'Clone VM' UI has been reworked and simplified
|
||||
- 'Migrate VM' UI now has an XML editor for the destination VM
|
||||
- Global and per-vm option to disable graphical console autoconnect. This
|
||||
makes it easier to use virt-manager alongside another client like virt-
|
||||
viewer
|
||||
- virt-manager: set guest time after VM restore (Michael Weiser)
|
||||
- virt-manager: option to delete storage when removing disk device (Lily
|
||||
Nie)
|
||||
- virt-manager: show warnings if snapshot operation is unsafe (Michael
|
||||
Weiser)
|
||||
- Unattended install improvements (Fabiano Fidêncio)
|
||||
- cli: new --xml XPATH=VAL option for making direct XML changes
|
||||
- virt-install: new --reinstall=DOMAIN option
|
||||
- virt-install: new --autoconsole text|graphical|none option
|
||||
- virt-install: new --os-variant detect=on,require=on suboptions
|
||||
- cli: --clock, --keywrap, --blkiotune, --cputune additions (Athina
|
||||
Plaskasoviti)
|
||||
- cli: add --features kvm.hint-dedicated.state= (Menno Lageman)
|
||||
- cli:--iommu option (Menno Lageman)
|
||||
- cli: Add --graphics websocket= support (Petr Benes)
|
||||
- cli: Add --disk type=nvme source.* suboptions
|
||||
- cli: Fill in all --filesystem suboptions
|
||||
- Translation string improvements (Pino Toscano)
|
||||
- Convert from .pod to .rst for man pages
|
||||
- Switch to pytest as our test runner
|
||||
- Massively improved unittest and uitest code coverage
|
||||
- Now using github issues as our bug tracker
|
||||
|
||||
## 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)
|
||||
|
@ -179,7 +259,7 @@
|
|||
- OVMF/AAVMF Support (Laszlo Ersek, Giuseppe Scrivano, Cole Robinson)
|
||||
- Improved support for AArch64 qemu/kvm
|
||||
- virt-install: Support `--disk type=network` parameters
|
||||
- virt-install: Make `--disk` just work
|
||||
- virt-install: Make `--disk` just work
|
||||
- virt-install: Add `--disk sgio=` option (Giuseppe Scrivano)
|
||||
- addhardware: default to an existing bus when adding a new disk
|
||||
(Giuseppe Scrivano)
|
||||
|
@ -300,7 +380,7 @@
|
|||
|
||||
- Allow renaming an offline VM
|
||||
- Spice password support (Marc-André Lureau)
|
||||
- Allow editting NIC `<virtualport>` settings (Gerhard Stenzel)
|
||||
- Allow editing NIC `<virtualport>` settings (Gerhard Stenzel)
|
||||
- Allow enabling/disabling individual CPU features
|
||||
- Allow easily changing graphics type between VNC and SPICE for existing
|
||||
VM
|
||||
|
@ -464,7 +544,7 @@ now tunnel connections to the VNC server over SSH. It avoids prompting
|
|||
for SSH passwords on the console. Handling of VNC connections & retries
|
||||
is made more robust. There is support for changing CDROM media on the
|
||||
fly (requires suitably updated libvirt). There is ability to PXE boot
|
||||
install fullyvirtualized guests. Connetions to hypervisors are opened
|
||||
install fullyvirtualized guests. Connections to hypervisors are opened
|
||||
in the background to avoid blocking the whole UI.
|
||||
|
||||
## Release 0.5.0
|
||||
|
@ -472,7 +552,7 @@ in the background to avoid blocking the whole UI.
|
|||
This release introduces the ability to manage multiple remote machines,
|
||||
using either SSH+public keys, or TLS+x509 certificates to connect and
|
||||
authenticate. The main user interface is re-worked to show multiple
|
||||
hosts in a tree view, remebering connections across restarts. It is
|
||||
hosts in a tree view, remembering connections across restarts. It is
|
||||
not currently possible to create new guests with a remote host connection.
|
||||
This capability will be added in a future release. The guest VNC console
|
||||
implementation has been replaced with the GTK-VNC widget for greatly
|
||||
|
@ -499,7 +579,7 @@ to the hypervisor.
|
|||
The release introduces online help for all windows / dialogs in the
|
||||
application, to explain usage & operation of key functions. Auto-popup
|
||||
of consoles was fixed for existing inactive domains. Additional control
|
||||
operations are available on the right-click menu in the VM list. A
|
||||
operations are available on the right-click menu in the VM list. A
|
||||
handful of other minor bug fixes are also applied.
|
||||
|
||||
## Release 0.3.1
|
||||
|
@ -537,8 +617,8 @@ the UI in approximately 20 languages - thanks to the Fedora i18n
|
|||
team for excellent progress on this. It is now possible to control
|
||||
the virt-manager UI with command line arguments as well as the DBus
|
||||
API & it DBus activation is no longer used by default which fixes
|
||||
interaction with GNOME keyring & AT-SPI accesibility. Numerous
|
||||
UI issues were fixed / clarified, particularly in the graphical
|
||||
interaction with GNOME keyring & AT-SPI accessibility. Numerous
|
||||
UI issues were fixed / clarified, particularly in the graphical
|
||||
console and new VM creation wizard.
|
||||
|
||||
|
||||
|
|
9
PKG-INFO
9
PKG-INFO
|
@ -1,10 +1,13 @@
|
|||
Metadata-Version: 1.0
|
||||
Metadata-Version: 2.1
|
||||
Name: virt-manager
|
||||
Version: 2.2.1
|
||||
Version: 4.1.0
|
||||
Summary: UNKNOWN
|
||||
Home-page: http://virt-manager.org
|
||||
Author: Cole Robinson
|
||||
Author-email: virt-tools-list@redhat.com
|
||||
License: GPLv2+
|
||||
Description: UNKNOWN
|
||||
Platform: UNKNOWN
|
||||
License-File: COPYING
|
||||
|
||||
UNKNOWN
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ Several command line tools are also provided:
|
|||
- `virt-install`: Create new libvirt virtual machines
|
||||
- `virt-clone`: Duplicate existing libvirt virtual machines
|
||||
- `virt-xml`: Edit existing libvirt virtual machines/manipulate libvirt XML
|
||||
- `virt-convert`: Convert VMX or OVF configs to libvirt virtual machines
|
||||
|
||||
For dependency info and installation instructions, see the
|
||||
[INSTALL.md](INSTALL.md) file. If you just want to quickly test the
|
||||
|
@ -22,7 +21,7 @@ code from a git checkout, you can launch any of the commands like:
|
|||
|
||||
## Contact
|
||||
|
||||
- All comments / suggestions / patches should be directed to the
|
||||
- Discussions and big patch series should go to the
|
||||
[virt-tools-list](https://www.redhat.com/mailman/listinfo/virt-tools-list)
|
||||
mailing list.
|
||||
- For IRC we use #virt on OFTC.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Run something, muting output or redirecting it to the debug stream
|
||||
# depending on the value of _ARC_DEBUG.
|
||||
__python_argcomplete_run() {
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
<description>When to scale the VM graphical console. -1 = global default, 0 = never, 1 = only when in full screen mode, 2 = Always</description>
|
||||
</key>
|
||||
|
||||
<key name="console-password" type="(si)">
|
||||
<default>("", -1)</default>
|
||||
<summary>Username and secrets ID for graphical password</summary>
|
||||
<description>Username and secrets ID for graphical password</description>
|
||||
<key name="console-username" type="s">
|
||||
<default>""</default>
|
||||
<summary>Username for graphical password</summary>
|
||||
<description>Username for graphical password</description>
|
||||
</key>
|
||||
|
||||
<key name="resize-guest" type="i">
|
||||
|
@ -25,6 +25,12 @@
|
|||
<summary>Automatically resize guest when window size changes</summary>
|
||||
<description>Automatically change guest resolution along with virt-manager window. Only works with spice with a vdagent set up. -1 = global default, 0 = off, 1 = on.</description>
|
||||
</key>
|
||||
|
||||
<key name="autoconnect" type="i">
|
||||
<default>-1</default>
|
||||
<summary>Autoconnect to the default VM console when the VM window is opened</summary>
|
||||
<description>Autoconnect to the default VM console when the VM window is opened. Users may want to turn this off if they prefer to use another viewer app for their VMs, and don't want virt-manager to interfere, but they still want to use virt-manager's details. -1 = global default, 0 = off, 1 = on</description>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
|
||||
|
@ -55,12 +61,12 @@
|
|||
|
||||
<key name="xmleditor-enabled" type="b">
|
||||
<default>false</default>
|
||||
<summary>Enable XML editting UI</summary>
|
||||
<description>Enable XML editting UI</description>
|
||||
<summary>Enable XML editing UI</summary>
|
||||
<description>Enable XML editing UI</description>
|
||||
</key>
|
||||
|
||||
<key name="enable-libguestfs-vm-inspection" type="b">
|
||||
<default>true</default>
|
||||
<default>false</default>
|
||||
<summary>Enable libguestfs VM inspection</summary>
|
||||
<description>Enable libguestfs VM inspection for things like OS icons, installed applications, etc. This only works if python libguestfs bindings are installed.</description>
|
||||
</key>
|
||||
|
@ -199,12 +205,6 @@
|
|||
|
||||
<schema id="org.virt-manager.virt-manager.console"
|
||||
path="/org/virt-manager/virt-manager/console/">
|
||||
<key name="enable-accels" type="b">
|
||||
<default>false</default>
|
||||
<summary>Enable menu accelerators in console window</summary>
|
||||
<description>Whether to enable menu accelerators while connected to the guest graphical console.</description>
|
||||
</key>
|
||||
|
||||
<key name="scaling" type="i">
|
||||
<default>1</default>
|
||||
<summary>When to scale the VM graphical console</summary>
|
||||
|
@ -223,18 +223,17 @@
|
|||
<description>Grab keyboard sequence for the graphical console</description>
|
||||
</key>
|
||||
|
||||
<!--This key is not intended to be exposed in the UI yet-->
|
||||
<key name="grab-keyboard" type="b">
|
||||
<default>true</default>
|
||||
<summary>Enable grab keyboard when active and focused</summary>
|
||||
<description>Enable grab keyboard when active and focused</description>
|
||||
</key>
|
||||
|
||||
<key name="auto-redirect" type="b">
|
||||
<default>true</default>
|
||||
<summary>Enable SPICE Auto USB redirection in console window</summary>
|
||||
<description>Whether to enable SPICE Auto USB redirection while connected to the guest console.</description>
|
||||
</key>
|
||||
|
||||
<key name="autoconnect" type="b">
|
||||
<default>true</default>
|
||||
<summary>Autoconnect to the default VM console when the VM window is opened</summary>
|
||||
<description>Autoconnect to the default VM console when the VM window is opened. Users may want to turn this off if they prefer to use another viewer app for their VMs, and don't want virt-manager to interfere, but they still want to use virt-manager's details.</description>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.virt-manager.virt-manager.details"
|
||||
|
@ -248,24 +247,12 @@
|
|||
|
||||
<schema id="org.virt-manager.virt-manager.new-vm"
|
||||
path="/org/virt-manager/virt-manager/new-vm/">
|
||||
<key name="add-sound" type="b">
|
||||
<default>true</default>
|
||||
<summary>Install sound device for new Vms</summary>
|
||||
<description>Whether to install a sound device for new VMs</description>
|
||||
</key>
|
||||
|
||||
<key name="graphics-type" type="s">
|
||||
<default>'system'</default>
|
||||
<summary>Install selected graphics type for new VM</summary>
|
||||
<description>Install selected graphics type for new VM. vnc or spice, system for software configured default</description>
|
||||
</key>
|
||||
|
||||
<key name="add-spice-usbredir" type="s">
|
||||
<default>'system'</default>
|
||||
<summary>Add spice usbredir HW for new VMs</summary>
|
||||
<description>Add spice usbredir HW for new VMs. yes, no, or system for software configured default</description>
|
||||
</key>
|
||||
|
||||
<key name="storage-format" type="s">
|
||||
<default>'default'</default>
|
||||
<summary>Use selected format for new VM storage</summary>
|
||||
|
@ -275,7 +262,13 @@
|
|||
<key name="cpu-default" type="s">
|
||||
<default>'default'</default>
|
||||
<summary>CPU setting to use for new VMs</summary>
|
||||
<description>CPU setting to use for new VMs. Limited to VMs matching the host architecture. Possible values: default (virt-manager default), hv-default (qemu's default), host-model-only (just the model, not the additional features), host-model (libvirt's host-model setting).</description>
|
||||
<description>CPU setting to use for new VMs. Limited to VMs matching the host architecture. Possible values: default (virt-manager default), hv-default (qemu's default), host-model-only (just the model, not the additional features), host-model (libvirt's host-model setting), host-passthrough (libvirt's host-passthrough setting).</description>
|
||||
</key>
|
||||
|
||||
<key name="firmware" type="s">
|
||||
<default>'default'</default>
|
||||
<summary>Use selected firmware for new VM booting</summary>
|
||||
<description>Firmware used for new VMs. Possible values are default and UEFI. The firmware used is determined by libvirt unless a specific firmware is selected from the Customize dialog.</description>
|
||||
</key>
|
||||
|
||||
</schema>
|
||||
|
@ -334,12 +327,6 @@
|
|||
<description>Whether we require confirmation to remove a virtual device</description>
|
||||
</key>
|
||||
|
||||
<key name="interface-power" type="b">
|
||||
<default>true</default>
|
||||
<summary>Confirm device interface start and stop</summary>
|
||||
<description>Whether we require confirmation to start or stop a libvirt virtual interface</description>
|
||||
</key>
|
||||
|
||||
<key name="unapplied-dev" type="b">
|
||||
<default>true</default>
|
||||
<summary>Confirm about unapplied device changes</summary>
|
||||
|
|
|
@ -3,34 +3,34 @@
|
|||
<id>virt-manager.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-2.0+</project_license>
|
||||
<_name>Virtual Machine Manager</_name>
|
||||
<_summary>Graphically manage KVM, Xen, or LXC via libvirt</_summary>
|
||||
<name>Virtual Machine Manager</name>
|
||||
<summary>Graphically manage KVM, Xen, or LXC via libvirt</summary>
|
||||
<description>
|
||||
<_p>
|
||||
<p>
|
||||
Virtual Machine Manager provides a graphical tool for administering virtual
|
||||
machines for KVM, Xen, and LXC. Start, stop, add or remove virtual devices,
|
||||
connect to a graphical or serial console, and see resource usage statistics
|
||||
for existing VMs on local or remote machines. Uses libvirt as the backend
|
||||
management API.
|
||||
</_p>
|
||||
</p>
|
||||
</description>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://virt-manager.org/appdata/en_US/manager.png</image>
|
||||
<_caption>Main manager window</_caption>
|
||||
<caption>Main manager window</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://virt-manager.org/appdata/en_US/details.png</image>
|
||||
<_caption>Virtual machine configuration screen</_caption>
|
||||
<caption>Virtual machine configuration screen</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://virt-manager.org/appdata/en_US/console.png</image>
|
||||
<_caption>Graphical console connection for a virtual machine</_caption>
|
||||
<caption>Graphical console connection for a virtual machine</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<url type="homepage">https://www.virt-manager.org/</url>
|
||||
<url type="bugtracker">https://bugzilla.redhat.com/enter_bug.cgi?product=Virtualization%20Tools&component=virt-manager</url>
|
||||
<url type="translate">https://fedora.zanata.org/project/view/virt-manager/</url>
|
||||
<url type="bugtracker">https://github.com/virt-manager/virt-manager/issues/new/choose</url>
|
||||
<url type="translate">https://translate.fedoraproject.org/projects/virt-manager/virt-manager/</url>
|
||||
<update_contact>virt-tools-list@redhat.com</update_contact>
|
||||
<translation type="gettext">virt-manager</translation>
|
||||
<keywords>
|
||||
|
@ -39,4 +39,14 @@
|
|||
<keyword>qemu</keyword>
|
||||
<keyword>kvm</keyword>
|
||||
</keywords>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="4.1.0" date="2022-08-04"/>
|
||||
<release version="4.0.0" date="2022-03-02"/>
|
||||
<release version="3.2.0" date="2020-11-14"/>
|
||||
<release version="3.1.0" date="2020-09-30"/>
|
||||
<release version="3.0.0" date="2020-09-15"/>
|
||||
<release version="2.2.1" date="2019-07-03"/>
|
||||
<release version="2.2.0" date="2019-06-17"/>
|
||||
</releases>
|
||||
</component>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[Desktop Entry]
|
||||
_Name=Virtual Machine Manager
|
||||
_Comment=Manage virtual machines
|
||||
Name=Virtual Machine Manager
|
||||
Comment=Manage virtual machines
|
||||
Icon=virt-manager
|
||||
Exec=virt-manager
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Keywords=vmm;
|
||||
Categories=System;
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[org.virt-manager.virt-manager.console]
|
||||
auto-redirect=false
|
|
@ -1,9 +0,0 @@
|
|||
Access Control
|
||||
==============
|
||||
Access to the libvirt socket is controlled by membership in the "libvirt"
|
||||
group. If you want to manage virtual machines as non root you need to add your
|
||||
user to that group or you have to use the session uris like qemu:///session.
|
||||
|
||||
See also /usr/share/doc/libvirt-bin/README.Debian.
|
||||
|
||||
-- Guido Guenther <agx@sigxcpu.org> Thu, 04 Jun 2010 11:46:03 +0100
|
|
@ -1,9 +0,0 @@
|
|||
Access Control
|
||||
==============
|
||||
Access to the libvirt socket is controlled by membership in the "libvirt"
|
||||
group. If you want to manage virtual machines as non root you need to add your
|
||||
user to that group or you have to use the session uris like qemu:///session.
|
||||
|
||||
See also /usr/share/doc/libvirt-daemon-system/README.Debian.gz.
|
||||
|
||||
-- Guido Guenther <agx@sigxcpu.org> Thu, 04 Jun 2010 11:46:03 +0100
|
|
@ -1,29 +0,0 @@
|
|||
This package is maintained with git-buildpackage(1). It follows DEP-14
|
||||
for branch naming (e.g. using debian/sid for the current version
|
||||
in Debian unstable).
|
||||
|
||||
It uses pristine-tar(1) to store enough information in git to generate
|
||||
bit identical tarballs when building the package without having
|
||||
downloaded an upstream tarball first.
|
||||
|
||||
When working with patches it is recommended to use "gbp pq import" to
|
||||
import the patches, modify the source and then use "gbp pq export
|
||||
--commit" to commit the modifications.
|
||||
|
||||
The changelog is generated using "gbp dch" so if you submit any
|
||||
changes don't bother to add changelog entries but rather provide
|
||||
a nice git commit message that can then end up in the changelog.
|
||||
|
||||
It is recommended to build the package with pbuilder using:
|
||||
|
||||
gbp builpackage --git-pbuilder
|
||||
|
||||
For information on how to set up a pbuilder environment see the
|
||||
git-pbuilder(1) manpage. In short:
|
||||
|
||||
DIST=sid git-pbuilder create
|
||||
gbp clone <project-url>
|
||||
cd <project>
|
||||
gbp buildpackage --git-pbuilder
|
||||
|
||||
-- Guido Günther <agx@igxcpu.org>, Wed, 2 Dec 2015 18:51:15 +0100
|
|
@ -1,8 +0,0 @@
|
|||
When reporting issues regarding virt-manager please run the program using the
|
||||
--debug --no-fork command line options and provide the output.
|
||||
|
||||
Often the problem isn't related to virt-manager at all. Please also check the
|
||||
libvirt and VM logfiles and try to reproduce with virsh or virt-install.
|
||||
|
||||
http://wiki.debian.org/libvirt/Debugging has more information on howto provide
|
||||
debugging information for the virt-* tools.
|
|
@ -1,5 +0,0 @@
|
|||
virt-manager (1:2.2.1-ok1) yangtze; urgency=medium
|
||||
|
||||
* rebuild source for openKylin
|
||||
|
||||
-- Cong Liu <liucong2@kylinos.cn> Fri, 11 Nov 2022 16:29:42 +0800
|
|
@ -1 +0,0 @@
|
|||
12
|
|
@ -1,90 +0,0 @@
|
|||
Source: virt-manager
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: OpenKylin Virtualization SIG <virtualization@lists.openkylin.top>
|
||||
Uploaders: Cong Liu <liucong2@kylinos.cn>
|
||||
Standards-Version: 4.4.0
|
||||
Vcs-Git: https://gitee.com/openkylin/virt-manager.git
|
||||
Vcs-Browser: https://gitee.com/openkylin/virt-manager
|
||||
Homepage: http://virt-manager.org/
|
||||
Build-Depends:
|
||||
debhelper (>= 12~),
|
||||
dh-python,
|
||||
intltool,
|
||||
libglib2.0-bin,
|
||||
python3-all,
|
||||
# for the tests
|
||||
cpio,
|
||||
gir1.2-libosinfo-1.0,
|
||||
gir1.2-libvirt-glib-1.0,
|
||||
libvirt-daemon,
|
||||
python3-gi,
|
||||
python3-libvirt,
|
||||
python3-libxml2,
|
||||
python3-requests,
|
||||
unzip,
|
||||
|
||||
Package: virt-manager
|
||||
Architecture: all
|
||||
Depends:
|
||||
gir1.2-appindicator3-0.1,
|
||||
gir1.2-gtk-3.0 (>= 3.10),
|
||||
gir1.2-gtk-vnc-2.0,
|
||||
gir1.2-gtksource-4,
|
||||
gir1.2-libosinfo-1.0,
|
||||
gir1.2-libvirt-glib-1.0,
|
||||
gir1.2-vte-2.91,
|
||||
librsvg2-common,
|
||||
python3-dbus,
|
||||
python3-gi,
|
||||
python3-gi-cairo,
|
||||
python3-libvirt (>= 0.7.1),
|
||||
virtinst (>= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${python3:Depends},
|
||||
Recommends:
|
||||
gir1.2-spiceclientglib-2.0,
|
||||
gir1.2-spiceclientgtk-3.0,
|
||||
libvirt-daemon-system (>= 1.2.7),
|
||||
Suggests:
|
||||
gir1.2-secret-1,
|
||||
gnome-keyring,
|
||||
python3-guestfs,
|
||||
ssh-askpass,
|
||||
virt-viewer,
|
||||
Description: desktop application for managing virtual machines
|
||||
It presents a summary view of running domains and their live performance &
|
||||
resource utilization statistics. A detailed view presents graphs showing
|
||||
performance & utilization over time. Ultimately it will allow creation of new
|
||||
domains, and configuration & adjustment of a domain's resource allocation &
|
||||
virtual hardware. Finally an embedded VNC client viewer presents a full
|
||||
graphical console to the guest domain.
|
||||
.
|
||||
NOTE: the GUI is still considered experimental.
|
||||
|
||||
Package: virtinst
|
||||
Architecture: all
|
||||
Depends:
|
||||
e2fsprogs,
|
||||
genisoimage,
|
||||
gir1.2-libosinfo-1.0,
|
||||
python3,
|
||||
python3-distutils,
|
||||
python3-gi,
|
||||
python3-libvirt (>= 0.4.6),
|
||||
python3-libxml2,
|
||||
python3-requests,
|
||||
${misc:Depends},
|
||||
${python3:Depends},
|
||||
${shlibs:Depends},
|
||||
Recommends:
|
||||
qemu-utils,
|
||||
virt-viewer,
|
||||
Description: Programs to create and clone virtual machines
|
||||
Virtinst is a set of commandline tools to create virtual machines using
|
||||
libvirt:
|
||||
.
|
||||
virt-install: provision new virtual machines
|
||||
virt-clone: clone existing virtual machines
|
||||
virt-xml: edit libvirt XML using command line options.
|
||||
virt-convert: convert virtual machines between formats
|
|
@ -1,67 +0,0 @@
|
|||
This is the Ubuntu / Debian GNU/Linux prepackaged version of the
|
||||
Virtual Machine Manger.
|
||||
|
||||
Packaged by Marcelo Boveto Shima <marceloshima@gmail.com>
|
||||
and Guido Guenther <agx@sigxcpu.org>
|
||||
|
||||
Downloaded from http://virt-manager.et.redhat.com/download.html
|
||||
|
||||
Upstream Author:
|
||||
|
||||
Daniel Berrange <berrange-at-redhat-dot-com>
|
||||
Hugh O. Brock <hbrock-at-redhat-dot-com>
|
||||
Jeremy Katz <katzj-at-redhat-dot-com>
|
||||
|
||||
Copyright:
|
||||
|
||||
Daniel Berrange <berrange-at-redhat-dot-com>
|
||||
Red Hat, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 dated June, 1991.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU
|
||||
General Public License can be found in `/usr/share/common-licenses/GPL'.
|
||||
|
||||
src/graphWidgets:
|
||||
|
||||
Copyright (C) 2005-2006 Red Hat, Inc., David Malcolm <dmalcolm@redhat.com>
|
||||
Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU
|
||||
General Library Public License can be found in
|
||||
`/usr/share/common-licenses/LGPL-2'.
|
||||
|
||||
help/:
|
||||
|
||||
Copyright 2007 Red Hat Inc., and Hugh Brock
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation
|
||||
License (GFDL), Version 1.1 or any later version published
|
||||
by the Free Software Foundation with no Invariant Sections,
|
||||
no Front-Cover Texts, and no Back-Cover Texts.
|
||||
|
||||
On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU Free
|
||||
Documentation License can be found in `/usr/share/common-licenses/GFDL'.
|
||||
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
|
||||
Date: Sat, 24 Dec 2016 01:18:30 +0100
|
||||
Subject: Use /usr/bin/python3
|
||||
|
||||
so we don't have to worry about picking up the wrong version
|
||||
---
|
||||
setup.py | 3 +--
|
||||
virt-clone | 2 +-
|
||||
virt-convert | 2 +-
|
||||
virt-install | 2 +-
|
||||
virt-manager | 2 +-
|
||||
virt-xml | 2 +-
|
||||
6 files changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 275087b..1f7aa98 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1,9 +1,8 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# This work is licensed under the GNU GPLv2 or later.
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
-
|
||||
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 472bd3e..79355da 100755
|
||||
--- a/virt-clone
|
||||
+++ b/virt-clone
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright(c) FUJITSU Limited 2007.
|
||||
#
|
||||
diff --git a/virt-convert b/virt-convert
|
||||
index df7fa84..ca4f212 100755
|
||||
--- a/virt-convert
|
||||
+++ b/virt-convert
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright 2008, 2013, 2014 Red Hat, Inc.
|
||||
#
|
||||
diff --git a/virt-install b/virt-install
|
||||
index af6c75b..0cd5da7 100755
|
||||
--- a/virt-install
|
||||
+++ b/virt-install
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright 2005-2014 Red Hat, Inc.
|
||||
#
|
||||
diff --git a/virt-manager b/virt-manager
|
||||
index ca6a593..b4b7eb2 100755
|
||||
--- a/virt-manager
|
||||
+++ b/virt-manager
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# 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 71445c9..de5cd2d 100755
|
||||
--- a/virt-xml
|
||||
+++ b/virt-xml
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright 2013-2014 Red Hat, Inc.
|
||||
#
|
|
@ -1,28 +0,0 @@
|
|||
Description: Fix legacy-images path for focal.
|
||||
Author: Dimitri John Ledkov <xnox@ubuntu.com>
|
||||
Bug-Ubuntu: https://launchpad.net/bugs/1872941
|
||||
|
||||
|
||||
Index: virt-manager-2.2.1/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-2.2.1.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-2.2.1/virtinst/install/urldetect.py
|
||||
@@ -640,6 +640,8 @@ class _DebianDistro(_DistroTree):
|
||||
media_type = None
|
||||
if check_manifest("current/images/MANIFEST"):
|
||||
media_type = "url"
|
||||
+ elif check_manifest("current/legacy-images/MANIFEST"):
|
||||
+ media_type = "url"
|
||||
elif check_manifest("daily/MANIFEST"):
|
||||
media_type = "daily"
|
||||
elif cache.content_regex(".disk/info",
|
||||
@@ -693,6 +695,9 @@ class _DebianDistro(_DistroTree):
|
||||
|
||||
def _set_url_paths(self):
|
||||
url_prefix = "current/images"
|
||||
+ if self._debname == "ubuntu" and self._os_variant >= 'ubuntu20.04':
|
||||
+ url_prefix = "current/legacy-images"
|
||||
+ log.warn("Using legacy d-i based installer, that has been deprecated and will be removed in the future. https://discourse.ubuntu.com/c/server")
|
||||
if self.cache.debian_media_type == "daily":
|
||||
url_prefix = "daily"
|
||||
elif self.cache.debian_media_type == "mounted_iso_url":
|
|
@ -1,29 +0,0 @@
|
|||
Description: Clearly mark the LXC connections as being libvirt-lxc, to
|
||||
avoid confusion due to differing features and configurations.
|
||||
Written: 2015-08-22
|
||||
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
|
||||
Updated: 2019-12-06
|
||||
Forwarded: https://github.com/virt-manager/virt-manager/pull/67
|
||||
|
||||
--- a/virtManager/createconn.py
|
||||
+++ b/virtManager/createconn.py
|
||||
@@ -171,7 +171,7 @@ class vmmConnect(vmmGObjectUI):
|
||||
_add_hv_row(HV_QEMU, "qemu", "QEMU/KVM")
|
||||
_add_hv_row(HV_QEMU_SESSION, "qemu", "QEMU/KVM " + _("user session"))
|
||||
_add_hv_row(HV_XEN, "xen", "Xen")
|
||||
- _add_hv_row(HV_LXC, "lxc", "LXC (" + _("Linux Containers") + ")")
|
||||
+ _add_hv_row(HV_LXC, "lxc", "Libvirt-LXC (Linux Containers)")
|
||||
_add_hv_row(HV_BHYVE, "bhyve", "Bhyve")
|
||||
_add_hv_row(HV_VZ, "vz", "Virtuozzo")
|
||||
_add_hv_row(-1, None, "")
|
||||
--- a/virtManager/connection.py
|
||||
+++ b/virtManager/connection.py
|
||||
@@ -433,7 +433,7 @@ class vmmConnection(vmmGObject):
|
||||
"esx": "ESX",
|
||||
"gsx": "GSX",
|
||||
"libxl": "libxl",
|
||||
- "lxc": "LXC",
|
||||
+ "lxc": "Libvirt-LXC",
|
||||
"openvz": "OpenVZ",
|
||||
"phyp": "phyp",
|
||||
"qemu": "QEMU/KVM",
|
|
@ -1,3 +0,0 @@
|
|||
Use-usr-bin-python.patch
|
||||
mark-libvirt-lxc.patch
|
||||
legacy-images.patch
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with python3 --buildsystem=pybuild
|
||||
|
||||
override_dh_python2:
|
||||
dh_python3 -O--buildsystem=python_distutils
|
||||
dh_python3 -p virtinst usr/share/virt-manager
|
||||
|
||||
override_dh_auto_test:
|
||||
ifneq (,$(filter check,$(DEB_BUILD_OPTIONS)))
|
||||
python3 setup.py test
|
||||
else
|
||||
@echo "Checks disabled atm"
|
||||
endif
|
||||
|
||||
override_dh_auto_install:
|
||||
python3 setup.py --no-update-icon-cache --no-compile-schemas install --force --root=debian/tmp --no-compile -O0
|
||||
dh_install debian/10_virt-manager.gschema.override \
|
||||
/usr/share/glib-2.0/schemas/
|
||||
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean
|
||||
rm -f data/gschemas.compiled
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
|
||||
|
|
@ -1 +0,0 @@
|
|||
3.0 (native)
|
|
@ -1,9 +0,0 @@
|
|||
Tests: help.sh
|
||||
Restrictions: superficial
|
||||
Depends: virtinst,
|
||||
|
||||
Tests: virt-manager.sh
|
||||
Restrictions: superficial
|
||||
Depends: virt-manager,
|
||||
xvfb,
|
||||
xauth,
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# At least check we can execute the main binary
|
||||
# to catch missing python dependenies
|
||||
for p in install xml convert clone; do
|
||||
virt-$p --help
|
||||
done
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# At least check we can execute the main binary
|
||||
# to catch missing python dependenies
|
||||
|
||||
set -e
|
||||
|
||||
xvfb-run virt-manager --help
|
|
@ -1,11 +0,0 @@
|
|||
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
|
||||
usr/share/virt-manager/icons
|
||||
usr/share/virt-manager/ui
|
||||
usr/share/virt-manager/virt-manager
|
||||
usr/share/virt-manager/virtManager
|
|
@ -1,15 +0,0 @@
|
|||
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
|
||||
usr/share/man/man1/virt-xml.1
|
||||
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/virtconv
|
||||
usr/share/virt-manager/virtinst
|
|
@ -1,3 +0,0 @@
|
|||
version=3
|
||||
|
||||
https://releases.pagure.org/virt-manager/virt-manager-(.*)\.tar\.gz
|
|
@ -1,228 +0,0 @@
|
|||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
virt-clone - clone existing virtual machine images
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<virt-clone> [OPTION]...
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<virt-clone> is a command line tool for cloning existing virtual machine
|
||||
images using the C<libvirt> hypervisor management library. It will copy
|
||||
the disk images of any existing virtual machine, and define a new guest
|
||||
with an identical virtual hardware configuration. Elements which require
|
||||
uniqueness will be updated to avoid a clash between old and new guests.
|
||||
|
||||
By default, virt-clone will show an error if the necessary information to
|
||||
clone the guest is not provided. The --auto-clone option will generate
|
||||
all needed input, aside from the source guest to clone.
|
||||
|
||||
Please note, virt-clone does not change anything _inside_ the guest OS, it only duplicates disks and does host side changes. So things like changing passwords, changing static IP address, etc are outside the scope of this tool. For these types of changes, please see B<virt-sysprep>.
|
||||
|
||||
=head1 GENERAL OPTIONS
|
||||
|
||||
Most options are not required. Minimum requirements are --original or
|
||||
--original-xml (to specify the guest to clone), --name, and appropriate
|
||||
storage options via -file.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--connect> URI
|
||||
|
||||
Connect to a non-default hypervisor. See L<virt-install(1)> for details
|
||||
|
||||
=item B<-o> ORIGINAL_GUEST
|
||||
|
||||
=item B<--original> ORIGINAL_GUEST
|
||||
|
||||
Name of the original guest to be cloned. This guest must be shut off or paused
|
||||
since it is not possible to safely clone active guests at this time.
|
||||
|
||||
=item B<--original-xml> ORIGINAL_XML
|
||||
|
||||
Libvirt guest xml file to use as the original guest. The guest does not need to
|
||||
be defined on the libvirt connection. This takes the place of the
|
||||
C<--original> parameter.
|
||||
|
||||
=item B<--auto-clone>
|
||||
|
||||
Generate a new guest name, and paths for new storage.
|
||||
|
||||
An example or possible generated output:
|
||||
|
||||
Original name : MyVM
|
||||
Generated clone name : MyVM-clone
|
||||
|
||||
Original disk path : /home/user/foobar.img
|
||||
Generated disk path : /home/user/foobar-clone.img
|
||||
|
||||
If generated names collide with existing VMs or storage, a number is appended,
|
||||
such as foobar-clone-1.img, or MyVM-clone-3.
|
||||
|
||||
=item B<-n> NAME
|
||||
|
||||
=item B<--name> NAME
|
||||
|
||||
Name of the new guest virtual machine instance. This must be unique amongst
|
||||
all guests known to the hypervisor connection, including those not
|
||||
currently active.
|
||||
|
||||
=item B<-u> UUID
|
||||
|
||||
=item B<--uuid> UUID
|
||||
|
||||
UUID for the guest; if none is given a random UUID will be generated. If you
|
||||
specify UUID, you should use a 32-digit hexadecimal number. UUID are intended
|
||||
to be unique across the entire data center, and indeed world. Bear this in
|
||||
mind if manually specifying a UUID
|
||||
|
||||
=item B<-f> DISKFILE
|
||||
|
||||
=item B<--file> DISKFILE
|
||||
|
||||
Path to the file, disk partition, or logical volume to use as the backing store
|
||||
for the new guest's virtual disk. If the original guest has multiple disks,
|
||||
this parameter must be repeated multiple times, once per disk in the original
|
||||
virtual machine.
|
||||
|
||||
=item B<--nvram> NVRAMFILE
|
||||
|
||||
Optional path to the new nvram VARS file, if no path is specified and the
|
||||
guest has nvram the new nvram path will be auto-generated. If the guest
|
||||
doesn't have nvram this option will be ignored.
|
||||
|
||||
=item B<--force-copy> TARGET
|
||||
|
||||
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.
|
||||
See L<virt-install(1)> for more details on sparse vs. nonsparse.
|
||||
|
||||
=item B<--preserve-data>
|
||||
|
||||
No storage is cloned: disk images specific by --file are preserved as is,
|
||||
and referenced in the new clone XML. This is useful if you want to clone
|
||||
a VM XML template, but not the storage contents.
|
||||
|
||||
=item B<--reflink>
|
||||
|
||||
When --reflink is specified, perform a lightweight copy. This is much faster
|
||||
if source images and destination images are all on the same btrfs filesystem.
|
||||
If COW copy is not possible, then virt-clone fails.
|
||||
|
||||
=item B<-m> MAC
|
||||
|
||||
=item B<--mac> MAC
|
||||
|
||||
Fixed MAC address for the guest; If this parameter is omitted, or the value
|
||||
C<RANDOM> is specified a suitable address will be randomly generated. Addresses
|
||||
are applied sequentially to the networks as they are listed in the original
|
||||
guest XML.
|
||||
|
||||
=item B<--print-xml>
|
||||
|
||||
Print the generated clone XML and exit without cloning.
|
||||
|
||||
=item B<--replace>
|
||||
|
||||
Shutdown and remove any existing guest with the passed C<--name> before
|
||||
cloning the original guest.
|
||||
|
||||
=item B<-h>
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Show the help message and exit
|
||||
|
||||
=item B<--version>
|
||||
|
||||
Show program's version number and exit
|
||||
|
||||
=item B<--check>
|
||||
|
||||
Enable or disable some validation checks. See L<virt-install(1)> for more details.
|
||||
|
||||
=item B<-q>
|
||||
|
||||
=item B<--quiet>
|
||||
|
||||
Suppress non-error output.
|
||||
|
||||
=item B<-d>
|
||||
|
||||
=item B<--debug>
|
||||
|
||||
Print debugging information to the terminal when running the install process.
|
||||
The debugging information is also stored in
|
||||
C<~/.cache/virt-manager/virt-clone.log> even if this parameter is omitted.
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Clone the guest called C<demo> on the default connection, auto generating
|
||||
a new name and disk clone path.
|
||||
|
||||
# virt-clone \
|
||||
--original demo \
|
||||
--auto-clone
|
||||
|
||||
Clone the guest called C<demo> which has a single disk to copy
|
||||
|
||||
# virt-clone \
|
||||
--original demo \
|
||||
--name newdemo \
|
||||
--file /var/lib/xen/images/newdemo.img
|
||||
|
||||
Clone a QEMU guest with multiple disks
|
||||
|
||||
# virt-clone \
|
||||
--connect qemu:///system \
|
||||
--original demo \
|
||||
--name newdemo \
|
||||
--file /var/lib/xen/images/newdemo.img \
|
||||
--file /var/lib/xen/images/newdata.img
|
||||
|
||||
Clone a guest to a physical device which is at least as big as the
|
||||
original guests disks. If the destination device is bigger, the
|
||||
new guest can do a filesystem resize when it boots.
|
||||
|
||||
# virt-clone \
|
||||
--connect qemu:///system \
|
||||
--original demo \
|
||||
--name newdemo \
|
||||
--file /dev/HostVG/DemoVM \
|
||||
--mac 52:54:00:34:11:54
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Please see L<https://virt-manager.org/bugs>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) Fujitsu Limited, Copyright (C) Red Hat, Inc,
|
||||
and various contributors.
|
||||
This is free software. You may redistribute copies of it under the terms
|
||||
of the GNU General Public License C<https://www.gnu.org/licenses/gpl.html>.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
C<virt-sysprep(1)>, C<virsh(1)>, C<virt-install(1)>, C<virt-manager(1)>, the project website C<https://virt-manager.org>
|
||||
|
||||
=cut
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
==========
|
||||
virt-clone
|
||||
==========
|
||||
|
||||
-------------------------------------
|
||||
clone existing virtual machine images
|
||||
-------------------------------------
|
||||
|
||||
:Manual section: 1
|
||||
:Manual group: Virtualization Support
|
||||
|
||||
|
||||
SYNOPSIS
|
||||
========
|
||||
|
||||
|
||||
``virt-clone`` [OPTION]...
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
|
||||
|
||||
``virt-clone`` is a command line tool for cloning existing virtual machine
|
||||
images using the ``libvirt`` hypervisor management library. It will copy
|
||||
the disk images of any existing virtual machine, and define a new guest
|
||||
with an identical virtual hardware configuration. Elements which require
|
||||
uniqueness will be updated to avoid a clash between old and new guests.
|
||||
|
||||
By default, virt-clone will show an error if the necessary information to
|
||||
clone the guest is not provided. The --auto-clone option will generate
|
||||
all needed input, aside from the source guest to clone.
|
||||
|
||||
Please note, virt-clone does not change anything _inside_ the guest OS, it
|
||||
only duplicates disks and does host side changes. So things like changing
|
||||
passwords, changing static IP address, etc are outside the scope of this
|
||||
tool. For these types of changes, please see ``virt-sysprep``.
|
||||
|
||||
|
||||
GENERAL OPTIONS
|
||||
===============
|
||||
|
||||
Most options are not required. Minimum requirements are --original or
|
||||
--original-xml (to specify the guest to clone), --name, and appropriate
|
||||
storage options via -file.
|
||||
|
||||
|
||||
``--connect`` URI
|
||||
Connect to a non-default hypervisor. See virt-install(1) for details
|
||||
|
||||
|
||||
``-o``, ``--original`` ORIGINAL_GUEST
|
||||
Name of the original guest to be cloned. This guest must be shut off.
|
||||
|
||||
|
||||
``--original-xml`` ORIGINAL_XML
|
||||
Libvirt guest xml file to use as the original guest. The guest does not need to
|
||||
be defined on the libvirt connection. This takes the place of the
|
||||
``--original`` parameter.
|
||||
|
||||
|
||||
``--auto-clone``
|
||||
Generate a new guest name, and paths for new storage.
|
||||
|
||||
An example of possible generated output:
|
||||
|
||||
.. code-block::
|
||||
|
||||
Original name : MyVM
|
||||
Generated clone name : MyVM-clone
|
||||
|
||||
Original disk path : /home/user/foobar.img
|
||||
Generated disk path : /home/user/foobar-clone.img
|
||||
|
||||
|
||||
If generated names collide with existing VMs or storage, a number is appended,
|
||||
such as foobar-clone-1.img, or MyVM-clone-3.
|
||||
|
||||
|
||||
``-n``, ``--name`` NAME
|
||||
Name of the new guest virtual machine instance. This must be unique amongst
|
||||
all guests known to the hypervisor connection, including those not
|
||||
currently active.
|
||||
|
||||
|
||||
``-u``, ``--uuid`` UUID
|
||||
UUID for the guest; if none is given a random UUID will be generated. If you
|
||||
specify UUID, you should use a 32-digit hexadecimal number. UUID are intended
|
||||
to be unique across the entire data center, and indeed world. Bear this in
|
||||
mind if manually specifying a UUID
|
||||
|
||||
|
||||
``-f``, ``--file`` PATH
|
||||
Path to the file, disk partition, or logical volume to use as the backing store
|
||||
for the new guest's virtual disk. If the original guest has multiple disks,
|
||||
this parameter must be repeated multiple times, once per disk in the original
|
||||
virtual machine.
|
||||
|
||||
|
||||
``--nvram`` NVRAMFILE
|
||||
Optional path to the new nvram VARS file, if no path is specified and the
|
||||
guest has nvram the new nvram path will be auto-generated. If the guest
|
||||
doesn't have nvram this option will be ignored.
|
||||
|
||||
``--force-copy`` TARGET
|
||||
Force cloning the passed disk target ('hdc', 'sda', etc.). By default,
|
||||
``virt-clone`` will skip certain disks, such as those marked 'readonly' or
|
||||
'shareable'.
|
||||
|
||||
|
||||
``--skip-copy`` TARGET
|
||||
Skip cloning the passed disk target ('hdc', 'sda', etc.). By default,
|
||||
``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.
|
||||
|
||||
|
||||
``--nonsparse``
|
||||
Fully allocate the new storage if the path being cloned is a sparse file.
|
||||
See virt-install(1) for more details on sparse vs. nonsparse.
|
||||
|
||||
|
||||
``--preserve-data``
|
||||
No storage is cloned: disk images specific by --file are preserved as is,
|
||||
and referenced in the new clone XML. This is useful if you want to clone
|
||||
a VM XML template, but not the storage contents.
|
||||
|
||||
|
||||
``--reflink``
|
||||
When --reflink is specified, perform a lightweight copy. This is much faster
|
||||
if source images and destination images are all on the same btrfs filesystem.
|
||||
If COW copy is not possible, then virt-clone fails.
|
||||
|
||||
|
||||
``-m``, ``--mac`` MAC
|
||||
Fixed MAC address for the guest; If this parameter is omitted, or the value
|
||||
``RANDOM`` is specified a suitable address will be randomly generated. Addresses
|
||||
are applied sequentially to the networks as they are listed in the original
|
||||
guest XML.
|
||||
|
||||
|
||||
``--print-xml``
|
||||
Print the generated clone XML and exit without cloning.
|
||||
|
||||
|
||||
``--replace``
|
||||
Shutdown and remove any existing guest with the passed ``--name`` before
|
||||
cloning the original guest.
|
||||
|
||||
|
||||
``-h``, ``--help``
|
||||
Show the help message and exit
|
||||
|
||||
|
||||
``--version``
|
||||
Show program's version number and exit
|
||||
|
||||
|
||||
``--check``
|
||||
Enable or disable some validation checks. See virt-install(1) for more details.
|
||||
|
||||
|
||||
``-q``, ``--quiet``
|
||||
Suppress non-error output.
|
||||
|
||||
|
||||
``-d``, ``--debug``
|
||||
Print debugging information to the terminal when running the install process.
|
||||
The debugging information is also stored in
|
||||
``~/.cache/virt-manager/virt-clone.log`` even if this parameter is omitted.
|
||||
|
||||
|
||||
EXAMPLES
|
||||
========
|
||||
|
||||
Clone the guest called ``demo`` on the default connection, auto generating
|
||||
a new name and disk clone path.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-clone \
|
||||
--original demo \
|
||||
--auto-clone
|
||||
|
||||
|
||||
Clone the guest called ``demo`` which has a single disk to copy
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-clone \
|
||||
--original demo \
|
||||
--name newdemo \
|
||||
--file /var/lib/xen/images/newdemo.img
|
||||
|
||||
|
||||
Clone a QEMU guest with multiple disks
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-clone \
|
||||
--connect qemu:///system \
|
||||
--original demo \
|
||||
--name newdemo \
|
||||
--file /var/lib/xen/images/newdemo.img \
|
||||
--file /var/lib/xen/images/newdata.img
|
||||
|
||||
|
||||
Clone a guest to a physical device which is at least as big as the
|
||||
original guests disks. If the destination device is bigger, the
|
||||
new guest can do a filesystem resize when it boots.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-clone \
|
||||
--connect qemu:///system \
|
||||
--original demo \
|
||||
--name newdemo \
|
||||
--file /dev/HostVG/DemoVM \
|
||||
--mac 52:54:00:34:11:54
|
||||
|
||||
|
||||
BUGS
|
||||
====
|
||||
|
||||
Please see https://virt-manager.org/bugs
|
||||
|
||||
|
||||
COPYRIGHT
|
||||
=========
|
||||
|
||||
Copyright (C) Fujitsu Limited, Copyright (C) Red Hat, Inc,
|
||||
and various contributors.
|
||||
This is free software. You may redistribute copies of it under the terms
|
||||
of the GNU General Public License https://www.gnu.org/licenses/gpl.html.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
|
||||
SEE ALSO
|
||||
========
|
||||
|
||||
``virt-sysprep(1)``, ``virsh(1)``, ``virt-install(1)``, ``virt-manager(1)``, the project website https://virt-manager.org
|
|
@ -1,144 +0,0 @@
|
|||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
virt-convert - convert ovf/vmx to native libvirt guests
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<virt-convert> INPUT.vmx|INPUT.ovf|INPUT-DIR|INPUT.zip [OPTIONS]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<virt-convert> is a command line tool for converting VMX or OVF virtual
|
||||
machines to native libvirt XML. Disk format conversion can also be done
|
||||
at the same time.
|
||||
|
||||
The simplest invocation is simply: virt-convert INPUT. INPUT might be
|
||||
a .vmx or .ovf file, a directory containing a .vmx or .ovf file (and
|
||||
likely 1 or more disk images), or an appliance archive like .zip, .tar.gz,
|
||||
or .ova. virt-convert will try to do the right thing in each case.
|
||||
|
||||
By default, the virt-convert will convert all encountered disk images
|
||||
to 'raw' format, sending the output to a new directory location. So the
|
||||
original disk images are _not_ altered in place.
|
||||
|
||||
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--connect> URI
|
||||
|
||||
Connect to a non-default hypervisor. See L<virt-install(1)> for details
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 CONVERSION OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-i> INPUT-FORMAT
|
||||
|
||||
=item B<--input-format> INPUT-FORMAT
|
||||
|
||||
Input format. This should be auto-detected, but can be forced if necessary. Currently C<vmx> and C<ovf> are supported.
|
||||
|
||||
=item B<-D> OUTPUT-FORMAT
|
||||
|
||||
=item B<--disk-format> OUTPUT-FORMAT
|
||||
|
||||
Output disk format. The default is 'raw', so any encountered disk images will be converted to 'raw' format using L<qemu-img(1)>. Pass C<none> if no conversion should be performed: in this case the images will just be copied to the specified --destination.
|
||||
|
||||
=item B<--destination> DIRECTORY
|
||||
|
||||
The directory to send converted/copied disk images. If not specified, the hypervisor default is used, typically /var/lib/libvirt/images.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 MISCELLANEOUS OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--noautoconsole>
|
||||
|
||||
Don't automatically try to connect to the guest console. The default behaviour
|
||||
is to launch L<virt-viewer(1)> to display the graphical console, or to run the
|
||||
C<virsh> C<console> command to display the text console. Use of this parameter
|
||||
will disable this behaviour.
|
||||
|
||||
=item B<--print-xml>
|
||||
|
||||
Print the generated libvirt XML, but do not perform any disk conversions or
|
||||
install/start the guest. This option implies --dry-run.
|
||||
|
||||
=item B<--dry-run>
|
||||
|
||||
Proceed through the conversion process, but don't convert disks or actually
|
||||
write any converted files.
|
||||
|
||||
=item B<-h>
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Show the help message and exit
|
||||
|
||||
=item B<--version>
|
||||
|
||||
Show program's version number and exit
|
||||
|
||||
=item B<-q>
|
||||
|
||||
=item B<--quiet>
|
||||
|
||||
Avoid verbose output.
|
||||
|
||||
=item B<-d>
|
||||
|
||||
=item B<--debug>
|
||||
|
||||
Print debugging information
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Run a fedora18 OVA archive:
|
||||
|
||||
# virt-convert fedora18.ova
|
||||
|
||||
Run an extracted zip archive containing a centos6 .vmx and .vmdk file, converting the images to qcow2 format
|
||||
|
||||
# virt-convert centos6/ --disk-format qcow2
|
||||
|
||||
Convert the specified .vmx file. Any references disk images must be in the same directory. Don't change the disk format. Move the disk images to /tmp
|
||||
|
||||
# virt-convert foo.vmx --disk-format none --destination /tmp
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Please see L<https://virt-manager.org/bugs>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) Red Hat, Inc, and various contributors.
|
||||
This is free software. You may redistribute copies of it under the terms
|
||||
of the GNU General Public License C<https://www.gnu.org/licenses/gpl.html>.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<virt-install(1)>, the project website C<https://virt-manager.org>
|
||||
|
||||
=cut
|
||||
|
1899
man/virt-install.pod
1899
man/virt-install.pod
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,107 +0,0 @@
|
|||
|
||||
=head1 NAME
|
||||
|
||||
virt-manager - display the virtual machine desktop management tool
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<virt-manager> [OPTIONS]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<virt-manager> is a desktop tool for managing virtual machines. It
|
||||
provides the ability to control the lifecycle of existing machines
|
||||
(bootup/shutdown,pause/resume,suspend/restore), provision new virtual
|
||||
machines and various types of store, manage virtual networks,
|
||||
access the graphical console of virtual machines, and view performance
|
||||
statistics, all done locally or remotely.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
The following options are accepted when running C<virt-manager>:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-h>
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Display command line help summary
|
||||
|
||||
=item B<--version>
|
||||
|
||||
Show virt-manager's version number and exit
|
||||
|
||||
=item B<-c> URI
|
||||
|
||||
=item B<--connect>=URI
|
||||
|
||||
Specify the hypervisor connection C<URI>
|
||||
|
||||
=item B<--debug>
|
||||
|
||||
List debugging output to the console (normally this is only logged in
|
||||
~/.cache/virt-manager/virt-manager.log). This function implies --no-fork.
|
||||
|
||||
=item B<--no-fork>
|
||||
|
||||
Don't fork C<virt-manager> off into the background: run it blocking the
|
||||
current terminal. Useful for seeing possible errors dumped to stdout/stderr.
|
||||
|
||||
=item B<--show-DIALOG-WINDOW>
|
||||
|
||||
Display the corresponding C<DIALOG-WINDOW> when launching C<virt-manager>.
|
||||
Connection autostart is skipped, and the manager window will not be shown
|
||||
at startup in this case.
|
||||
|
||||
The following C<DIALOG-WINDOW> options are currently available:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--show-domain-creator>
|
||||
|
||||
Display the wizard for creating new virtual machines
|
||||
|
||||
=item B<--show-domain-editor> NAME|ID|UUID
|
||||
|
||||
Display the dialog for editing properties of the virtual machine with
|
||||
unique ID matching either the domain name, ID, or UUID
|
||||
|
||||
=item B<--show-domain-performance> NAME|ID|UUID
|
||||
|
||||
Display the dialog for monitoring performance of the virtual machine with
|
||||
unique ID matching either the domain name, ID, or UUID
|
||||
|
||||
=item B<--show-domain-console> NAME|ID|UUID
|
||||
|
||||
Display the virtual console of the virtual machine with
|
||||
unique ID matching either the domain name, ID, or UUID
|
||||
|
||||
=item B<--show-host-summary>
|
||||
|
||||
Display the main window summarizing performance for all virtual machines
|
||||
on the host.
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
Standard GTK options like --g-fatal-warnings are also accepted.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Please see L<https://virt-manager.org/bugs/>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) Red Hat, Inc, and various contributors.
|
||||
This is free software. You may redistribute copies of it under the terms of the GNU General
|
||||
Public License C<https://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent
|
||||
permitted by law.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
C<virsh(1)>, C<virt-viewer(1)>, the project website C<https://virt-manager.org>
|
||||
|
||||
=cut
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
============
|
||||
virt-manager
|
||||
============
|
||||
|
||||
---------------------------------------
|
||||
Graphical tool for managing libvirt VMs
|
||||
---------------------------------------
|
||||
|
||||
:Manual section: 1
|
||||
:Manual group: Virtualization Support
|
||||
|
||||
|
||||
SYNOPSIS
|
||||
========
|
||||
|
||||
``virt-manager`` [OPTIONS]
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
|
||||
|
||||
``virt-manager`` is a desktop tool for managing virtual machines. It
|
||||
provides the ability to control the lifecycle of existing machines
|
||||
(bootup/shutdown,pause/resume,suspend/restore), provision new virtual
|
||||
machines and various types of store, manage virtual networks,
|
||||
access the graphical console of virtual machines, and view performance
|
||||
statistics, all done locally or remotely.
|
||||
|
||||
|
||||
OPTIONS
|
||||
=======
|
||||
|
||||
Standard GTK options like ``--g-fatal-warnings`` are accepted.
|
||||
|
||||
The following options are accepted when running ``virt-manager``
|
||||
|
||||
|
||||
``-h``, ``--help``
|
||||
Display command line help summary
|
||||
|
||||
|
||||
``--version``
|
||||
Show virt-manager's version number and exit
|
||||
|
||||
|
||||
``-c``, ``--connect``
|
||||
Specify the hypervisor connection **URI**
|
||||
|
||||
|
||||
``--debug``
|
||||
List debugging output to the console (normally this is only logged in
|
||||
~/.cache/virt-manager/virt-manager.log). This function implies --no-fork.
|
||||
|
||||
|
||||
``--no-fork``
|
||||
Don't fork ``virt-manager`` off into the background: run it blocking the
|
||||
current terminal. Useful for seeing possible errors dumped to stdout/stderr.
|
||||
|
||||
|
||||
DIALOG WINDOW OPTIONS
|
||||
=====================
|
||||
|
||||
For these options, only the requested window will be shown, the manager
|
||||
window will not be run in this case. Connection autostart will also
|
||||
be disabled. All these options require specifying a manual ``--connect``
|
||||
URI.
|
||||
|
||||
``--show-domain-creator``
|
||||
Display the wizard for creating new virtual machines
|
||||
|
||||
|
||||
``--show-domain-editor`` NAME|ID|UUID
|
||||
Display the dialog for editing properties of the virtual machine with
|
||||
unique ID matching either the domain name, ID, or UUID
|
||||
|
||||
|
||||
``--show-domain-performance`` NAME|ID|UUID
|
||||
Display the dialog for monitoring performance of the virtual machine with
|
||||
unique ID matching either the domain name, ID, or UUID
|
||||
|
||||
|
||||
``--show-domain-console`` NAME|ID|UUID
|
||||
Display the virtual console of the virtual machine with
|
||||
unique ID matching either the domain name, ID, or UUID
|
||||
|
||||
|
||||
``--show-host-summary``
|
||||
Display the host/connection details window.
|
||||
|
||||
|
||||
BUGS
|
||||
====
|
||||
|
||||
Please see https://virt-manager.org/bugs/
|
||||
|
||||
|
||||
COPYRIGHT
|
||||
=========
|
||||
|
||||
Copyright (C) Red Hat, Inc, and various contributors.
|
||||
This is free software. You may redistribute copies of it under the terms of the GNU General
|
||||
Public License https://www.gnu.org/licenses/gpl.html. There is NO WARRANTY, to the extent
|
||||
permitted by law.
|
||||
|
||||
|
||||
SEE ALSO
|
||||
========
|
||||
|
||||
``virsh(1)``, ``virt-viewer(1)``, the project website https://virt-manager.org
|
433
man/virt-xml.pod
433
man/virt-xml.pod
|
@ -1,433 +0,0 @@
|
|||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
virt-xml - Edit libvirt XML using command line options.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<virt-xml> DOMAIN XML-ACTION XML-OPTION [OUTPUT-OPTION] [MISC-OPTIONS] ...
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<virt-xml> is a command line tool for editing libvirt XML using explicit command line options. See the EXAMPLES section at the end of this document to jump right in.
|
||||
|
||||
Each B<virt-xml> invocation requires 3 things: name of an existing domain to alter (or XML passed on stdin), an action to on the XML, and an XML change to make. actions are one of:
|
||||
|
||||
--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 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.
|
||||
|
||||
B<virt-xml> only allows one action and XML pair per invocation. If you need to make multiple edits, invoke the command multiple times.
|
||||
|
||||
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-c> URI
|
||||
|
||||
=item B<--connect>=URI
|
||||
|
||||
Connect to a non-default hypervisor. See L<virt-install(1)> for details
|
||||
|
||||
=item B<domain>
|
||||
|
||||
domain is the name, UUID, or ID of the existing VM. This can be omitted if
|
||||
using --build-xml, or if XML is passed on stdin.
|
||||
|
||||
When a domain is specified, the default output action is --define, even if the VM is running. To update the running VM configuration, add the --update option (but not all options/devices support updating the running VM configuration).
|
||||
|
||||
If XML is passed on stdin, the default output is --print-xml.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
=head1 XML ACTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--edit> [EDIT-OPTIONS]
|
||||
|
||||
Edit the specified XML block. EDIT-OPTIONS tell B<virt-xml> which block to edit. The type of XML that we are editing is decided by XML option that is passed to B<virt-xml>. So if --disk is passed, EDIT-OPTIONS select which <disk> block to edit.
|
||||
|
||||
Certain XML options only ever map to a single XML block, like --cpu, --security, --boot, --clock, and a few others. In those cases, B<virt-xml> will not complain if a corresponding XML block does not already exist, it will create it for you.
|
||||
|
||||
Most XML options support a special value 'clearxml=yes'. When combined with --edit, it will completely blank out the XML block being edited before applying the requested changes. This allows completely rebuilding an XML block. See EXAMPLES for some usage.
|
||||
|
||||
EDIT-OPTIONS examples:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--edit>
|
||||
|
||||
--edit without any options implies 'edit the first block'. So '--edit --disk DISK-OPTIONS' means 'edit the first <disk>'.
|
||||
|
||||
For the single XML block options mentioned above, plain '--edit' without any options is what you always want to use.
|
||||
|
||||
=item B<--edit> #
|
||||
|
||||
Select the specified XML block number. So '--edit 2 --disk DISK-OPTS' means 'edit the second <disk>'. This option only really applies for device XML.
|
||||
|
||||
=item B<--edit> all
|
||||
|
||||
Modify every XML block of the XML option type. So '--edit all --disk DISK-OPTS' means 'edit ever <disk> block'. This option only really applies for device XML.
|
||||
|
||||
=item B<--edit> DEVICE-OPTIONS
|
||||
|
||||
Modify every XML block that matches the passed device options. The device options are in the same format as would be passed to the XML option.
|
||||
|
||||
So '--edit path=/tmp/foo --disk DISK-OPTS' means 'edit every <disk> with path /tmp/foo'. This option only really applies for device XML.
|
||||
|
||||
=back
|
||||
|
||||
=item B<--add-device>
|
||||
|
||||
Append the specified XML options to the XML <devices> list. Example: '--add-device --disk DISK-OPTIONS' will create a new <disk> block and add it to the XML.
|
||||
|
||||
This option will error if specified with a non-device XML option (see --edit section for a partial list).
|
||||
|
||||
=item B<--remove-device>
|
||||
|
||||
Remove the specified device from the XML. The device to remove is chosen by the XML option, which takes arguments in the same format as --edit. Examples
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--remove-device> --disk 2
|
||||
|
||||
Remove the second disk device
|
||||
|
||||
=item B<--remove-device> --network all
|
||||
|
||||
Remove all network devices
|
||||
|
||||
=item B<--remove-device> --sound pcspk
|
||||
|
||||
Remove all sound devices with model='pcspk'
|
||||
|
||||
=back
|
||||
|
||||
This option will error if specified with a non-device XML option (see --edit section for a partial list).
|
||||
|
||||
=item B<--build-xml>
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 OUTPUT OPTIONS
|
||||
|
||||
These options decide what action to take after altering the XML. In the common case these do not need to be specified, as 'XML actions' will imply a default output action, described in detail above. These are only needed if you want to modify the default output.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--update>
|
||||
|
||||
If the specified domain is running, attempt to alter the running VM configuration. If combined with --edit, this is an update operation. If combined with --add-device, this is a device hotplug. If combined with --remove-device, this is a device hotunplug.
|
||||
|
||||
Keep in mind, most XML properties and devices do not support live update operations, so don't expect it to succeed in all cases.
|
||||
|
||||
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.
|
||||
|
||||
=item B<--print-xml>
|
||||
|
||||
Print the generated XML in its entirety. If only this output option is specified, all other output options are disabled and no persistent change is made.
|
||||
|
||||
=item B<--confirm>
|
||||
|
||||
Before defining or updating the domain, show the generated XML diff and interactively request confirmation.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
|
||||
=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
|
||||
|
||||
=item B<--disk>
|
||||
|
||||
=item B<--network>
|
||||
|
||||
=item B<--graphics>
|
||||
|
||||
=item B<--metadata>
|
||||
|
||||
=item B<--memory>
|
||||
|
||||
=item B<--vcpus>
|
||||
|
||||
=item B<--cpu>
|
||||
|
||||
=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<--idmap>
|
||||
|
||||
=item B<--controller>
|
||||
|
||||
=item B<--input>
|
||||
|
||||
=item B<--serial>
|
||||
|
||||
=item B<--parallel>
|
||||
|
||||
=item B<--channel>
|
||||
|
||||
=item B<--console>
|
||||
|
||||
=item B<--hostdev>
|
||||
|
||||
=item B<--filesystem>
|
||||
|
||||
=item B<--sound>
|
||||
|
||||
=item B<--watchdog>
|
||||
|
||||
=item B<--video>
|
||||
|
||||
=item B<--smartcard>
|
||||
|
||||
=item B<--redirdev>
|
||||
|
||||
=item B<--memballoon>
|
||||
|
||||
=item B<--tpm>
|
||||
|
||||
=item B<--rng>
|
||||
|
||||
=item B<--panic>
|
||||
|
||||
=item B<--memdev>
|
||||
|
||||
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>
|
||||
|
||||
Option strings are in the format of: --option opt=val,opt2=val2,... example: --disk path=/tmp/foo,shareable=on. Properties can be used with '--option opt=,', so to clear a disks cache setting you could use '--disk cache=,'
|
||||
|
||||
For any option, use --option=? to see a list of all available sub options, example: --disk=? or --boot=?
|
||||
|
||||
--help output also lists a few general examples. See the EXAMPLES section below for some common examples.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 MISCELLANEOUS OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-h>
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Show the help message and exit
|
||||
|
||||
=item B<--version>
|
||||
|
||||
Show program's version number and exit
|
||||
|
||||
=item B<-q>
|
||||
|
||||
=item B<--quiet>
|
||||
|
||||
Avoid verbose output.
|
||||
|
||||
=item B<-d>
|
||||
|
||||
=item B<--debug>
|
||||
|
||||
Print debugging information
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
See a list of all suboptions that --disk and --network take
|
||||
|
||||
# virt-xml --disk=? --network=?
|
||||
|
||||
Change the <description> of domain 'EXAMPLE':
|
||||
|
||||
# virt-xml EXAMPLE --edit --metadata description="my new description"
|
||||
|
||||
# Enable the boot device menu for domain 'EXAMPLE':
|
||||
|
||||
# virt-xml EXAMPLE --edit --boot menu=on
|
||||
|
||||
Clear the previous <cpu> definition of domain 'winxp', change it to 'host-model', but interactively confirm the diff before saving:
|
||||
|
||||
# virt-xml winxp --edit --cpu host-model,clearxml=yes --confirm
|
||||
|
||||
Change the second sound card to model=ich6 on 'fedora19', but only output the diff:
|
||||
|
||||
# virt-xml fedora19 --edit 2 --sound model=ich6 --print-diff
|
||||
|
||||
Update the every graphics device password to 'foo' of the running VM 'rhel6':
|
||||
|
||||
# virt-xml rhel6 --edit all --graphics password=foo --update
|
||||
|
||||
Remove the disk path from disk device hdc:
|
||||
|
||||
# virt-xml rhel6 --edit target=hdc --disk path=
|
||||
|
||||
Change all disk devices of type 'disk' to use cache=none, using XML from stdin, printing the new XML to stdout.
|
||||
|
||||
# cat <xmlfile> | virt-xml --edit device=disk --disk cache=none
|
||||
|
||||
Change disk 'hda' IO to native and use startup policy as 'optional'.
|
||||
|
||||
# virt-xml fedora20 --edit target=hda \
|
||||
--disk io=native,startup_policy=optional
|
||||
|
||||
Change all host devices to use driver_name=vfio for VM 'fedora20' on the remote connection
|
||||
|
||||
# virt-xml --connect qemu+ssh://remotehost/system \
|
||||
fedora20 --edit all --hostdev driver_name=vfio
|
||||
|
||||
Hotplug host USB device 001.003 to running domain 'fedora19':
|
||||
|
||||
# virt-xml fedora19 --update --add-device --hostdev 001.003
|
||||
|
||||
Add a spicevmc channel to the domain 'winxp', that will be available after the next VM shutdown.
|
||||
|
||||
# virt-xml winxp --add-device --channel spicevmc
|
||||
|
||||
Create a 10G qcow2 disk image and attach it to 'fedora18' for the next VM startup:
|
||||
|
||||
# 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
|
||||
|
||||
Remove all graphics devices from the VM 'rhel7' after the next shutdown:
|
||||
|
||||
# virt-xml rhel7 --remove-device --graphics all
|
||||
|
||||
Generate XML for a virtio console device and print it to stdout:
|
||||
|
||||
# virt-xml --build-xml --console pty,target_type=virtio
|
||||
|
||||
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
|
||||
|
||||
Virtualization hosts supported by libvirt may not permit all changes that might seem possible. Some edits made to a VM's definition may be ignored. For instance, QEMU does not allow the removal of certain devices once they've been defined.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Please see L<https://virt-manager.org/bugs>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) Red Hat, Inc, and various contributors.
|
||||
This is free software. You may redistribute copies of it under the terms
|
||||
of the GNU General Public License C<https://www.gnu.org/licenses/gpl.html>.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<virt-install(1)>, the project website C<https://virt-manager.org>
|
||||
|
||||
=cut
|
|
@ -0,0 +1,456 @@
|
|||
========
|
||||
virt-xml
|
||||
========
|
||||
|
||||
--------------------------------------------
|
||||
Edit libvirt XML using command line options.
|
||||
--------------------------------------------
|
||||
|
||||
|
||||
:Manual section: 1
|
||||
:Manual group: Virtualization Support
|
||||
|
||||
|
||||
SYNOPSIS
|
||||
========
|
||||
|
||||
``virt-xml`` DOMAIN XML-ACTION XML-OPTION [OUTPUT-OPTION] [MISC-OPTIONS] ...
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
|
||||
``virt-xml`` is a command line tool for editing libvirt XML using explicit command line options. See the EXAMPLES section at the end of this document to jump right in.
|
||||
|
||||
Each ``virt-xml`` invocation requires 3 things: name of an existing domain to alter (or XML passed on stdin), an action to on the XML, and an XML change to make. actions are one of:
|
||||
|
||||
* ``--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 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.
|
||||
|
||||
``virt-xml`` only allows one action and XML pair per invocation. If you need to make multiple edits, invoke the command multiple times.
|
||||
|
||||
|
||||
OPTIONS
|
||||
=======
|
||||
|
||||
``-c`` ``--connect`` URI
|
||||
Connect to a non-default hypervisor. See virt-install(1) for details
|
||||
|
||||
|
||||
``domain``
|
||||
domain is the name, UUID, or ID of the existing VM. This can be omitted if
|
||||
using --build-xml, or if XML is passed on stdin.
|
||||
|
||||
When a domain is specified, the default output action is --define, even if the
|
||||
VM is running. To update the running VM configuration, add the --update option
|
||||
(but not all options/devices support updating the running VM configuration).
|
||||
|
||||
If XML is passed on stdin, the default output is --print-xml.
|
||||
|
||||
|
||||
XML ACTIONS
|
||||
===========
|
||||
|
||||
``--edit`` [EDIT-OPTIONS]
|
||||
Edit the specified XML block. EDIT-OPTIONS tell ``virt-xml`` which block
|
||||
to edit. The type of XML that we are editing is decided by XML option that
|
||||
is passed to ``virt-xml`` . So if --disk is passed, EDIT-OPTIONS select
|
||||
which <disk> block to edit.
|
||||
|
||||
Certain XML options only ever map to a single XML block, like --cpu,
|
||||
--security, --boot, --clock, and a few others. In those cases,
|
||||
``virt-xml`` will not complain if a corresponding XML block does not
|
||||
already exist, it will create it for you.
|
||||
|
||||
Most XML options support a special value 'clearxml=yes'. When combined
|
||||
with --edit, it will completely blank out the XML block being edited
|
||||
before applying the requested changes. This allows completely rebuilding
|
||||
an XML block. See EXAMPLES for some usage.
|
||||
|
||||
EDIT-OPTIONS examples:
|
||||
|
||||
* ``--edit``
|
||||
--edit without any options implies 'edit the first block'. So
|
||||
'--edit --disk DISK-OPTIONS' means 'edit the first <disk>'.
|
||||
|
||||
For the single XML block options mentioned above, plain
|
||||
'--edit' without any options is what you always want to use.
|
||||
|
||||
* ``--edit`` #
|
||||
Select the specified XML block number. So '--edit 2 --disk DISK-OPTS'
|
||||
means 'edit the second <disk>'. This option only really applies for
|
||||
device XML.
|
||||
|
||||
* ``--edit`` all
|
||||
Modify every XML block of the XML option type. So
|
||||
'--edit all --disk DISK-OPTS' means 'edit ever <disk> block'.
|
||||
This option only really applies for device XML.
|
||||
|
||||
|
||||
* ``--edit`` DEVICE-OPTIONS
|
||||
Modify every XML block that matches the passed device options.
|
||||
The device options are in the same format as would be passed to
|
||||
the XML option.
|
||||
|
||||
So `--edit path=/tmp/foo --disk DISK-OPTS` means 'edit every <disk> with
|
||||
path /tmp/foo'. This option only really applies for device XML.
|
||||
|
||||
|
||||
``--add-device``
|
||||
Append the specified XML options to the XML <devices> list. Example:
|
||||
'--add-device --disk DISK-OPTIONS' will create a new <disk> block and
|
||||
add it to the XML.
|
||||
|
||||
This option will error if specified with a non-device XML option
|
||||
(see --edit section for a partial list).
|
||||
|
||||
|
||||
``--remove-device``
|
||||
Remove the specified device from the XML. The device to remove is chosen
|
||||
by the XML option, which takes arguments in the same format as --edit.
|
||||
Examples:
|
||||
|
||||
* ``--remove-device --disk 2``
|
||||
Remove the second disk device
|
||||
|
||||
* ``--remove-device --network all``
|
||||
Remove all network devices
|
||||
|
||||
* ``--remove-device --sound pcspk``
|
||||
Remove all sound devices with model='pcspk'
|
||||
|
||||
This option will error if specified with a non-device XML option
|
||||
(see --edit isection for a partial list).
|
||||
|
||||
|
||||
``--build-xml``
|
||||
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.
|
||||
|
||||
|
||||
OUTPUT OPTIONS
|
||||
==============
|
||||
|
||||
These options decide what action to take after altering the XML. In the common case these do not need to be specified, as 'XML actions' will imply a default output action, described in detail above. These are only needed if you want to modify the default output.
|
||||
|
||||
|
||||
``--update``
|
||||
If the specified domain is running, attempt to alter the running VM configuration. If combined with --edit, this is an update operation. If combined with --add-device, this is a device hotplug. If combined with --remove-device, this is a device hotunplug.
|
||||
|
||||
Keep in mind, most XML properties and devices do not support live update operations, so don't expect it to succeed in all cases.
|
||||
|
||||
By default this also implies ``--define``.
|
||||
|
||||
|
||||
``--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.
|
||||
|
||||
|
||||
``--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 ``--update``.
|
||||
|
||||
|
||||
``--start``
|
||||
Start the VM after performing the requested changes. If combined with --no-define, this will create transient VM boot with the requested changes.
|
||||
|
||||
|
||||
``--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.
|
||||
|
||||
|
||||
``--print-xml``
|
||||
Print the generated XML in its entirety. If only this output option is specified, all other output options are disabled and no persistent change is made.
|
||||
|
||||
|
||||
``--confirm``
|
||||
Before defining or updating the domain, show the generated XML diff and interactively request confirmation.
|
||||
|
||||
|
||||
GUEST OS OPTIONS
|
||||
================
|
||||
|
||||
``--os-variant``, ``--osinfo`` 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 ``virt-xml --osinfo list`` to get the list of the
|
||||
accepted OS variants. See ``osinfo-query os`` for even more output.
|
||||
|
||||
See virt-install(1) documentation for more details about ``--os-variant/--osinfo``
|
||||
|
||||
|
||||
XML OPTIONS
|
||||
===========
|
||||
|
||||
* ``--disk``
|
||||
* ``--network``
|
||||
* ``--graphics``
|
||||
* ``--metadata``
|
||||
* ``--memory``
|
||||
* ``--vcpus``
|
||||
* ``--cpu``
|
||||
* ``--iothreads``
|
||||
* ``--seclabel``
|
||||
* ``--keywrap``
|
||||
* ``--cputune``
|
||||
* ``--numatune``
|
||||
* ``--memtune``
|
||||
* ``--blkiotune``
|
||||
* ``--memorybacking``
|
||||
* ``--features``
|
||||
* ``--clock``
|
||||
* ``--pm``
|
||||
* ``--events``
|
||||
* ``--resources``
|
||||
* ``--sysinfo``
|
||||
* ``--xml``
|
||||
* ``--qemu-commandline``
|
||||
* ``--launchSecurity``
|
||||
* ``--boot``
|
||||
* ``--idmap``
|
||||
* ``--controller``
|
||||
* ``--input``
|
||||
* ``--serial``
|
||||
* ``--parallel``
|
||||
* ``--channel``
|
||||
* ``--console``
|
||||
* ``--hostdev``
|
||||
* ``--filesystem``
|
||||
* ``--sound``
|
||||
* ``--audio``
|
||||
* ``--watchdog``
|
||||
* ``--video``
|
||||
* ``--smartcard``
|
||||
* ``--redirdev``
|
||||
* ``--memballoon``
|
||||
* ``--tpm``
|
||||
* ``--rng``
|
||||
* ``--panic``
|
||||
* ``--shmem``
|
||||
* ``--memdev``
|
||||
|
||||
These options alter the XML for a single class of XML elements. More complete documentation is found in virt-install(1).
|
||||
|
||||
Generally these options map pretty straightforwardly to the libvirt XML, documented at https://libvirt.org/formatdomain.html
|
||||
|
||||
Option strings are in the format of: --option opt=val,opt2=val2,... example: --disk path=/tmp/foo,shareable=on. Properties can be used with '--option opt=,', so to clear a disks cache setting you could use '--disk cache=,'
|
||||
|
||||
For any option, use --option=? to see a list of all available sub options, example: --disk=? or --boot=?
|
||||
|
||||
--help output also lists a few general examples. See the EXAMPLES section below for some common examples.
|
||||
|
||||
virt-xml specifically has some operations that don't really apply to virt-install
|
||||
Examples:
|
||||
|
||||
``--boot refresh-machine-type=yes``
|
||||
Refresh the XML ``<os><type machine=X></os>`` value to the latest one
|
||||
that qemu provides. For example, if your VM has a machine type value
|
||||
``pc-q35-4.0``, this will reset the value to ``q35``, and works
|
||||
similarly with other versioned machine types. Occasionally this is
|
||||
necessary to get enable qemu bug fixes, or when qemu deprecates and
|
||||
removes old machine type values.
|
||||
|
||||
|
||||
MISCELLANEOUS OPTIONS
|
||||
=====================
|
||||
|
||||
``-h``, ``--help``
|
||||
Show the help message and exit
|
||||
|
||||
|
||||
``--version``
|
||||
Show program's version number and exit
|
||||
|
||||
|
||||
``-q``, ``--quiet``
|
||||
Avoid verbose output.
|
||||
|
||||
|
||||
``-d``, ``--debug``
|
||||
Print debugging information
|
||||
|
||||
|
||||
EXAMPLES
|
||||
========
|
||||
|
||||
See a list of all suboptions that --disk and --network take
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml --disk=? --network=?
|
||||
|
||||
|
||||
Change the <description> of domain 'EXAMPLE':
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml EXAMPLE --edit --metadata description="my new description"
|
||||
|
||||
|
||||
# Enable the boot device menu for domain 'EXAMPLE':
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml EXAMPLE --edit --boot menu=on
|
||||
|
||||
|
||||
Clear the previous <cpu> definition of domain 'winxp', change it to 'host-model', but interactively confirm the diff before saving:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml winxp --edit --cpu host-model,clearxml=yes --confirm
|
||||
|
||||
|
||||
Change the second sound card to model=ich6 on 'fedora19', but only output the diff:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml fedora19 --edit 2 --sound model=ich6 --print-diff
|
||||
|
||||
|
||||
Update the every graphics device password to 'foo' of the running VM 'rhel6':
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml rhel6 --edit all --graphics password=foo --update
|
||||
|
||||
|
||||
Remove the disk path from disk device hdc:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml rhel6 --edit target=hdc --disk path=
|
||||
|
||||
|
||||
Change all disk devices of type 'disk' to use cache=none, using XML from stdin, printing the new XML to stdout.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# cat <xmlfile> | virt-xml --edit device=disk --disk cache=none
|
||||
|
||||
|
||||
Change disk 'hda' IO to native and use startup policy as 'optional'.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml fedora20 --edit target=hda \
|
||||
--disk io=native,startup_policy=optional
|
||||
|
||||
|
||||
Change all host devices to use driver_name=vfio for VM 'fedora20' on the remote connection
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml --connect qemu+ssh://remotehost/system \
|
||||
fedora20 --edit all --hostdev driver_name=vfio
|
||||
|
||||
|
||||
Hotplug host USB device 001.003 to running domain 'fedora19':
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml fedora19 --update --add-device --hostdev 001.003
|
||||
|
||||
|
||||
Add a spicevmc channel to the domain 'winxp', that will be available after the next VM shutdown.
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml winxp --add-device --channel spicevmc
|
||||
|
||||
|
||||
Create a 10G qcow2 disk image and attach it to 'fedora18' for the next VM startup:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# 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:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml fedora18 --osinfo fedora18 --add-device \
|
||||
--disk /var/lib/libvirt/images/newimage.qcow2,format=qcow2,size=10
|
||||
|
||||
|
||||
Hotunplug the disk vdb from the running domain 'rhel7':
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml rhel7 --update --remove-device --disk target=vdb
|
||||
|
||||
|
||||
Remove all graphics devices from the VM 'rhel7' after the next shutdown:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml rhel7 --remove-device --graphics all
|
||||
|
||||
|
||||
Generate XML for a virtio console device and print it to stdout:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml --build-xml --console pty,target_type=virtio
|
||||
|
||||
|
||||
Add qemu command line passthrough:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml f25 --edit --confirm --qemu-commandline="-device FOO"
|
||||
|
||||
|
||||
Use boot device 'network' for a single transient boot:
|
||||
|
||||
.. code-block::
|
||||
|
||||
# virt-xml myvm --no-define --start --edit --boot network
|
||||
|
||||
|
||||
CAVEATS
|
||||
=======
|
||||
|
||||
Virtualization hosts supported by libvirt may not permit all changes that might seem possible. Some edits made to a VM's definition may be ignored. For instance, QEMU does not allow the removal of certain devices once they've been defined.
|
||||
|
||||
|
||||
BUGS
|
||||
====
|
||||
|
||||
Please see https://virt-manager.org/bugs
|
||||
|
||||
|
||||
COPYRIGHT
|
||||
=========
|
||||
|
||||
Copyright (C) Red Hat, Inc, and various contributors.
|
||||
This is free software. You may redistribute copies of it under the terms
|
||||
of the GNU General Public License https://www.gnu.org/licenses/gpl.html.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
|
||||
SEE ALSO
|
||||
========
|
||||
|
||||
virt-install(1), the project website https://virt-manager.org
|
|
@ -0,0 +1,48 @@
|
|||
as
|
||||
bg
|
||||
bn_IN
|
||||
bs
|
||||
ca
|
||||
cs
|
||||
da
|
||||
de
|
||||
en_GB
|
||||
es
|
||||
fi
|
||||
fr
|
||||
fur
|
||||
gu
|
||||
hi
|
||||
hr
|
||||
hu
|
||||
id
|
||||
is
|
||||
it
|
||||
ja
|
||||
kn
|
||||
ko
|
||||
ml
|
||||
mr
|
||||
ms
|
||||
nb
|
||||
nl
|
||||
or
|
||||
pa
|
||||
pl
|
||||
pt_BR
|
||||
pt
|
||||
ro
|
||||
ru
|
||||
sk
|
||||
sr@latin
|
||||
sr
|
||||
sv
|
||||
ta
|
||||
te
|
||||
tr
|
||||
uk
|
||||
zh_CN
|
||||
zh_TW
|
||||
kab
|
||||
si
|
||||
ka
|
13386
po/bn_IN.po
13386
po/bn_IN.po
File diff suppressed because it is too large
Load Diff
11814
po/en_GB.po
11814
po/en_GB.po
File diff suppressed because it is too large
Load Diff
10657
po/cmn.po → po/kab.po
10657
po/cmn.po → po/kab.po
File diff suppressed because it is too large
Load Diff
12173
po/pt_BR.po
12173
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
10661
po/vi.po → po/si.po
10661
po/vi.po → po/si.po
File diff suppressed because it is too large
Load Diff
10742
po/sr@latin.po
10742
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<config xmlns="http://zanata.org/namespace/config/">
|
||||
<url>https://fedora.zanata.org/</url>
|
||||
<project>virt-manager</project>
|
||||
<project-version>master</project-version>
|
||||
<project-type>gettext</project-type>
|
||||
</config>
|
11849
po/zh_CN.po
11849
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
11897
po/zh_TW.po
11897
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
36
setup.cfg
36
setup.cfg
|
@ -1,26 +1,14 @@
|
|||
[pycodestyle]
|
||||
|
||||
# List of error codes:
|
||||
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
|
||||
|
||||
|
||||
# E122: Continuation line missing indentation or outdented
|
||||
# E123: Closing bracket does not match indentation of opening
|
||||
# bracket's line
|
||||
# E126: Continuation line over-indented for hanging indent
|
||||
# E127: Continuation line over-indented for visual indent
|
||||
# E128: Continuation line under-indented for visual indent
|
||||
# E129: Visually indented line with same indent as next logical line
|
||||
# E221: Multiple spaces before operator
|
||||
# E241: Multiple spaces after comma
|
||||
# E301: Expected 1 blank line, found 0
|
||||
# E303: Too many blank lines
|
||||
# E305: Expected 2 blank lines after end of function or class
|
||||
# E306: Expected 1 blank line before a nested definition
|
||||
# E402: Module level import not at top of file
|
||||
# E501: Line too long (82 > 79 characters)
|
||||
# W504: line break after binary operator
|
||||
# E741: Do not use simply named variables
|
||||
|
||||
|
||||
ignore = E122, E123, E126, E127, E128, E129, E221, E241, E301, E303, E305, E306, E402, E501, W504, E741
|
||||
|
||||
[tool:pytest]
|
||||
testpaths = tests/
|
||||
norecursedirs = data
|
||||
addopts = --tb=native
|
||||
filterwarnings =
|
||||
ignore:.*
|
||||
|
||||
[egg_info]
|
||||
tag_build =
|
||||
tag_date = 0
|
||||
|
||||
|
|
572
setup.py
572
setup.py
|
@ -1,48 +1,52 @@
|
|||
#!/usr/bin/python3
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# This work is licensed under the GNU GPLv2 or later.
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
|
||||
import sys
|
||||
if sys.version_info.major < 3:
|
||||
print("virt-manager is python3 only. Run this as ./setup.py")
|
||||
sys.exit(1)
|
||||
|
||||
import glob
|
||||
import fnmatch
|
||||
import importlib.util
|
||||
import os
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import sysconfig
|
||||
import subprocess
|
||||
|
||||
import distutils
|
||||
import distutils.command.build
|
||||
import distutils.command.install
|
||||
import distutils.command.install_data
|
||||
import distutils.command.install_egg_info
|
||||
import distutils.command.sdist
|
||||
import distutils.dist
|
||||
import distutils.log
|
||||
import distutils.sysconfig
|
||||
import setuptools
|
||||
import setuptools.command.install
|
||||
import setuptools.command.install_egg_info
|
||||
|
||||
|
||||
sysprefix = distutils.sysconfig.get_config_var("prefix")
|
||||
# distutils will be deprecated in python 3.12 in favor of setuptools,
|
||||
# but as of this writing there's standard no setuptools way to extend the
|
||||
# 'build' commands which are the only standard commands we trigger.
|
||||
# https://github.com/pypa/setuptools/issues/2591
|
||||
#
|
||||
# Newer setuptools will transparently support 'import distutils' though.
|
||||
# That can be overridden with SETUPTOOLS_USE_DISTUTILS env variable
|
||||
import distutils.command.build # pylint: disable=wrong-import-order
|
||||
|
||||
|
||||
SYSPREFIX = sysconfig.get_config_var("prefix")
|
||||
|
||||
|
||||
def _import_buildconfig():
|
||||
# A bit of crazyness to import the buildconfig file without importing
|
||||
# the rest of virtinst, so the build process doesn't require all the
|
||||
# runtime deps to be installed
|
||||
import warnings
|
||||
|
||||
# 'imp' is deprecated. We use it elsewhere though too. Deal with using
|
||||
# the modern replacement when we replace all usage
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
import imp
|
||||
buildconfig = imp.load_source('buildconfig', 'virtinst/buildconfig.py')
|
||||
if "libvirt" in sys.modules:
|
||||
raise RuntimeError("Found libvirt in sys.modules. setup.py should "
|
||||
"not import virtinst.")
|
||||
return buildconfig.BuildConfig
|
||||
spec = importlib.util.spec_from_file_location(
|
||||
'buildconfig', 'virtinst/buildconfig.py')
|
||||
buildconfig = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(buildconfig)
|
||||
if "libvirt" in sys.modules:
|
||||
raise RuntimeError("Found libvirt in sys.modules. setup.py should "
|
||||
"not import virtinst.")
|
||||
return buildconfig.BuildConfig
|
||||
|
||||
|
||||
BuildConfig = _import_buildconfig()
|
||||
|
@ -54,38 +58,11 @@ _desktop_files = [
|
|||
("share/applications", ["data/virt-manager.desktop.in"]),
|
||||
]
|
||||
_appdata_files = [
|
||||
("share/appdata", ["data/virt-manager.appdata.xml.in"]),
|
||||
("share/metainfo", ["data/virt-manager.appdata.xml.in"]),
|
||||
]
|
||||
|
||||
|
||||
def _generate_potfiles_in():
|
||||
def find(dirname, ext):
|
||||
ret = []
|
||||
for root, ignore, filenames in os.walk(dirname):
|
||||
for filename in fnmatch.filter(filenames, ext):
|
||||
ret.append(os.path.join(root, filename))
|
||||
ret.sort(key=lambda s: s.lower())
|
||||
return ret
|
||||
|
||||
scripts = ["virt-manager", "virt-install",
|
||||
"virt-clone", "virt-convert", "virt-xml"]
|
||||
|
||||
potfiles = "\n".join(scripts) + "\n\n"
|
||||
potfiles += "\n".join(find("virtManager", "*.py")) + "\n\n"
|
||||
potfiles += "\n".join(find("virtconv", "*.py")) + "\n\n"
|
||||
potfiles += "\n".join(find("virtinst", "*.py")) + "\n\n"
|
||||
|
||||
for ignore, filelist in _desktop_files + _appdata_files:
|
||||
potfiles += "\n".join(filelist) + "\n"
|
||||
potfiles += "\n"
|
||||
|
||||
potfiles += "\n".join(["[type: gettext/glade]" + f for
|
||||
f in find("ui", "*.ui")]) + "\n\n"
|
||||
|
||||
return potfiles
|
||||
|
||||
|
||||
class my_build_i18n(distutils.command.build.build):
|
||||
class my_build_i18n(setuptools.Command):
|
||||
"""
|
||||
Add our desktop files to the list, saves us having to track setup.cfg
|
||||
"""
|
||||
|
@ -99,30 +76,13 @@ class my_build_i18n(distutils.command.build.build):
|
|||
pass
|
||||
|
||||
def run(self):
|
||||
potfiles = _generate_potfiles_in()
|
||||
potpath = "po/POTFILES.in"
|
||||
|
||||
try:
|
||||
print("Writing %s" % potpath)
|
||||
open(potpath, "w").write(potfiles)
|
||||
self._run()
|
||||
finally:
|
||||
print("Removing %s" % potpath)
|
||||
os.unlink(potpath)
|
||||
|
||||
def _run(self):
|
||||
# Borrowed from python-distutils-extra
|
||||
po_dir = "po"
|
||||
if self.merge_po:
|
||||
pot_file = os.path.join("po", "virt-manager.pot")
|
||||
for po_file in glob.glob("%s/*.po" % po_dir):
|
||||
cmd = ["msgmerge", "--previous", "-o", po_file, po_file, pot_file]
|
||||
self.spawn(cmd)
|
||||
|
||||
# Update po(t) files and print a report
|
||||
# We have to change the working dir to the po dir for intltool
|
||||
cmd = ["intltool-update",
|
||||
(self.merge_po and "-r" or "-p"), "-g", "virt-manager"]
|
||||
|
||||
wd = os.getcwd()
|
||||
os.chdir("po")
|
||||
self.spawn(cmd)
|
||||
os.chdir(wd)
|
||||
max_po_mtime = 0
|
||||
for po_file in glob.glob("%s/*.po" % po_dir):
|
||||
lang = os.path.basename(po_file[:-3])
|
||||
|
@ -143,9 +103,9 @@ class my_build_i18n(distutils.command.build.build):
|
|||
targetpath = os.path.join("share/locale", lang, "LC_MESSAGES")
|
||||
self.distribution.data_files.append((targetpath, (mo_file,)))
|
||||
|
||||
# merge .in with translation
|
||||
for (file_set, switch) in [(_desktop_files, "-d"),
|
||||
(_appdata_files, "-x")]:
|
||||
# Merge .in with translations using gettext
|
||||
for (file_set, switch) in [(_appdata_files, "--xml"),
|
||||
(_desktop_files, "--desktop")]:
|
||||
for (target, files) in file_set:
|
||||
build_target = os.path.join("build", target)
|
||||
if not os.path.exists(build_target):
|
||||
|
@ -159,8 +119,8 @@ class my_build_i18n(distutils.command.build.build):
|
|||
file_merged = os.path.basename(f)
|
||||
|
||||
file_merged = os.path.join(build_target, file_merged)
|
||||
cmd = ["intltool-merge", switch, po_dir, f,
|
||||
file_merged]
|
||||
cmd = ["msgfmt", switch, "--template", f, "-d", po_dir,
|
||||
"-o", file_merged]
|
||||
mtime_merged = (os.path.exists(file_merged) and
|
||||
os.path.getmtime(file_merged)) or 0
|
||||
mtime_file = os.path.getmtime(f)
|
||||
|
@ -173,49 +133,56 @@ class my_build_i18n(distutils.command.build.build):
|
|||
|
||||
|
||||
class my_build(distutils.command.build.build):
|
||||
"""
|
||||
Create simple shell wrappers for /usr/bin/ tools to point to /usr/share
|
||||
Compile .pod file
|
||||
"""
|
||||
|
||||
def _make_bin_wrappers(self):
|
||||
cmds = ["virt-manager", "virt-install", "virt-clone",
|
||||
"virt-convert", "virt-xml"]
|
||||
template = """#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, "%(sharepath)s")
|
||||
from %(pkgname)s import %(filename)s
|
||||
|
||||
%(filename)s.runcli()
|
||||
"""
|
||||
if not os.path.exists("build"):
|
||||
os.mkdir("build")
|
||||
sharepath = os.path.join(BuildConfig.prefix, "share", "virt-manager")
|
||||
|
||||
for app in cmds:
|
||||
sharepath = os.path.join(BuildConfig.prefix,
|
||||
"share", "virt-manager", app)
|
||||
def make_script(pkgname, filename, toolname):
|
||||
assert os.path.exists(pkgname + "/" + filename + ".py")
|
||||
content = template % {
|
||||
"sharepath": sharepath,
|
||||
"pkgname": pkgname,
|
||||
"filename": filename}
|
||||
|
||||
wrapper = "#!/bin/sh\n\n"
|
||||
wrapper += "exec \"%s\" \"$@\"" % (sharepath)
|
||||
|
||||
newpath = os.path.abspath(os.path.join("build", app))
|
||||
newpath = os.path.abspath(os.path.join("build", toolname))
|
||||
print("Generating %s" % newpath)
|
||||
open(newpath, "w").write(wrapper)
|
||||
open(newpath, "w").write(content)
|
||||
|
||||
make_script("virtinst", "virtinstall", "virt-install")
|
||||
make_script("virtinst", "virtclone", "virt-clone")
|
||||
make_script("virtinst", "virtxml", "virt-xml")
|
||||
make_script("virtManager", "virtmanager", "virt-manager")
|
||||
|
||||
|
||||
def _make_man_pages(self):
|
||||
for path in glob.glob("man/*.pod"):
|
||||
rstbin = shutil.which("rst2man")
|
||||
if not rstbin:
|
||||
rstbin = shutil.which("rst2man.py")
|
||||
if not rstbin:
|
||||
sys.exit("Didn't find rst2man or rst2man.py")
|
||||
|
||||
for path in glob.glob("man/*.rst"):
|
||||
base = os.path.basename(path)
|
||||
appname = os.path.splitext(base)[0]
|
||||
newpath = os.path.join(os.path.dirname(path),
|
||||
appname + ".1")
|
||||
|
||||
print("Generating %s" % newpath)
|
||||
ret = os.system('pod2man '
|
||||
'--center "Virtual Machine Manager" '
|
||||
'--release %s --name %s '
|
||||
'< %s > %s' % (BuildConfig.version,
|
||||
appname.upper(),
|
||||
path, newpath))
|
||||
if ret != 0:
|
||||
raise RuntimeError("Generating '%s' failed." % newpath)
|
||||
out = subprocess.check_output([rstbin, "--strict", path])
|
||||
open(newpath, "wb").write(out)
|
||||
|
||||
if os.system("grep -IRq 'Hey!' man/") == 0:
|
||||
raise RuntimeError("man pages have errors in them! "
|
||||
"(grep for 'Hey!')")
|
||||
self.distribution.data_files.append(
|
||||
('share/man/man1', (newpath,)))
|
||||
|
||||
def _build_icons(self):
|
||||
for size in glob.glob(os.path.join("data/icons", "*")):
|
||||
|
@ -236,7 +203,7 @@ class my_build(distutils.command.build.build):
|
|||
|
||||
|
||||
def _make_bash_completion_files(self):
|
||||
scripts = ["virt-install", "virt-clone", "virt-convert", "virt-xml"]
|
||||
scripts = ["virt-install", "virt-clone", "virt-xml"]
|
||||
srcfile = "data/bash-completion.sh.in"
|
||||
builddir = "build/bash-completion/"
|
||||
if not os.path.exists(builddir):
|
||||
|
@ -266,7 +233,7 @@ class my_build(distutils.command.build.build):
|
|||
distutils.command.build.build.run(self)
|
||||
|
||||
|
||||
class my_egg_info(distutils.command.install_egg_info.install_egg_info):
|
||||
class my_egg_info(setuptools.command.install_egg_info.install_egg_info):
|
||||
"""
|
||||
Disable egg_info installation, seems pointless for a non-library
|
||||
"""
|
||||
|
@ -274,19 +241,19 @@ class my_egg_info(distutils.command.install_egg_info.install_egg_info):
|
|||
pass
|
||||
|
||||
|
||||
class my_install(distutils.command.install.install):
|
||||
class my_install(setuptools.command.install.install):
|
||||
"""
|
||||
Error if we weren't 'configure'd with the correct install prefix
|
||||
"""
|
||||
def finalize_options(self):
|
||||
if self.prefix is None:
|
||||
if BuildConfig.prefix != sysprefix:
|
||||
print("Using configured prefix=%s instead of sysprefix=%s" % (
|
||||
BuildConfig.prefix, sysprefix))
|
||||
if BuildConfig.prefix != SYSPREFIX:
|
||||
print("Using configured prefix=%s instead of SYSPREFIX=%s" % (
|
||||
BuildConfig.prefix, SYSPREFIX))
|
||||
self.prefix = BuildConfig.prefix
|
||||
else:
|
||||
print("Using sysprefix=%s" % sysprefix)
|
||||
self.prefix = sysprefix
|
||||
print("Using SYSPREFIX=%s" % SYSPREFIX)
|
||||
self.prefix = SYSPREFIX
|
||||
|
||||
elif self.prefix != BuildConfig.prefix:
|
||||
print("Install prefix=%s doesn't match configure prefix=%s\n"
|
||||
|
@ -294,46 +261,30 @@ class my_install(distutils.command.install.install):
|
|||
(self.prefix, BuildConfig.prefix))
|
||||
sys.exit(1)
|
||||
|
||||
distutils.command.install.install.finalize_options(self)
|
||||
setuptools.command.install.install.finalize_options(self)
|
||||
|
||||
|
||||
class my_install_data(distutils.command.install_data.install_data):
|
||||
def run(self):
|
||||
distutils.command.install_data.install_data.run(self)
|
||||
setuptools.command.install.install.run(self)
|
||||
|
||||
if not self.distribution.no_update_icon_cache:
|
||||
distutils.log.info("running gtk-update-icon-cache")
|
||||
icon_path = os.path.join(self.install_dir, "share/icons/hicolor")
|
||||
print("running gtk-update-icon-cache")
|
||||
icon_path = os.path.join(self.install_data, "share/icons/hicolor")
|
||||
self.spawn(["gtk-update-icon-cache", "-q", "-t", icon_path])
|
||||
|
||||
if not self.distribution.no_compile_schemas:
|
||||
distutils.log.info("compiling gsettings schemas")
|
||||
gschema_install = os.path.join(self.install_dir,
|
||||
print("compiling gsettings schemas")
|
||||
gschema_install = os.path.join(self.install_data,
|
||||
"share/glib-2.0/schemas")
|
||||
self.spawn(["glib-compile-schemas", gschema_install])
|
||||
|
||||
|
||||
class my_sdist(distutils.command.sdist.sdist):
|
||||
description = "Update virt-manager.spec; build sdist-tarball."
|
||||
|
||||
def run(self):
|
||||
f1 = open('virt-manager.spec.in', 'r')
|
||||
f2 = open('virt-manager.spec', 'w')
|
||||
for line in f1:
|
||||
f2.write(line.replace('@VERSION@', BuildConfig.version))
|
||||
f1.close()
|
||||
f2.close()
|
||||
|
||||
distutils.command.sdist.sdist.run(self)
|
||||
|
||||
|
||||
###################
|
||||
# Custom commands #
|
||||
###################
|
||||
|
||||
class my_rpm(distutils.core.Command):
|
||||
class my_rpm(setuptools.Command):
|
||||
user_options = []
|
||||
description = "Build src and noarch rpms."
|
||||
description = "Build RPMs and output to the source directory."
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
@ -341,15 +292,19 @@ class my_rpm(distutils.core.Command):
|
|||
pass
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Run sdist, then 'rpmbuild' the tar.gz
|
||||
"""
|
||||
self.run_command('sdist')
|
||||
os.system('rpmbuild -ta --clean dist/virt-manager-%s.tar.gz' %
|
||||
BuildConfig.version)
|
||||
srcdir = os.path.dirname(__file__)
|
||||
cmd = [
|
||||
"rpmbuild", "-ta",
|
||||
"--define", "_rpmdir %s" % srcdir,
|
||||
"--define", "_srcrpmdir %s" % srcdir,
|
||||
"--define", "_specdir /tmp",
|
||||
"dist/virt-manager-%s.tar.gz" % BuildConfig.version,
|
||||
]
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
|
||||
class configure(distutils.core.Command):
|
||||
class configure(setuptools.Command):
|
||||
user_options = [
|
||||
("prefix=", None, "installation prefix"),
|
||||
("default-graphics=", None,
|
||||
|
@ -365,7 +320,7 @@ class configure(distutils.core.Command):
|
|||
pass
|
||||
|
||||
def initialize_options(self):
|
||||
self.prefix = sysprefix
|
||||
self.prefix = SYSPREFIX
|
||||
self.default_graphics = None
|
||||
self.default_hvs = None
|
||||
|
||||
|
@ -383,212 +338,19 @@ class configure(distutils.core.Command):
|
|||
print("Generated %s" % BuildConfig.cfgpath)
|
||||
|
||||
|
||||
class TestBaseCommand(distutils.core.Command):
|
||||
user_options = [
|
||||
('debug', 'd', 'Show debug output'),
|
||||
('testverbose', None, 'Show verbose output'),
|
||||
('coverage', 'c', 'Show coverage report'),
|
||||
('regenerate-output', None, 'Regenerate test output'),
|
||||
("only=", None,
|
||||
"Run only testcases whose name contains the passed string"),
|
||||
("testfile=", None, "Specific test file to run (e.g "
|
||||
"validation, storage, ...)"),
|
||||
]
|
||||
|
||||
def initialize_options(self):
|
||||
self.debug = 0
|
||||
self.testverbose = 0
|
||||
self.regenerate_output = 0
|
||||
self.coverage = 0
|
||||
self.only = None
|
||||
self._testfiles = []
|
||||
self._clistate = {}
|
||||
self._dir = os.getcwd()
|
||||
self.testfile = None
|
||||
self._force_verbose = False
|
||||
self._external_coverage = False
|
||||
|
||||
class TestCommand(setuptools.Command):
|
||||
user_options = []
|
||||
description = "DEPRECATED: Use `pytest`. See CONTRIBUTING.md"
|
||||
def finalize_options(self):
|
||||
if self.only:
|
||||
# Can do --only many-devices to match on the cli testcase
|
||||
# for "virt-install-many-devices", despite the actual test
|
||||
# function name not containing any '-'
|
||||
self.only = self.only.replace("-", "_")
|
||||
|
||||
def _find_tests_in_dir(self, dirname, excludes):
|
||||
testfiles = []
|
||||
for t in sorted(glob.glob(os.path.join(self._dir, dirname, '*.py'))):
|
||||
base = os.path.basename(t)
|
||||
if base in excludes + ["__init__.py"]:
|
||||
continue
|
||||
|
||||
if self.testfile:
|
||||
check = os.path.basename(self.testfile)
|
||||
if base != check and base != (check + ".py"):
|
||||
continue
|
||||
|
||||
testfiles.append('.'.join(
|
||||
dirname.split("/") + [os.path.splitext(base)[0]]))
|
||||
|
||||
if not testfiles:
|
||||
raise RuntimeError("--testfile didn't catch anything")
|
||||
return testfiles
|
||||
|
||||
def run(self):
|
||||
cov = None
|
||||
if self.coverage:
|
||||
import coverage
|
||||
omit = ["/usr/*", "/*/tests/*", "*progress.py"]
|
||||
cov = coverage.coverage(omit=omit)
|
||||
cov.erase()
|
||||
if not self._external_coverage:
|
||||
cov.start()
|
||||
|
||||
import tests as testsmodule
|
||||
testsmodule.utils.clistate.regenerate_output = bool(
|
||||
self.regenerate_output)
|
||||
testsmodule.utils.clistate.use_coverage = bool(cov)
|
||||
testsmodule.utils.clistate.debug = bool(self.debug)
|
||||
for key, val in self._clistate.items():
|
||||
setattr(testsmodule.utils.clistate, key, val)
|
||||
testsmodule.setup_logging()
|
||||
testsmodule.setup_cli_imports()
|
||||
|
||||
# This makes the test runner report results before exiting from ctrl-c
|
||||
unittest.installHandler()
|
||||
|
||||
tests = unittest.TestLoader().loadTestsFromNames(self._testfiles)
|
||||
if self.only:
|
||||
newtests = []
|
||||
for suite1 in tests:
|
||||
for suite2 in suite1:
|
||||
for testcase in suite2:
|
||||
if self.only in str(testcase):
|
||||
newtests.append(testcase)
|
||||
|
||||
if not newtests:
|
||||
print("--only didn't find any tests")
|
||||
sys.exit(1)
|
||||
tests = unittest.TestSuite(newtests)
|
||||
print("Running only:")
|
||||
for test in newtests:
|
||||
print("%s" % test)
|
||||
print("")
|
||||
|
||||
verbosity = 1
|
||||
if self.debug or self.testverbose or self._force_verbose:
|
||||
verbosity = 2
|
||||
t = unittest.TextTestRunner(verbosity=verbosity)
|
||||
|
||||
try:
|
||||
result = t.run(tests)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(1)
|
||||
|
||||
if cov:
|
||||
if self._external_coverage:
|
||||
cov.load()
|
||||
else:
|
||||
cov.stop()
|
||||
cov.save()
|
||||
|
||||
err = int(bool(len(result.failures) > 0 or
|
||||
len(result.errors) > 0))
|
||||
if cov and not err:
|
||||
cov.report(show_missing=False, skip_covered=True)
|
||||
sys.exit(err)
|
||||
|
||||
|
||||
|
||||
class TestCommand(TestBaseCommand):
|
||||
description = "Runs a quick unit test suite"
|
||||
|
||||
def run(self):
|
||||
'''
|
||||
Finds all the tests modules in tests/, and runs them.
|
||||
'''
|
||||
excludes = ["dist.py", "test_urls.py", "test_inject.py"]
|
||||
testfiles = self._find_tests_in_dir("tests", excludes)
|
||||
|
||||
# Put clitest at the end, since it takes the longest
|
||||
for f in testfiles[:]:
|
||||
if "clitest" in f:
|
||||
testfiles.remove(f)
|
||||
testfiles.append(f)
|
||||
|
||||
# Always want to put checkprops at the end to get accurate results
|
||||
for f in testfiles[:]:
|
||||
if "checkprops" in f:
|
||||
testfiles.remove(f)
|
||||
if not self.testfile:
|
||||
testfiles.append(f)
|
||||
|
||||
self._testfiles = testfiles
|
||||
TestBaseCommand.run(self)
|
||||
|
||||
|
||||
class TestUI(TestBaseCommand):
|
||||
description = "Run UI dogtails tests"
|
||||
|
||||
def run(self):
|
||||
self._testfiles = self._find_tests_in_dir("tests/uitests", [])
|
||||
self._force_verbose = True
|
||||
self._external_coverage = True
|
||||
TestBaseCommand.run(self)
|
||||
|
||||
|
||||
class TestURLFetch(TestBaseCommand):
|
||||
description = "Test fetching kernels and isos from various distro trees"
|
||||
user_options = TestBaseCommand.user_options + [
|
||||
('skip-libosinfo', None,
|
||||
"Don't use libosinfo for media/tree detection, "
|
||||
"Use our internal detection logic."),
|
||||
('force-libosinfo', None,
|
||||
"Only use libosinfo for media/tree detection. This will skip "
|
||||
"some cases that are known not to work, like debian/ubuntu "
|
||||
"tree detection."),
|
||||
('iso-only', None, "Only run iso tests"),
|
||||
('url-only', None, "Only run url tests"),
|
||||
]
|
||||
|
||||
pass
|
||||
def initialize_options(self):
|
||||
TestBaseCommand.initialize_options(self)
|
||||
self.skip_libosinfo = 0
|
||||
self.force_libosinfo = 0
|
||||
self.iso_only = 0
|
||||
self.url_only = 0
|
||||
|
||||
def finalize_options(self):
|
||||
TestBaseCommand.finalize_options(self)
|
||||
|
||||
pass
|
||||
def run(self):
|
||||
self._testfiles = ["tests.test_urls"]
|
||||
self._clistate = {
|
||||
"url_iso_only": bool(self.iso_only),
|
||||
"url_only": bool(self.url_only),
|
||||
"url_skip_libosinfo": bool(self.skip_libosinfo),
|
||||
"url_force_libosinfo": bool(self.force_libosinfo),
|
||||
}
|
||||
TestBaseCommand.run(self)
|
||||
sys.exit("ERROR: `test` is deprecated. Call `pytest` instead. "
|
||||
"See CONTRIBUTING.md for more info.")
|
||||
|
||||
|
||||
class TestInitrdInject(TestBaseCommand):
|
||||
description = "Test initrd inject with real kernels, fetched from URLs"
|
||||
|
||||
def run(self):
|
||||
self._testfiles = ["tests.test_inject"]
|
||||
TestBaseCommand.run(self)
|
||||
|
||||
|
||||
class TestDist(TestBaseCommand):
|
||||
description = "Tests to run before cutting a release"
|
||||
|
||||
def run(self):
|
||||
self._testfiles = ["tests.dist"]
|
||||
TestBaseCommand.run(self)
|
||||
|
||||
|
||||
class CheckPylint(distutils.core.Command):
|
||||
class CheckPylint(setuptools.Command):
|
||||
user_options = [
|
||||
("jobs=", "j", "use multiple processes to speed up Pylint"),
|
||||
]
|
||||
|
@ -605,18 +367,31 @@ class CheckPylint(distutils.core.Command):
|
|||
import pylint.lint
|
||||
import pycodestyle
|
||||
|
||||
files = ["setup.py", "virt-install", "virt-clone",
|
||||
"virt-convert", "virt-xml", "virt-manager",
|
||||
"virtinst", "virtconv", "virtManager",
|
||||
"tests"]
|
||||
lintfiles = [
|
||||
# Put this first so pylint learns what Gtk version we
|
||||
# want to lint against
|
||||
"virtManager/virtmanager.py",
|
||||
"setup.py",
|
||||
"tests",
|
||||
"virtinst",
|
||||
"virtManager"]
|
||||
|
||||
spellfiles = lintfiles[:]
|
||||
spellfiles += list(glob.glob("*.md"))
|
||||
spellfiles += list(glob.glob("man/*.rst"))
|
||||
spellfiles += ["data/virt-manager.appdata.xml.in",
|
||||
"data/virt-manager.desktop.in",
|
||||
"data/org.virt-manager.virt-manager.gschema.xml",
|
||||
"virt-manager.spec"]
|
||||
spellfiles.remove("NEWS.md")
|
||||
|
||||
try:
|
||||
import codespell_lib
|
||||
# pylint: disable=protected-access
|
||||
print("running codespell")
|
||||
codespell_lib._codespell.main(
|
||||
'-I', 'tests/codespell_dict.txt',
|
||||
'--skip', '*.pyc,*.zip,*.vmdk,*.iso,*.xml', *files)
|
||||
'-I', 'tests/data/codespell_dict.txt',
|
||||
'--skip', '*.pyc,*.iso,*.xml', *spellfiles)
|
||||
except ImportError:
|
||||
print("codespell is not installed. skipping...")
|
||||
except Exception as e:
|
||||
|
@ -628,7 +403,7 @@ class CheckPylint(distutils.core.Command):
|
|||
style_guide = pycodestyle.StyleGuide(
|
||||
config_file='setup.cfg',
|
||||
format="pylint",
|
||||
paths=files
|
||||
paths=lintfiles,
|
||||
)
|
||||
report = style_guide.check_files()
|
||||
if style_guide.options.count:
|
||||
|
@ -636,17 +411,17 @@ class CheckPylint(distutils.core.Command):
|
|||
|
||||
print("running pylint")
|
||||
pylint_opts = [
|
||||
"--rcfile", "pylintrc",
|
||||
"--rcfile", ".pylintrc",
|
||||
"--output-format=%s" % output_format,
|
||||
]
|
||||
if self.jobs:
|
||||
pylint_opts += ["--jobs=%d" % self.jobs]
|
||||
|
||||
pylint.lint.Run(files + pylint_opts)
|
||||
pylint.lint.Run(lintfiles + pylint_opts)
|
||||
|
||||
|
||||
class VMMDistribution(distutils.dist.Distribution):
|
||||
global_options = distutils.dist.Distribution.global_options + [
|
||||
class VMMDistribution(setuptools.dist.Distribution):
|
||||
global_options = setuptools.dist.Distribution.global_options + [
|
||||
("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
|
||||
("no-compile-schemas", None, "Don't compile gsettings schemas"),
|
||||
]
|
||||
|
@ -654,10 +429,62 @@ class VMMDistribution(distutils.dist.Distribution):
|
|||
def __init__(self, *args, **kwargs):
|
||||
self.no_update_icon_cache = False
|
||||
self.no_compile_schemas = False
|
||||
distutils.dist.Distribution.__init__(self, *args, **kwargs)
|
||||
setuptools.dist.Distribution.__init__(self, *args, **kwargs)
|
||||
|
||||
|
||||
distutils.core.setup(
|
||||
class ExtractMessages(setuptools.Command):
|
||||
user_options = [
|
||||
]
|
||||
description = "Extract the translation messages"
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
bug_address = "https://github.com/virt-manager/virt-manager/issues"
|
||||
potfile = "po/virt-manager.pot"
|
||||
xgettext_args = [
|
||||
"xgettext",
|
||||
"--add-comments=translators",
|
||||
"--msgid-bugs-address=" + bug_address,
|
||||
"--package-name=virt-manager",
|
||||
"--output=" + potfile,
|
||||
"--sort-by-file",
|
||||
"--join-existing",
|
||||
]
|
||||
|
||||
# Truncate .pot file to ensure it exists
|
||||
open(potfile, "w").write("")
|
||||
|
||||
# First extract the messages from the AppStream sources,
|
||||
# creating the template
|
||||
appdata_files = [f for sublist in _appdata_files for f in sublist[1]]
|
||||
cmd = xgettext_args + appdata_files
|
||||
self.spawn(cmd)
|
||||
|
||||
# Extract the messages from the desktop files
|
||||
desktop_files = [f for sublist in _desktop_files for f in sublist[1]]
|
||||
cmd = xgettext_args + ["--language=Desktop"] + desktop_files
|
||||
self.spawn(cmd)
|
||||
|
||||
# Extract the messages from the Python sources
|
||||
py_sources = list(Path("virtManager").rglob("*.py"))
|
||||
py_sources += list(Path("virtinst").rglob("*.py"))
|
||||
py_sources = [str(src) for src in py_sources]
|
||||
cmd = xgettext_args + ["--language=Python"] + py_sources
|
||||
self.spawn(cmd)
|
||||
|
||||
# Extract the messages from the Glade UI files
|
||||
ui_files = list(Path(".").rglob("*.ui"))
|
||||
ui_files = [str(src) for src in ui_files]
|
||||
cmd = xgettext_args + ["--language=Glade"] + ui_files
|
||||
self.spawn(cmd)
|
||||
|
||||
|
||||
setuptools.setup(
|
||||
name="virt-manager",
|
||||
version=BuildConfig.version,
|
||||
author="Cole Robinson",
|
||||
|
@ -670,17 +497,9 @@ distutils.core.setup(
|
|||
"build/virt-manager",
|
||||
"build/virt-clone",
|
||||
"build/virt-install",
|
||||
"build/virt-convert",
|
||||
"build/virt-xml"]),
|
||||
|
||||
data_files=[
|
||||
("share/virt-manager/", [
|
||||
"virt-manager",
|
||||
"virt-install",
|
||||
"virt-clone",
|
||||
"virt-convert",
|
||||
"virt-xml",
|
||||
]),
|
||||
("share/glib-2.0/schemas",
|
||||
["data/org.virt-manager.virt-manager.gschema.xml"]),
|
||||
("share/virt-manager/ui", glob.glob("ui/*.ui")),
|
||||
|
@ -689,7 +508,6 @@ distutils.core.setup(
|
|||
"man/virt-manager.1",
|
||||
"man/virt-install.1",
|
||||
"man/virt-clone.1",
|
||||
"man/virt-convert.1",
|
||||
"man/virt-xml.1"
|
||||
]),
|
||||
|
||||
|
@ -710,17 +528,16 @@ distutils.core.setup(
|
|||
glob.glob("virtinst/domain/*.py")),
|
||||
("share/virt-manager/virtinst/install",
|
||||
glob.glob("virtinst/install/*.py")),
|
||||
("share/virt-manager/virtconv",
|
||||
glob.glob("virtconv/*.py")),
|
||||
],
|
||||
|
||||
# stop setuptools 61+ thinking we want to include everything automatically
|
||||
py_modules=[],
|
||||
|
||||
cmdclass={
|
||||
'build': my_build,
|
||||
'build_i18n': my_build_i18n,
|
||||
|
||||
'sdist': my_sdist,
|
||||
'install': my_install,
|
||||
'install_data': my_install_data,
|
||||
'install_egg_info': my_egg_info,
|
||||
|
||||
'configure': configure,
|
||||
|
@ -728,11 +545,10 @@ distutils.core.setup(
|
|||
'pylint': CheckPylint,
|
||||
'rpm': my_rpm,
|
||||
'test': TestCommand,
|
||||
'test_ui': TestUI,
|
||||
'test_urls': TestURLFetch,
|
||||
'test_initrd_inject': TestInitrdInject,
|
||||
'test_dist': TestDist,
|
||||
|
||||
'extract_messages': ExtractMessages,
|
||||
},
|
||||
|
||||
distclass=VMMDistribution,
|
||||
packages=[],
|
||||
)
|
||||
|
|
|
@ -3,62 +3,44 @@
|
|||
# This work is licensed under the GNU GPLv2 or later.
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
import atexit
|
||||
import imp
|
||||
import importlib
|
||||
import os
|
||||
|
||||
# Need to do this before any tests or virtinst import
|
||||
os.environ["VIRTINST_TEST_SUITE"] = "1"
|
||||
# Need to do this before we import argcomplete
|
||||
os.environ.pop("_ARC_DEBUG", None)
|
||||
# Make sure the test suite uses an English locale, as we need to match
|
||||
# error/status messages
|
||||
os.environ["LANG"] = "en_US.UTF-8"
|
||||
os.environ.pop("LANGUAGE", None)
|
||||
|
||||
# pylint: disable=wrong-import-position
|
||||
from virtinst import buildconfig
|
||||
from virtinst import log
|
||||
from virtinst import log, reset_logging
|
||||
|
||||
# This sets all the cli bits back to their defaults
|
||||
imp.reload(buildconfig)
|
||||
importlib.reload(buildconfig)
|
||||
|
||||
from tests import utils
|
||||
|
||||
virtinstall = None
|
||||
virtclone = None
|
||||
virtconvert = None
|
||||
virtxml = None
|
||||
# pylint: disable=ungrouped-imports
|
||||
from virtinst import virtinstall
|
||||
from virtinst import virtclone
|
||||
from virtinst import virtxml
|
||||
|
||||
|
||||
def setup_logging():
|
||||
import logging
|
||||
rootLogger = logging.getLogger()
|
||||
for handler in rootLogger.handlers:
|
||||
rootLogger.removeHandler(handler)
|
||||
reset_logging()
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
format="%(levelname)-8s %(message)s")
|
||||
|
||||
if utils.clistate.debug:
|
||||
rootLogger.setLevel(logging.DEBUG)
|
||||
fmt = "%(levelname)-8s %(message)s"
|
||||
streamHandler = logging.StreamHandler()
|
||||
streamHandler.setFormatter(logging.Formatter(fmt))
|
||||
if utils.TESTCONFIG.debug:
|
||||
streamHandler.setLevel(logging.DEBUG)
|
||||
log.setLevel(logging.DEBUG)
|
||||
else:
|
||||
rootLogger.setLevel(logging.ERROR)
|
||||
|
||||
|
||||
def setup_cli_imports():
|
||||
_cleanup_imports = []
|
||||
|
||||
def _cleanup_imports_cb():
|
||||
for f in _cleanup_imports:
|
||||
if os.path.exists(f):
|
||||
os.unlink(f)
|
||||
|
||||
def _import(name, path):
|
||||
_cleanup_imports.append(path + "c")
|
||||
return imp.load_source(name, path)
|
||||
|
||||
global virtinstall
|
||||
global virtclone
|
||||
global virtconvert
|
||||
global virtxml
|
||||
atexit.register(_cleanup_imports_cb)
|
||||
virtinstall = _import("virtinstall", "virt-install")
|
||||
virtclone = _import("virtclone", "virt-clone")
|
||||
virtconvert = _import("virtconvert", "virt-convert")
|
||||
virtxml = _import("virtxml", "virt-xml")
|
||||
streamHandler.setLevel(logging.ERROR)
|
||||
log.setLevel(logging.ERROR)
|
||||
log.addHandler(streamHandler)
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
<capabilities>
|
||||
<!-- The xml comes from the Distro KVMIBM for s390x -->
|
||||
|
||||
<host>
|
||||
<uuid>b53b15d6-348a-4620-afd3-81278b81fbd7</uuid>
|
||||
<cpu>
|
||||
<arch>s390x</arch>
|
||||
<model>host</model>
|
||||
<topology sockets="1" cores="4" threads="1"/>
|
||||
<pages unit="KiB" size="4"/>
|
||||
<pages unit="KiB" size="1024"/>
|
||||
</cpu>
|
||||
<power_management>
|
||||
<suspend_disk/>
|
||||
<suspend_hybrid/>
|
||||
</power_management>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
<uri_transport>tcp</uri_transport>
|
||||
<uri_transport>rdma</uri_transport>
|
||||
</uri_transports>
|
||||
</migration_features>
|
||||
<topology>
|
||||
<cells num="1">
|
||||
<cell id="0">
|
||||
<memory unit="KiB">3911020</memory>
|
||||
<cpus num="4">
|
||||
<cpu id="0" socket_id="0" core_id="0" siblings="0"/>
|
||||
<cpu id="1" socket_id="0" core_id="1" siblings="1"/>
|
||||
<cpu id="2" socket_id="0" core_id="2" siblings="2"/>
|
||||
<cpu id="3" socket_id="0" core_id="3" siblings="3"/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
</topology>
|
||||
<secmodel>
|
||||
<model>selinux</model>
|
||||
<doi>0</doi>
|
||||
<baselabel type="kvm">system_u:system_r:svirt_t:s0</baselabel>
|
||||
<baselabel type="qemu">system_u:system_r:svirt_tcg_t:s0</baselabel>
|
||||
</secmodel>
|
||||
<secmodel>
|
||||
<model>dac</model>
|
||||
<doi>0</doi>
|
||||
<baselabel type="kvm">+107:+107</baselabel>
|
||||
<baselabel type="qemu">+107:+107</baselabel>
|
||||
</secmodel>
|
||||
</host>
|
||||
|
||||
<guest>
|
||||
<os_type>hvm</os_type>
|
||||
<arch name="s390x">
|
||||
<wordsize>64</wordsize>
|
||||
<emulator>/usr/bin/qemu-system-s390x</emulator>
|
||||
<machine maxCpus="64">s390-ccw-kvmibm-1.1.1</machine>
|
||||
<machine canonical="s390-ccw-kvmibm-1.1.1" maxCpus="64">s390-ccw-virtio</machine>
|
||||
<machine maxCpus="64">s390-ccw-kvmibm-1.1.0</machine>
|
||||
<machine maxCpus="255">s390-virtio</machine>
|
||||
<machine canonical="s390-virtio" maxCpus="255">s390</machine>
|
||||
<machine maxCpus="255">s390-ccw-virtio-2.4</machine>
|
||||
<domain type="qemu">
|
||||
<emulator>/usr/bin/qemu-system-s390x</emulator>
|
||||
</domain>
|
||||
<domain type="kvm">
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<machine maxCpus="64">s390-ccw-kvmibm-1.1.1</machine>
|
||||
<machine canonical="s390-ccw-kvmibm-1.1.1" maxCpus="64">s390-ccw-virtio</machine>
|
||||
<machine maxCpus="64">s390-ccw-kvmibm-1.1.0</machine>
|
||||
<machine maxCpus="255">s390-virtio</machine>
|
||||
<machine canonical="s390-virtio" maxCpus="255">s390</machine>
|
||||
<machine maxCpus="255">s390-ccw-virtio-2.4</machine>
|
||||
</domain>
|
||||
</arch>
|
||||
<features>
|
||||
<cpuselection/>
|
||||
<deviceboot/>
|
||||
<disksnapshot default="on" toggle="no"/>
|
||||
</features>
|
||||
</guest>
|
||||
|
||||
</capabilities>
|
|
@ -1,140 +0,0 @@
|
|||
<domainCapabilities>
|
||||
<path>/bin/qemu-system-x86_64</path>
|
||||
<domain>kvm</domain>
|
||||
<machine>pc-i440fx-2.1</machine>
|
||||
<arch>x86_64</arch>
|
||||
<vcpu max='255'/>
|
||||
<os supported='yes'>
|
||||
<loader supported='yes'>
|
||||
<value>/usr/share/AAVMF/AAVMF_CODE.fd</value>
|
||||
<value>/usr/share/OVMF/OVMF_CODE.fd</value>
|
||||
<value>/usr/share/edk2/ovmf-ia32/OVMF_CODE.fd</value>
|
||||
<value>/usr/share/edk2/arm/QEMU_EFI-pflash.raw</value>
|
||||
<enum name='type'>
|
||||
<value>rom</value>
|
||||
<value>pflash</value>
|
||||
</enum>
|
||||
<enum name='readonly'>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</enum>
|
||||
</loader>
|
||||
</os>
|
||||
<cpu>
|
||||
<mode name='host-passthrough' supported='yes'/>
|
||||
<mode name='host-model' supported='yes'>
|
||||
<model fallback='forbid'>Broadwell</model>
|
||||
<vendor>Intel</vendor>
|
||||
<feature policy='require' name='vme'/>
|
||||
<feature policy='require' name='ss'/>
|
||||
<feature policy='require' name='f16c'/>
|
||||
<feature policy='require' name='rdrand'/>
|
||||
<feature policy='require' name='hypervisor'/>
|
||||
<feature policy='require' name='arat'/>
|
||||
<feature policy='require' name='tsc_adjust'/>
|
||||
<feature policy='require' name='xsaveopt'/>
|
||||
<feature policy='require' name='pdpe1gb'/>
|
||||
<feature policy='require' name='abm'/>
|
||||
<feature policy='require' name='invtsc'/>
|
||||
</mode>
|
||||
<mode name='custom' supported='yes'>
|
||||
<model usable='yes'>qemu64</model>
|
||||
<model usable='yes'>qemu32</model>
|
||||
<model usable='no'>phenom</model>
|
||||
<model usable='yes'>pentium3</model>
|
||||
<model usable='yes'>pentium2</model>
|
||||
<model usable='yes'>pentium</model>
|
||||
<model usable='yes'>n270</model>
|
||||
<model usable='yes'>kvm64</model>
|
||||
<model usable='yes'>kvm32</model>
|
||||
<model usable='yes'>coreduo</model>
|
||||
<model usable='yes'>core2duo</model>
|
||||
<model usable='no'>athlon</model>
|
||||
<model usable='yes'>Westmere</model>
|
||||
<model usable='no'>Westmere-IBRS</model>
|
||||
<model usable='no'>Skylake-Server</model>
|
||||
<model usable='no'>Skylake-Server-IBRS</model>
|
||||
<model usable='no'>Skylake-Client</model>
|
||||
<model usable='no'>Skylake-Client-IBRS</model>
|
||||
<model usable='yes'>SandyBridge</model>
|
||||
<model usable='no'>SandyBridge-IBRS</model>
|
||||
<model usable='yes'>Penryn</model>
|
||||
<model usable='no'>Opteron_G5</model>
|
||||
<model usable='yes'>Opteron_G4</model>
|
||||
<model usable='no'>Opteron_G3</model>
|
||||
<model usable='yes'>Opteron_G2</model>
|
||||
<model usable='yes'>Opteron_G1</model>
|
||||
<model usable='yes'>Nehalem</model>
|
||||
<model usable='no'>Nehalem-IBRS</model>
|
||||
<model usable='yes'>IvyBridge</model>
|
||||
<model usable='no'>IvyBridge-IBRS</model>
|
||||
<model usable='yes'>Haswell</model>
|
||||
<model usable='yes'>Haswell-noTSX</model>
|
||||
<model usable='no'>Haswell-noTSX-IBRS</model>
|
||||
<model usable='no'>Haswell-IBRS</model>
|
||||
<model usable='no'>EPYC</model>
|
||||
<model usable='no'>EPYC-IBPB</model>
|
||||
<model usable='yes'>Conroe</model>
|
||||
<model usable='yes'>Broadwell</model>
|
||||
<model usable='yes'>Broadwell-noTSX</model>
|
||||
<model usable='no'>Broadwell-noTSX-IBRS</model>
|
||||
<model usable='no'>Broadwell-IBRS</model>
|
||||
<model usable='yes'>486</model>
|
||||
</mode>
|
||||
</cpu>
|
||||
<devices>
|
||||
<disk supported='yes'>
|
||||
<enum name='diskDevice'>
|
||||
<value>disk</value>
|
||||
<value>cdrom</value>
|
||||
<value>floppy</value>
|
||||
<value>lun</value>
|
||||
</enum>
|
||||
<enum name='bus'>
|
||||
<value>ide</value>
|
||||
<value>fdc</value>
|
||||
<value>scsi</value>
|
||||
<value>virtio</value>
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
<value>sdl</value>
|
||||
<value>vnc</value>
|
||||
<value>spice</value>
|
||||
</enum>
|
||||
</graphics>
|
||||
<video supported='yes'>
|
||||
<enum name='modelType'>
|
||||
<value>vga</value>
|
||||
<value>cirrus</value>
|
||||
<value>vmvga</value>
|
||||
<value>qxl</value>
|
||||
<value>virtio</value>
|
||||
</enum>
|
||||
</video>
|
||||
<hostdev supported='yes'>
|
||||
<enum name='mode'>
|
||||
<value>subsystem</value>
|
||||
</enum>
|
||||
<enum name='startupPolicy'>
|
||||
<value>default</value>
|
||||
<value>mandatory</value>
|
||||
<value>requisite</value>
|
||||
<value>optional</value>
|
||||
</enum>
|
||||
<enum name='subsysType'>
|
||||
<value>usb</value>
|
||||
<value>pci</value>
|
||||
<value>scsi</value>
|
||||
</enum>
|
||||
<enum name='capsType'/>
|
||||
<enum name='pciBackend'/>
|
||||
</hostdev>
|
||||
</devices>
|
||||
<features>
|
||||
<gic supported='no'/>
|
||||
</features>
|
||||
</domainCapabilities>
|
|
@ -1,135 +0,0 @@
|
|||
<domainCapabilities>
|
||||
<path>/usr/libexec/qemu-kvm</path>
|
||||
<domain>kvm</domain>
|
||||
<machine>pc-i440fx-rhel7.0.0</machine>
|
||||
<arch>x86_64</arch>
|
||||
<vcpu max='240'/>
|
||||
<iothreads supported='no'/>
|
||||
<os supported='yes'>
|
||||
<loader supported='yes'>
|
||||
<value>/usr/share/OVMF/OVMF_CODE.secboot.fd</value>
|
||||
<enum name='type'>
|
||||
<value>rom</value>
|
||||
<value>pflash</value>
|
||||
</enum>
|
||||
<enum name='readonly'>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</enum>
|
||||
</loader>
|
||||
</os>
|
||||
<cpu>
|
||||
<mode name='host-passthrough' supported='yes'/>
|
||||
<mode name='host-model' supported='yes'>
|
||||
<model fallback='allow'>Skylake-Client-IBRS</model>
|
||||
<vendor>Intel</vendor>
|
||||
<feature policy='require' name='ss'/>
|
||||
<feature policy='require' name='vmx'/>
|
||||
<feature policy='require' name='osxsave'/>
|
||||
<feature policy='require' name='hypervisor'/>
|
||||
<feature policy='require' name='tsc_adjust'/>
|
||||
<feature policy='require' name='clflushopt'/>
|
||||
<feature policy='require' name='stibp'/>
|
||||
<feature policy='require' name='ssbd'/>
|
||||
<feature policy='require' name='xsaves'/>
|
||||
<feature policy='require' name='pdpe1gb'/>
|
||||
</mode>
|
||||
<mode name='custom' supported='yes'>
|
||||
<model usable='unknown'>EPYC-IBPB</model>
|
||||
<model usable='unknown'>EPYC</model>
|
||||
<model usable='unknown'>Opteron_G5</model>
|
||||
<model usable='unknown'>Opteron_G4</model>
|
||||
<model usable='unknown'>Opteron_G3</model>
|
||||
<model usable='unknown'>Opteron_G2</model>
|
||||
<model usable='unknown'>Opteron_G1</model>
|
||||
<model usable='unknown'>Skylake-Server-IBRS</model>
|
||||
<model usable='unknown'>Skylake-Server</model>
|
||||
<model usable='unknown'>Skylake-Client-IBRS</model>
|
||||
<model usable='unknown'>Skylake-Client</model>
|
||||
<model usable='unknown'>Broadwell-IBRS</model>
|
||||
<model usable='unknown'>Broadwell</model>
|
||||
<model usable='unknown'>Haswell-IBRS</model>
|
||||
<model usable='unknown'>Haswell</model>
|
||||
<model usable='unknown'>IvyBridge-IBRS</model>
|
||||
<model usable='unknown'>IvyBridge</model>
|
||||
<model usable='unknown'>SandyBridge-IBRS</model>
|
||||
<model usable='unknown'>SandyBridge</model>
|
||||
<model usable='unknown'>Westmere-IBRS</model>
|
||||
<model usable='unknown'>Westmere</model>
|
||||
<model usable='unknown'>Nehalem-IBRS</model>
|
||||
<model usable='unknown'>Nehalem</model>
|
||||
<model usable='unknown'>Penryn</model>
|
||||
<model usable='unknown'>Conroe</model>
|
||||
<model usable='unknown'>cpu64-rhel6</model>
|
||||
<model usable='unknown'>n270</model>
|
||||
<model usable='unknown'>athlon</model>
|
||||
<model usable='unknown'>pentium3</model>
|
||||
<model usable='unknown'>pentium2</model>
|
||||
<model usable='unknown'>pentium</model>
|
||||
<model usable='unknown'>486</model>
|
||||
<model usable='unknown'>coreduo</model>
|
||||
<model usable='unknown'>kvm32</model>
|
||||
<model usable='unknown'>qemu32</model>
|
||||
<model usable='unknown'>kvm64</model>
|
||||
<model usable='unknown'>core2duo</model>
|
||||
<model usable='unknown'>phenom</model>
|
||||
<model usable='unknown'>qemu64</model>
|
||||
</mode>
|
||||
</cpu>
|
||||
<devices>
|
||||
<disk supported='yes'>
|
||||
<enum name='diskDevice'>
|
||||
<value>disk</value>
|
||||
<value>cdrom</value>
|
||||
<value>floppy</value>
|
||||
<value>lun</value>
|
||||
</enum>
|
||||
<enum name='bus'>
|
||||
<value>ide</value>
|
||||
<value>fdc</value>
|
||||
<value>scsi</value>
|
||||
<value>virtio</value>
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
<value>sdl</value>
|
||||
<value>vnc</value>
|
||||
<value>spice</value>
|
||||
</enum>
|
||||
</graphics>
|
||||
<video supported='yes'>
|
||||
<enum name='modelType'>
|
||||
<value>vga</value>
|
||||
<value>cirrus</value>
|
||||
<value>qxl</value>
|
||||
</enum>
|
||||
</video>
|
||||
<hostdev supported='yes'>
|
||||
<enum name='mode'>
|
||||
<value>subsystem</value>
|
||||
</enum>
|
||||
<enum name='startupPolicy'>
|
||||
<value>default</value>
|
||||
<value>mandatory</value>
|
||||
<value>requisite</value>
|
||||
<value>optional</value>
|
||||
</enum>
|
||||
<enum name='subsysType'>
|
||||
<value>usb</value>
|
||||
<value>pci</value>
|
||||
<value>scsi</value>
|
||||
</enum>
|
||||
<enum name='capsType'/>
|
||||
<enum name='pciBackend'/>
|
||||
</hostdev>
|
||||
</devices>
|
||||
<features>
|
||||
<gic supported='no'/>
|
||||
<vmcoreinfo supported='yes'/>
|
||||
<genid supported='no'/>
|
||||
<sev supported='no'/>
|
||||
</features>
|
||||
</domainCapabilities>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue