summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* virtManager: Remove disk SGIO UICole Robinson2020-01-253-55/+2
| | | | | | | | This is a very advanced field that is only shown for a quite advanced disk device='lun' config. Users that know they need this can easily set the value via the XML editor Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtManager: Remove disk format/driver_type UICole Robinson2020-01-255-99/+2
| | | | | | | | | | | | | | This was proposed here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html """ * disk: storage format: this was from before the days when we storage-ified everything and we could get the disk format wrong, telling qemu it has a raw image when it's qcow2. shouldn't be needed anymore for normal virt usage """ Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtManager: Remove disk serial UICole Robinson2020-01-254-39/+2
| | | | | | | | | | | | | This was proposed here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html """ * disk: serial: I know this is useful in some cases but seems quite obscure. I think the XML editor is fine unless there's some common usecase I'm missing """ Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtManager: Remove spice tlsport UICole Robinson2020-01-246-123/+8
| | | | | | | | | | | This was discussed here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html tlsPort is an advanced config feature. With the XML editing support, it's less important to have this as a first class UI element. Users that know they need this setting can set it directly in the XML Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Remove virt-convertCole Robinson2020-01-2444-3183/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This was raised here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html Quoting from that: """ virt-convert takes an ovf/ova or vmx file and spits out libvirt XML. It started as a code drop a long time ago that could translate back and forth between vmx, ovf, and virt-image, a long dead appliance format. In 2014 I converted it to do vmx -> libvirt and ovf -> libvirt which was a CLI breaking change, but I never heard a peep of a complaint. It doesn't seem to do a particularly thorough job at its intended goal, I've seen 2-3 bug reports in the past 5 years and generally it doesn't seem to have any users. Let's kill it. If anyone has the desire to keep it alive it could live as a separate project that's a wrapper around virt-install but there's no compelling reason to keep it in virt-manager.git IMO """ Nothing has changed since then, so here is the removal. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: kill --graphics keymap=local, and hostkeymap moduleCole Robinson2020-01-2410-363/+4
| | | | | | | | | | | | | | | | | | Removing this was discussed here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html This is the old default, where we would try to determine a static keymap value from host graphics config files, and set that in the XML. We haven't defaulted to this for a long time, setting a static keymap is suboptimal generally, and the file parsing code is not up to date for modern host config. So let's remove it The hostkeymap module is now unused, so remove it and all the custom testing for it. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtManager: Remove graphics keymap UICole Robinson2020-01-247-77/+7
| | | | | | | | | | | | | | | Removing this was discussed here: https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html For a decade, qemu and xen and virt-manager work together to make setting a manual keymap redundant. Advertising it in the UI does more harm than good, because users may think they need to specify one when in the vast majority of cases it will give worse behavior. With the XML editing UI, users still have a way to do this by hand if they really know what they are doing. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Drop keymap santizingCole Robinson2020-01-242-9/+0
| | | | | | | | | | | | | | | We shouldn't be validating against a static list of keymaps, instead we should let libvirt or the hypervisor throw and error. Also the accompanying code is about to be removed. It's possible this will break command line usage for some users, like if they were passing keymap=US and depending on our logic to lower() it for them. I think this should be rare, and IMO it's acceptable to tell users to just fix their command line, which should work correctly with older versions too, so it should be a one time fix. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* pollhelpers: Streamline usage a bitCole Robinson2020-01-243-55/+61
| | | | | | | | | * Explicitly define the build 'cb', don't use lambda * Rename pollhelpers arguments, clarifying use of cb * Check support status in pollhelpers * Move 'dopoll' checking up a level in vmmConnection Signed-off-by: Cole Robinson <crobinso@redhat.com>
* pollhelpers: Kill old style pollingCole Robinson2020-01-243-230/+14
| | | | | | | | | | All the major hypervisor drivers have supported listAllDomains since rhel6 vintage libvirt. Most other driver types have had the APIs since their introduction, or for just as long. I will be surprised if this affects anyone in any material way Signed-off-by: Cole Robinson <crobinso@redhat.com>
* connection: Explicitly error if domain listing APIs are not supportedCole Robinson2020-01-242-1/+9
| | | | | | | | This will be more important when we drop old domain polling APIs, because it will be more likely we encounter an old libvirt or weird connection without the expected API support Signed-off-by: Cole Robinson <crobinso@redhat.com>
* connection: Remove is_*_capable wrappersCole Robinson2020-01-247-62/+28
| | | | | | | Call the conn.support check directly. Move the check logging to the initial startup path Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: uitests: Fix for latest storage delete changesCole Robinson2020-01-242-8/+18
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* ui: about: Add year 2020Cole Robinson2020-01-241-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: clitest: Add --unattended reg-login= coverageCole Robinson2020-01-241-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* delete: remove redundant codeLily Nie2020-01-241-2/+0
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* unattended: Add reg-login option to --unattendedFabiano FidĂȘncio2020-01-242-0/+6
| | | | | | | | As osinfo-db introduced the first usage of reg-login, let's also add support for such option when using --unattended. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
* delete: Add _destroy_vm methodLily Nie2020-01-211-4/+12
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* delete: Add _delete_disks methodLily Nie2020-01-211-15/+23
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* delete: Add _delete_vm methodLily Nie2020-01-211-5/+12
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* delete: Add _vm_active_status methodLily Nie2020-01-211-1/+11
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* delete: Add _get_title_text methodLily Nie2020-01-211-12/+19
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* delete: Add _get_disk_datas methodLily Nie2020-01-211-4/+10
| | | | Reviewed-by: Cole Robinson <crobinso@redhat.com>
* delete: Add vmmDeleteStorage classLily Nie2020-01-212-12/+22
| | | | | | | | We should try to hide all the self.vm vs self.disk differences into individual functions to make the code easier to follow and to avoid touch those values by accident in the future Reviewed-by: Cole Robinson <crobinso@redhat.com>
* devices: disk: Ensure abspath when checking search permissionsCole Robinson2020-01-181-0/+4
| | | | | Reported-by: Junqin Zhou <juzhou@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
* man: virt-install: Improve --tpm docsCole Robinson2020-01-181-15/+4
| | | | | | | | | | * Stop listing sub options, since there's multiple, and most won't need to be specified. * Give an example for type=emulator Reported-by: Junqin Zhou <juzhou@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
* baseclass: Log if emit() called from non-MainThreadCole Robinson2020-01-151-0/+10
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Default lxc:/// memory to 1024, and print itCole Robinson2020-01-155-9/+14
| | | | | | | | | | | | | My previous patch was misguided as pointed out by Pavel: https://github.com/virt-manager/virt-manager/issues/73#issuecomment-574680435 And it was setting incorrect memory, which I missed because the tests are busted here. Add a hack to work around that Bump up the default to 1024, and print it, so the user can tell if the default is not to their liking Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: Add some coverage exclusionsCole Robinson2020-01-152-2/+2
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* details: Fix showing the firmware type in case of firmware auto selectionLin Ma2020-01-151-2/+5
| | | | | | | | | | | | | For a shutoff VM, If user select uefi firmware auto selection, e.g. <os firmware='efi'> ... </os> Its firmware information is set to 'BIOS' in details, This is incorrect. This fixes it. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Lin Ma <lma@suse.com>
* domain: Only log once about waiting for qemu agent for set_timeCole Robinson2020-01-141-1/+2
| | | | | | Rather than one every wait period, which spams the debug logs Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtManager: object: domain: Stop set time threadMichael Weiser2020-01-141-0/+13
| | | | | | | | Wire up stoppping of the time setting thread for actions that make setting of guest time pointless. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* virtManager: object: domain: Increase set time timeoutMichael Weiser2020-01-141-1/+1
| | | | | | | | With the potential for annoyance eliminated, raise the timeout for guest agent connectivity to 30 seconds. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* virtManager: object: domain: Add timeout configMichael Weiser2020-01-141-5/+5
| | | | | | | | Make the guest agent wait timeout and sleep interval properties of the thread manager class better visibility and easier adjustment. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* virtManager: object: domain: Spawn thread for set timeMichael Weiser2020-01-141-14/+59
| | | | | | | | | | | | | | | | | | | | | | | Sleeping in a loop waiting for the qemu guest agent to come online would leave an annoying progress dialog while the domain would actually be fully useable already. Additionally, multiple progress dialogs could actually accumulate on screen if the user managed to suspend/resume fast enough or the timeout was just long enough. Defer regular retries into a separate thread to allow the progress dialog to disappear immediately after the actual action completed. The thread is encapsulated in a new class _vmmDomainSetTimeThread which holds state, decides whether to at all wait for an agent to come online or even try to set the guest time in the first place. It also holds state (thread running or not), configuration (timeout and retry interval) and provides an interface to start and stop the time setting operation. A later patch will wire up stopping the operation. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Suggested-by: Cole Robinson <crobinso@redhat.com>
* virtManager: object: domain: Refactor guest time settingMichael Weiser2020-01-141-30/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | Sleeping in a loop waiting for the qemu guest agent to come online leaves an annoying progress dialog while the domain may actually be fully useable already. Additionally, multiple progress dialogs can actually accumulate on screen if the user manages to suspend/resume fast enough or the timeout is just long enough. To avoid these, we want to defer retries into a separate thread to allow the progress dialog to disappear immediately after the actual action completed. In preparation for that, add a new class _vmmDomainSetTimeThread that will eventually manage that separate thread for guest time setting operations. Move the current code for waiting for the qemu guest agent into it without any semantic changes. Make set_time() and agent_read() of vmmDomain accessible from the outside so that _vmmDomainSetTimeThread can call back into them. Add has_agent() to be able to find out if the domain has an agent configured without leaking the actual agent config. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Suggested-by: Cole Robinson <crobinso@redhat.com>
* virtManager: object: domain: Simplify agent ready checkMichael Weiser2020-01-141-3/+1
| | | | | | | Just return the boolean value of the condition for simlicity. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* virt-install: Set default memory to appease lxc:///Cole Robinson2020-01-143-4/+9
| | | | | | | | | AFAICT the driver doesn't really do anything with it, but libvirt XML requires it. So just default to --memory 64 Fixes: #73 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Install the AppStream file to the canonical locationPino Toscano2020-01-142-2/+2
| | | | | | | | | The canonical location for AppStream XML files has been changed to /usr/share/metainfo four years ago at least, with /usr/share/appdata left as legacy location. It is time to switch to the right location. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* error: Set a cap on error dialog text sizeCole Robinson2020-01-141-0/+5
| | | | | | | | | Otherwise we can get some crazy sized dialogs with errors from libvirt https://bugzilla.redhat.com/show_bug.cgi?id=1786873 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Avoid string puzzlePino Toscano2020-01-141-2/+4
| | | | | | | | | | | Do not join two parts of sentences together, because it is problematic to translate. Instead, use a different sentence depending on the condition. Fixes commit d52c9d1ffa2d8c204fbb2a714f89b007fa6227ec. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* cli: Add --serial type= arg, with back compat alias char_typeCole Robinson2019-12-242-4/+5
| | | | | | 'type' is the expected naming here Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Handle the warning messages for disk device and non-disk device differentlyLily Nie2019-12-232-7/+8
| | | | | | add a remove-non-disk function and move the yes/no confirmation handling there Reviewed-by: Cole Robinson <crobinso@redhat.com>
* details: snapshots: Warn of saved state on creationMichael Weiser2019-12-231-0/+11
| | | | | | | | | | Add a confirmation dialog when creating a new snapshot if there is saved memory state so the user is aware that memory state will not be part of the snapshot. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Suggested-by: Cole Robinson <crobinso@redhat.com>
* details: snapshots: Drop saved state on restoreMichael Weiser2019-12-232-0/+20
| | | | | | | | | | | Refuse to restore a non-running state from snapshot while there is saved memory state in order to avoid filesystem corruption. Present a message to the user to that effect and let them choose to either abort the operation or drop the saved state before restoring the snapshot. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Suggested-by: Cole Robinson <crobinso@redhat.com>
* virtManager: object: domain: Fix snapshot run checkMichael Weiser2019-12-231-2/+2
| | | | | | | | | snap.is_running() returns a boolean and checking that against VIR_DOMAIN_RUNNING worked by pure coincidence only. Just use the bool value and give it a more speaking name while at it. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* virt-install: Check --transient status in domain --waitCole Robinson2019-12-221-2/+1
| | | | | | | | | | Otherwise when the VM shuts down, we will report an error, because the VM doesn't exist anymore. The check_domain_inactive() helper already handles this case, we just weren't using it in the --wait loop. https://bugzilla.redhat.com/show_bug.cgi?id=1785643 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Offer to delete the storage files without removing the VMLily Nie2019-12-182-12/+42
| | | | | | | we should let users decide whether they want to also delete the storage files or just dev from UI when they click the Remove button Reviewed-by: Cole Robinson <crobinso@redhat.com>
* Modify the remove_xml_dev functionLily Nie2019-12-181-1/+7
| | | | | | add a remove_disk function,so that we can do some special things when remove a disk Reviewed-by: Cole Robinson <crobinso@redhat.com>
* virtManager: disambiguize LXCChristian Ehrhardt2019-12-171-1/+1
| | | | | | | | | | | | LXC can be many things and in particular when seeing just "LXC" in the virt-manager UI one might think of either - Libvirt-LXC => https://libvirt.org/drvlxc.html - Linuxcontainers LXC => https://linuxcontainers.org Clarify that this is specifically Libvirt-LXC Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>