Commit Graph

116 Commits

Author SHA1 Message Date
Cole Robinson f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Cole Robinson f99be58ab1 virt-install: Fix warning about missing --os-variant
We always at least have os_variant == "generic" now
2016-04-07 17:36:53 -04:00
Cole Robinson 22022d95dc virt-install: Don't show old --ram option in --help (bz 1321663) 2016-04-07 15:52:07 -04:00
Cole Robinson d3b9fcf3de Fix some pylint 2016-03-24 16:04:06 -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
Pavel Hrdina 3bca4e7fcb Revert "virt-install: fix condition that detect if console is present"
This reverts commit 588c2d4481.

Actually it was correct before this patch.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-11 22:07:53 +01:00
Pavel Hrdina 588c2d4481 virt-install: fix condition that detect if console is present
Function get_devices() always returns a list, if there is no requested
device the list is empty.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-11 21:25:50 +01:00
Pavel Hrdina ef14f04226 virt-install: warn user about missing console while installing on arm
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-11 21:23:19 +01:00
Pavel Hrdina 0e26031096 virt-install: don't report missing console in extra-args for ppc64
Kernel for ppc64 automatically enables serial console, there is no need
to report any warning.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-09 19:57:30 +01:00
Cole Robinson 601a82cb87 virt-install: Simplify --extra-args text install warnings
- Drop the warnings about incorrect console=, that's a little too fine
  grained and was really only about virtio-console default confusion
  which doesn't apply anymore
- Skip the check for xenpv which seems to always 'just work'
- Drop the opencoded arm check, use is_arm
- Fix an error when xen HVM is used (reported on virt-tools-list)
2015-09-22 12:44:33 -04:00
Cole Robinson b217c199bc virt-install: Remove obsolete hack 2015-09-06 14:27:37 -04:00
Cole Robinson 1237be9d1a virt-install: Clean up created disk images if VM creation fails
We are conservative here, only cleaning up disk images if libvirt
fails to even accept the XML. Otherwise the VM may already be
running or defined, and the user has to do some cleanup anyways.
2015-09-06 14:27:37 -04:00
Pavel Hrdina aebebbf879 virt-install: report an error for pxe install without network
Fix a regression where we used to report an error message if user
specified pxe installation without any network (--nonetworks or
--network none).

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-08-06 14:56:30 +02:00
Pavel Hrdina 0fbe8e7a1f translation: fix wrong usage of _() function
All the strings have to be at first translated and then we can fill the
formated and translated string.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-06-05 16:33:51 -04:00
Cole Robinson 93f826a8b2 cli: Replace add --check option (bz 1063471)
For fine grained enabling/disabling validation checks. Use this to
replace the heavy handed --force option.
2015-04-11 19:48:35 -04:00
Cole Robinson 9b21f27e31 cli: Maintain same --print-xml behavior for non virt-install
Don't want it scooping up any nargs
2015-04-07 19:58:28 -04:00
Cole Robinson 3d6831ec8f virt-install: Deprecate --print-step, just use --print-xml
argparse lets us handle this in a back compat fashion, so let's simplify
the CLI.
2015-04-04 17:10:45 -04:00
Cole Robinson 97259c4d9b capabilities: Store results of guest_lookup together
Simplifies API users lives to not have to remember whether caps guest
or caps domain contains a particular value.
2015-04-03 17:37:08 -04:00
Cole Robinson 2c9d2a2360 virt-install: Don't print virsh command if VM is running (bz 1180558) 2015-03-26 16:43:28 -04:00
Cole Robinson c7c772b200 virt-install: Default to --boot uefi
Try to use --boot uefi if the user hasn't already specified loader params,
or a kernel to boot. If we can't determine a UEFI setup, just print a
warning.
2015-02-22 10:25:51 -05:00
Cole Robinson 09ef4583a0 virt-install: Also don't show console= warning for machvirt + --location 2014-11-21 13:57:30 -05:00
Cole Robinson 507af25258 virt-install: Don't warn about missing console= for machvirt
Since latest kernels figure it out automatically
2014-11-20 19:15:11 -05:00
Cole Robinson c4162f6708 Use -M virt as default machine for arm/aarch64
Centralize the default machine logic in caps and use it consistently
2014-09-23 16:05:48 -04:00
Cole Robinson 64106230bd virt-install: Add hidden option --test-media-detection
Can help with debugging and test cases
2014-09-20 20:32:19 -04:00
Cole Robinson 99700821c6 virt-install: Reorder --help output a bit 2014-09-20 19:30:16 -04:00
Cole Robinson d7e1a40352 virt-install: Deprecate --nodisks in favor of --disk none 2014-09-20 19:16:13 -04:00
Cole Robinson 57ae284ad4 virt-install: Deprecate --nonetworks in favor of --network none
Follows the pattern used by the other cli options
2014-09-20 19:02:38 -04:00
Cole Robinson c26512926d virt-install: Default to --graphics even if DISPLAY is unset
This was a weird bit of logic that tries to be smart, but there isn't
a clear corrolation between DISPLAY being unset and whether the user
wants graphics or not.

