summaryrefslogtreecommitdiff
path: root/virt-install
Commit message (Collapse)AuthorAgeFilesLines
* virt-*: invoke python3 using /usr/bin/enva13460542021-10-041-1/+1
|
* Move virt-* code into their modulesCole Robinson2020-01-261-1043/+6
| | | | | | | | | | | | | This layout is closer to what most python modules have nowadays. It also simplifies testing and static analysis setup. Keep virt-* wrappers locally, for ease of running these commands from a git checkout. Adjust the wrapper binaries we install on via packaging to be pure python, which makes things like running gdb easier. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: Change PXE warning to be less authoritativeCole Robinson2020-01-261-2/+2
| | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1693891 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Default lxc:/// memory to 1024, and print itCole Robinson2020-01-151-2/+5
| | | | | | | | | | | | | 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-151-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: Set default memory to appease lxc:///Cole Robinson2020-01-141-0/+5
| | | | | | | | | 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>
* 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>
* virt-install: Move cloudinit password printing before guest startCole Robinson2019-11-251-2/+2
| | | | | | Otherwise if the timeout is hit, the user may miss VM boot output Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: cloudinit: default to --autoconsole text with --cloud-initCole Robinson2019-11-251-2/+1
| | | | | | | | Cloud images all work nicely with text output, and it's likely the preferred native way to connect to the guest vs graphical. Plus it simplifies generated password copy+paste Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: Don't pause for cloudinit pass if stdin is closedCole Robinson2019-11-251-10/+26
| | | | | | | Like if run in a script without any stdin open. Have the test suite actually hit this path Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Expose default console handling through _AutoconsoleDataCole Robinson2019-11-251-23/+20
| | | | | | Rework all console queries to go through that object API Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cli: Add _AutoconsoleData and use itCole Robinson2019-11-241-1/+2
| | | | | | | This will be expanded later to track explicit requests for certain console types Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: Split out show_console_warningsCole Robinson2019-11-241-4/+5
| | | | | | And only call it once console handling is in play Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-install: Drop warning about '--console none'Cole Robinson2019-11-241-17/+2
| | | | | | | This should be rarely if ever used, don't warn the user about this case Signed-off-by: Cole Robinson <crobinso@redhat.com>
* cloudinit: Move random password printing and sleeping to virt-installAthina Plaskasoviti2019-11-201-0/+10
| | | | | | | | Fixed: - Added a do_log flag to print_stdout(), to avoid logging of printed random password. - Excluded timeout in virt-install from testing Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
* Introduction of cloud-init configuration in virt-installAthina Plaskasoviti2019-11-201-0/+5
| | | | | | | Usage: --cloud-init Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
* virt-install: Respect --os-variantFabiano Fidêncio2019-11-201-5/+8
| | | | | | | | | | When the user explicitly passes --os-variant via command line, its value must be respected, always. By setting the os name earlier, we force the os-variant to be respected when the installer creates the Distro Store. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* virt-install: Use virtio-win drivers if possibleFabiano Fidêncio2019-10-021-0/+6
| | | | | | | | | Let's ensure the Windows guests being installed through unattended installations, which are able to have pre installable drivers intalled, will use virtio devices when possible. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* osdict: Choose the most appropriate tree when a profile is setFabiano Fidêncio2019-09-111-5/+9
| | | | | | | | As some OSes, as Fedora, have variants (which we rely to be standardised on osinfo-db side), let's select the most appropriate variant according to the selected profile of the unattended installation. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* virt-install: Use minutes instead of seconds on get_time_string()Fabiano Fidêncio2019-07-251-1/+1
| | | | | | | | | | | | | get_time_string() currently uses self._wait_secs, while it should use self._wait_mins, resulting on confusing messages when using `--wait` option, as shown below: fidencio@laerte ~/src/upstream/virt-manager $ ./virt-install --install fedora30 --unattended --wait 20 ... Waiting 1200 minutes for installation to complete. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* virt-install: Revive --wait 0 as alias for --noautoconsoleCole Robinson2019-07-031-0/+9
| | | | | | | | This was the behavior prior to last release, and we received a bug report about it. Revive it, but warn about the recommended way to do it https://bugzilla.redhat.com/show_bug.cgi?id=1724287
* man: virt-install: Big updateCole Robinson2019-06-171-2/+1
| | | | | | | | - Document --install - Document --unattended - Modernize EXAMPLES section - Deprecate --livecd - Tweak the intro describing VM defaults
* virt-install: Add --install no_install=yes|noCole Robinson2019-06-171-1/+1
| | | | | This just formalizes the behavior of things like --import and --livecd
* virt-install: Make bare '--wait' mean 'wait indefinitely'Cole Robinson2019-06-171-1/+1
|
* Switch to more traditional logging structureCole Robinson2019-06-171-21/+21
| | | | | | | | Init a shared log instance in virtinst/logger.py, and use that throughout the code base, so we aren't calling directly into 'logging'. This helps protect our logging output from being cluttered with other library output, as happens with some 'requests' usage
* virt-install: Warn if mem less than OS recommendedCole Robinson2019-06-141-0/+18
| | | | | And if mem is abnormally low, like it appears user tried to specify GiB not MiB
* virt-install: Drop --os-variant suboption parsingCole Robinson2019-06-131-34/+26
| | | | | | Not sure I want to go down that route if we can avoid it. Instead just fold the full_id support into the existing option handling. Streamline the OSVariantData usage throughout the cli tools
* virt-install: Add --install OSNAMECole Robinson2019-06-131-34/+21
| | | | | | | | | | | | | Replace the unreleased --os-variant OSNAME,install=location with just --install OSNAME Unwind the --unattended dependency on upfront --os-variant while we are at it, since they are all intertwined. Now we can just do: virt-install --install OSNAME and virt-install --install OSNAME --unattended
* virt-install: Split build_installer out a bitCole Robinson2019-06-131-29/+41
|
* guest: Add skip_default_osinfoCole Robinson2019-06-131-4/+7
| | | | | | | We set this to True in virt-install, which will cause an explicit error to be thrown if some part of the cli parser tries to access osinfo before it's been set, because then we have a circular dependency between cli config -> installer -> osinfo -> cli config
* virt-install: Rework install option detection a bitCole Robinson2019-06-131-21/+14
| | | | | | | Add an explicit no_install to Installer to encode that the user is not expecting an install phase. Use that to determine later if any install options were specified. This saves later code from having to deal with installer=None, and is the basis for further clarifications
* virt-install: Split out --wait handling into a helper classCole Robinson2019-06-131-55/+75
| | | | And add much more clitest coverage
* tests: clitest: Fill in much more virt-install coverageCole Robinson2019-06-131-25/+13
|
* virt-install: Drop install option collision errorsCole Robinson2019-06-131-25/+3
| | | | | | It's getting hard to track this correctly with the addition of --install. Drop it. The important thing is validating when no install options were specified
* virt-install: Drop --transient and --noreboot rejectionCole Robinson2019-06-131-3/+0
| | | | | It's a nonsensical request but it should be obscure enough to not warrant explicit validation
* virt-install: Push validation down into the installerCole Robinson2019-06-131-23/+7
| | | | | | | It's hard to validate whether something like --extra-args or --initrd-inject is supported based on the command line arguments. It's easier to let the installer.py figure it out because it's the authoritative source
* virt-install: Add --install kernel_args=X,kernel_args_overwrite=yes|noCole Robinson2019-06-131-8/+19
| | | | | | --install kernel_args=X acts like --extra-args. If kernel_args_overwrite=yes is also specified, it overwrites whatever default kernel args we would have used for the install method.
* cli: Add --install bootdev=X,kernel=X,initrd=ZCole Robinson2019-06-111-2/+16
| | | | | This is the beginning of a big --install option, which will be used for tweaking less common elements of the install process
* virt-install: Drop the serial extra_args warningsCole Robinson2019-06-111-22/+0
| | | | | | There's been multiple reports that these aren't really valid nowadays. systemd is smart enough to make this work automagically. So just drop it
* unattended: Choose a default profile name if none specifiedCole Robinson2019-06-111-1/+1
| | | | | | We default to 'desktop' if none specified, otherwise we choose the first alphabetical profile available. Make bare '--unattended' a valid option
* virt-install: Print when we set default memory and diskCole Robinson2019-06-111-1/+9
| | | | | | Since we never defaulted here before, print out the values we are setting. Users can see right away if they actually want those values or not.
* virt-install: Generate default --nameCole Robinson2019-06-111-5/+8
| | | | | | | | This uses the same logic as virt-manager. The name is mostly derived from --os-variant naming, but we have fallback defaults too. Print the name to stdout so users are informed about what we are doing.
* virt-install: Share required option logic for resourcesCole Robinson2019-06-111-10/+19
| | | | | There's some cases we were incorrectly setting osinfo defaults, when mem or storage values had already been specified elsewhere
* guest: move libosinfo resource setting to virt-installCole Robinson2019-06-111-8/+16
| | | | | | | This puts all the default resource setting in one place, and the only place that was depending on it, as virt-manager explicitly sets the values on its own. This will be used in future patches to add more default setup and report the values to the user
* cli: Add more code coverageCole Robinson2019-06-111-20/+17
|
* virt-install: Call install.get_search_pathsCole Robinson2019-06-111-0/+2
| | | | Similar to what we do via create.py
* tests: Add osinfo URL and URL unattended testsCole Robinson2019-06-081-3/+5
|
* virtinst: Rename util to xmlutilCole Robinson2019-06-071-7/+7
| | | | | The only functions left in there are largely for xml handling, so make it explicit
* tests: clitest: define XML generated from compare testsCole Robinson2019-05-141-1/+1
| | | | | | | All our virt-install/virt-clone compare tests aren't actually attempting to define the XML, meaning we could be generating bogus output. Enable it, then fix the fallout, mostly some places we are triggering libvirt XML validation
* osdict: return _OsResources to callersCole Robinson2019-05-121-6/+9
| | | | Use the class helper routines to save some tedious dict management