Commit Graph

200 Commits

Author SHA1 Message Date
Mikhail Feoktistov
5a70b946c7 Add GUI to create wizard for virtuozzo containers
Add virtuozzo hypervisor to connection list.
Add radio buttons for choosing VM or container virtualization type.
New wizard window for setting template name for containers.
2017-03-22 11:00:50 -04:00
Pavel Hrdina
810c73864a translation: mark some strings to be translated
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-07-26 09:32:14 +02:00
Cole Robinson
9f297eda5b virtinst: guest: drop 'continue_install' concept
continue_install is intended to facilitate windows XP style 3 stage
installs:

  stage 1: initial dos style disk setup, reboot
  stage 2: actual full installer, reboot
  stage 3: OS is functional, virt-install is done

The code assumed that we needed to keep the cdrom as the primary
boot device for the second stage, so virt-install/virt-manager needed
to hang around through the second stage run, wait until the VM shutdown,
then encode the final XML to boot of the disk.

Windows is and always has been smart enough to handle that case though...
after the initial boot, if we set the hd as the primary boot device
for stage 2, the disk bits that windows already installed will make
use of the cdrom as necessary. So the entire premise of continue_install
is irrelevant. Maybe back when it was added, when xen didn't even have
working ACPI support, this served a purpose, but I'm pretty sure we
can safely drop it nowadays.
2016-06-17 07:52:42 -04:00
Cole Robinson
5cd1b57852 create: customize: Fix inadvertent disk removal on install fail
If the first install attempt fails, then the second attempt succeeds,
we were still removing the disk images we created as though the
install never succeeded. We need to clear out the cached failed_guest
value via the customize dialog callback

https://bugzilla.redhat.com/show_bug.cgi?id=1342043
2016-06-16 19:47:49 -04:00
Pavel Hrdina
5ecc2b440a virtManager.create: don't clear recommended machine if none is selected
This improves loading domcapabilities to get domcapabilities for recommended
machine, not for default machine.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-16 12:00:10 +02:00
Pavel Hrdina
7280dcf7df create: report an error if storage doesn't exists for import installation
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1305210

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 19:48:24 +02:00
Pavel Hrdina
bf99c0ce82 virt-manager: fix --show-domain-creator to not depend on manager window
Commit a0c2fdf4 fixed a bug that there was no way how to close the app.

The original issue isn't present anymore but reverting that commit isn't
enough.  We need to increment/decrement window count while
showing/closing the create window in order to not exit right after
the create window is opened.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-20 12:02:03 -04:00
Pavel Hrdina
f628c3e266 create: skip continue-install restart if user destroys VM
Commit 159e4af1 fixed a case where VM was started if user destroyed VM
while installing it.  This moves the code before we check whether we
need to restart the VM in order to continue in installation (windows
requires that).

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-13 17:38:26 +02:00
Cole Robinson
f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Pavel Hrdina
4c3e7969c6 virt-install: concatenate all extra-args argument
So far we used only the last --extra-args argument from virt-install
command line, but it makes more sense to use all occurrences of
--extra-args and pass them to kernel.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-03-18 03:28:17 +01:00
Cole Robinson
356f30d7ba create: Hide pxe warning if there's no issue 2015-11-21 20:39:55 -05:00
Cole Robinson
2178cc8c93 create: Drop explicit kickstart UI
Few users actually use this, and they can easily do it with the kernel
options field.
2015-11-21 20:21:09 -05:00
Cole Robinson
e18d2caa45 create: Don't go back to NewVM on error, if customize dialog launched
The code really isn't set up to handle exiting the customize dialog,
so just make the UI enforce it.
2015-11-21 19:55:48 -05:00
Cole Robinson
50b1b18ec4 create: Show a warning if no network is selected (bz 1267377) 2015-11-02 14:48:03 -05:00
Cole Robinson
90816a6263 create: Simplify network warning setup 2015-11-02 14:47:59 -05:00
Cole Robinson
0b6233b0f8 create: Small re-org of conn init
- Share error reporting with the two callers
- Fix an issue where the arch error dialog is shown when there's no connections
2015-11-02 14:08:09 -05:00
Cole Robinson
b45a0ce286 create: Show TCG vs KVM for aarch64 too
Since it can be used for arm32 installs as well.