Make the default consistent, some people may need to adjust to
--nographics
2014-09-20 18:52:20 -04:00
Cole Robinson 1f3f3fa4fc virt-install: If virt-viewer will fail, default to --wait -1
This can happen if user requests explicit --graphics, but they are on
a headless display. We had a few reports of this recently.
2014-09-20 18:28:43 -04:00
Cole Robinson ca2ee52eb8 virtinst: cli: Move unshared bits to virt-install
Since virt-image is gone, this stuff should all be private to virt-install
2014-09-19 20:31:22 -04:00
Cole Robinson 8b20f68cd7 virt-install: Print warning if no OS detected or specified 2014-09-07 13:55:45 -04:00
Cole Robinson c46459d6a6 virt-install: Improve warning with headless --cdrom 2014-09-07 13:51:15 -04:00
Cole Robinson a8843e5807 virtinst: Remove redundant LiveCDInstaller
DistroInstaller can basically do the same thing. This also gives us distro
detection when using virt-install --livecd
2014-09-07 13:42:56 -04:00
Cole Robinson a722eeac78 virt-install: Enable libosinfo detection for --cdrom
This streamlines virt-manager and virt-install implementations, requiring
installer.distro_detect to be called if we want distro detection. As
a side effect, we now get CDROM detection for free.
2014-09-07 12:20:26 -04:00
Richard W.M. Jones 283553060d arm: On arm the virtual console is PL011-based ttyAMA0.
Confusingly real ARM hardware can have either PC-like 8250 devices,
which the Linux kernel calls /dev/ttyS0, or ARM-only PL011-based
/dev/ttyAMA0.

qemu can emulate either, but the default for `-M virt' is the PL011
so /dev/ttyAMA0.

Change the warning message so it uses ttyAMA0 instead.
2014-08-05 13:32:45 +02:00
Chen Hanxiao 2f4a424521 use binary prefixes for units where appropriate
https://bugzilla.redhat.com/show_bug.cgi?id=1103893

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-16 11:56:53 +08:00
Cole Robinson f397d96ca6 virt-install: Don't require install option with --print-xml (bz 1095789) 2014-05-11 19:19:00 -04:00
Cole Robinson 2de9e9cc52 virt-install: Remove needless error message redirection 2014-05-11 19:00:51 -04:00
Giuseppe Scrivano bcb60f0fb1 virt-install: Drop support for --os-variant list
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00
Cole Robinson 63b27ceae1 caps: Simplify guest lookup routines
Checking for acceleration should always be done, API users can opt out
by requesting a specific domain type.
2014-02-17 11:54:11 -05:00
Martin Kletzander 4196f4287b Use proper python version
since we work with python2 only, mentioning it in all shebangs make
the commands from git work even when python3 is set as default.

This also fixes one test where command being ran is 'virt-xml' through
subprocess.Popen().

While at that, add '-tt' where possible in order to make everyone use
same indentation characters.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Cole Robinson ac6706208d cli: Shorten some long --help examples 2014-02-10 18:13:42 -05:00
Chen Hanxiao fcac052cdc virt-install: add support for user namespace
This patch will enable configuring idmap.
It could be used as enable user namespace
for LXC containers.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-09 13:16:34 -05:00
Cole Robinson 0b4a72fd77 virt-convert: Reimplement it
We totally break CLI compat here, but the previous tool wasn't sustainable.
Instead, repurpose the tool as strictly converting external formats
like ovf/vmx to native libvirt XML, and launch the guest.

So we drop vmx/virt-image output, and virt-image input, and a slew of
command line options. I don't think anyone was depending on this in a
scripted fashion, so in practice I don't think anyone will care.

Add much more comprehensive unit tests while we are at it.
2014-02-07 21:16:09 -05:00
Cole Robinson 2ffd5a66e6 guest: Add single entry point for adding default devices 2014-02-07 16:07:32 -05:00
Chen Hanxiao c23de0b181 virtinst: drop parameter guest in convert_old_networks
We do not use this paramter any more since commit:
46d3e0041a.
So drop it.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-06 22:33:00 +08:00
Cole Robinson e70ab961f9 virt-install: Switch back to using --sound argument
Since argparse allows optional arguments, we can back compat handle the
original boolean --sound option. This is nicer than using an option
named --soundhw
2014-02-05 12:41:34 -05:00
Cole Robinson 4e4fb15a2f virt-*: Drop all --prompt handling
This stuff is not very helpful and a pain to maintain. Let's drop it once
and for all. We still accept the CLI options and log a warning so people
hopefully take the hint.
2014-02-04 17:01:27 -05:00
Chen Hanxiao ad05b19f20 If we use "--boot init=INITPATH" style to set
container's init, virt-install will complain:

"ERROR    Install methods (--location URL,
--cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)
cannot be specified for container guests"

This patch will fix this bug.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-03 19:03:21 +08:00
Cole Robinson 95575aa5c7 virt-install: Add lots of warnings if --nographics won't work 2014-02-02 15:34:32 -05:00