Requested here; https://bugzilla.redhat.com/show_bug.cgi?id=1214592#c4
2015-09-28 20:00:01 -04:00
Cole Robinson
8e58734699 create: Hide aarch64 warning if we switch architectures
Simplest is to have a separate UI area for the arch warning, since
the standard startup warning may still apply too.

Reported-by: João Pirralha <joaopirralha@gmail.com>
2015-09-23 16:51:49 -04:00
Cole Robinson
2f775b6bf0 Mark more UI strings as translatable 2015-09-23 16:39:48 -04:00
Cole Robinson
477e82b35a create: Remove some leftover debug prints 2015-09-15 14:53:10 -04:00
Cole Robinson
d896dd7347 create: Allow switching between KVM and TCG for armv7l (bz 1214592)
Otherwise we tried to always force KVM which reduces the usefulness
here. We still get the defaults right though

https://bugzilla.redhat.com/show_bug.cgi?id=1214592
2015-09-14 19:27:48 -04:00
Cole Robinson
7953f23975 create: Update storage path in summary when VM name changes
If the name is going to influence the default storage path, update it
as people type
2015-09-14 16:22:17 -04:00
Cole Robinson
4455f7dcb5 create: Use generic helpers for removing already created devices
Simplifies some logic in a few places and makes it clearer IMO
2015-09-14 16:10:42 -04:00
Cole Robinson
a4ddac4bb1 create: Always display the storage path in the summary 2015-09-14 15:22:17 -04:00
Cole Robinson
ba0711b0bf addhardware: Use same default storage size as create.py (20 GB)
createvol too
2015-09-13 19:32:11 -04:00
Cole Robinson
6861d467a4 addstorage: Clean up validate_storage a bit more 2015-09-13 19:08:30 -04:00
Cole Robinson
a2bd31c2a6 virt-manager: Drop old style config- prefix for widget names
It's redundant and we haven't followed that pattern for a long while
2015-09-13 18:01:39 -04:00
Cole Robinson
c558bb1f56 addstorage: Move validate_storage error catching to the caller
Saves some code indentation, and is more robust
2015-09-13 16:02:35 -04:00
Cole Robinson
15a6a7e210 addstorage: Drop explicit sparse option
This made more sense when raw was the disk image default, but nowadays
we use qcow2 which doesn't even support non-sparse, so the UI is always
disabled.

If the user changed their preference to raw, it still doesn't make much
sense to show the option, since they are likely using raw for performance
in which case they are going to want to preallocate anyways.

So just default to sparse=False. If users want to override it, they can
do it via custom created storage.
2015-09-13 15:43:24 -04:00
Cole Robinson
b95af3bedc create: Privatize more variables 2015-09-13 12:45:35 -04:00
Cole Robinson
241c3125e5 create: Drop redundant _have_startup_error
Isn't needed in the modern code
2015-09-13 12:28:16 -04:00
Cole Robinson
ddea18baf9 create: Cleanup of distro detection code
- Use better variable names
- Lots of comments
- Streamline various parts
2015-09-13 12:28:16 -04:00
Cole Robinson
38a8454941 create: Organize code better
- Privatize a bunch of functions
- Rename functions to make their purpose cleared
- Document some functions
- Group functions into logical groups and use comment blocks to separate them
2015-09-13 12:28:16 -04:00
Cole Robinson
67f79569e6 create: Fix OS variant autocomplete
And drop the model infinite loop hack we added last release, since this
is the proper fix for both issues
2015-09-09 11:23:25 -04:00
Cole Robinson
60d6161efc create: Clean up default storage if VM fails (bz #799721)
Similar to the virt-install change, we only do this with default storage
if the installed failed in such a way that we never left the wizard.

It isn't going to cover all cases, but should handle the common issue
of stranded disk images

https://bugzilla.redhat.com/show_bug.cgi?id=799721
2015-09-06 15:10:17 -04:00
Cole Robinson
473eaf4aa5 create: Invalid os lookup should be a validation error dialog 2015-08-10 13:02:27 -04:00
Cole Robinson
cca72a73c4 create: Fix backtrace when reporting OS error (bz 1241902) 2015-08-10 12:56:11 -04:00
Pavel Hrdina
cce1f89a34 virtManager/create: update capsinfo sooner in set_conn_state
We need to update/initialize the capsinfo sooner in that function to be
able to call has_install_options().

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-21 11:55:11 -04:00
Pavel Hrdina
3ff35898a4 refactor detection of guest type capabilities
Each guest type can have its own capabilities and we should always ask
only for those capabilities.

The old approach was to get capabilities from libvirt and then for
example cycle trough all guests and return True, if any guest type
supports kvm or pae, etc.

Now we check those capabilities only for the correct guest type
according to defaults and input from user.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:11:40 -04:00
Pavel Hrdina
c7049eb120 pep8 W503: line break before binary operator
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:01:20 -04:00
Kevin Zhao
8dbe96fc01 virt-manager : add support for architecture type "s390x".
For architecture "s390x",the disk and the network device are base
on "virtio" bus.The cdrom is based on "scsi".So set the default
cdrom bus as "scsi",the default bus as "virtio".Also the default
machine type is set to "s390-ccw-virtio" as it is the only supported
in "s390x".Also add a test cast of virt-install by cdrom in s390x.

(crobinso: Tweak test suite and minor formatting stuff)
2015-07-14 12:45:32 -04:00
Giuseppe Scrivano
f8af2e6b10 create: verify HYPER-V support after customization
commit 938060ae53 moved default devices
setup to happen before UEFI is set invalidating what the commit
5acfccf6032abb9e8be89130d05b661e8b3f42c7 does.

Add another check to happen before installing the guest to disable
HYPER-V when not supported.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-20 22:48:33 +02:00
Cole Robinson
43340f46a2 create: Fix infinite loop after uiutil rework
Repopulating the ostype/variant list triggers a bunch of change events,
which causes us to enter an infinite loop due to some minor behavior
change in the uiutil helpers.

The uiutil helpers are still correct, the root problem is we should be
disabling change events when repopulating those UI lists (we already
have to do a similar trick in a few other places, like host.py)
2015-05-20 14:18:09 -04:00
Cole Robinson
fdad3efe24 uiutil: streamline column vs rowidx parameter name 2015-05-19 18:29:45 -04:00
Cole Robinson
68ce97d533 create: customize: cancel now cancels the entire installation
Trying to fall back to the create wizard can give weird results, since
it's really hard to ensure the customized changes are preserved if
the user changes things in the 'new' wizard.
2015-05-03 16:53:43 -04:00
Cole Robinson
c8a0b8310c create: Fix a logging typo 2015-05-03 16:37:42 -04:00
Cole Robinson
0f3d86ac9e guest: Disable PM for virt-install as well
We are just mirroring the behavior that virt-manager (and boxes) have
used for a while now.

In my experience the average user is confused by their VMs suspending,
so for our sake I'd rather make people opt into this feature.
2015-04-11 18:02:45 -04:00
Cole Robinson
4781ad6cd6 connection: Simplify manager row 'pretty name' handling
Unify all the callers, and use some UI ellipsizing to handle
crazy long hostnames.

This drops the conn name collision prevention stuff which can be
useful when you have lots of similar connection names. But upcoming
patches will make it mostly redundant.
2015-04-11 12:57:32 -04:00
Cole Robinson
6071ab0ea4 uiutil: Clarify a few ambiguous function names 2015-04-10 15:00:34 -04:00
Cole Robinson
1e154a373d libvirtobject: Populate status up front
And use this to kill paranoid object tick() that are sprinkled throughout
the code.
2015-04-10 15:00:34 -04:00