Commit Graph

521 Commits

Author SHA1 Message Date
Cole Robinson
ac6706208d cli: Shorten some long --help examples 2014-02-10 18:13:42 -05:00
Cole Robinson
d0f44491ff cli: Warn if disk path isn't searchable by qemu 2014-02-10 18:09:15 -05:00
Cole Robinson
9fe79627c1 support: Clarify docs and some parameter names 2014-02-10 17:12:24 -05:00
Cole Robinson
43bb559a30 support: Break out function checker 2014-02-10 17:02:22 -05:00
Cole Robinson
4788499bbd support: Take version strings in support declarations 2014-02-10 16:53:47 -05:00
Cole Robinson
a98505e691 support: Error if registered version is too old to confirm 2014-02-10 16:37:17 -05:00
Cole Robinson
19a72a4881 support: Remove negative version handling
We can do it in other ways
2014-02-10 16:14:39 -05:00
Cole Robinson
96bbfebe5b support: Use dictionary for driver version checks 2014-02-10 16:05:17 -05:00
Cole Robinson
d76aab264e tests: Only use one env variable to notify we are running tests 2014-02-10 14:47:20 -05:00
Cole Robinson
82754ddc84 Expose hostdev rombar in UI and cli (bz 768857) 2014-02-10 14:25:23 -05:00
Cole Robinson
4a006b5ff8 details: Expose fine grained boot config
Basically put an explicit device list in the boot UI, if the hypervisor
supports it. For unsupported hv, use the same old disk/cd/floppy/net UI.
2014-02-10 13:34:17 -05:00
Cole Robinson
719f23a273 cli: Support per-device <boot order=> 2014-02-09 14:07:27 -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
c5f6c6852a VirtualDisk: Always use storage APIs for provisioning
This means if we are passed an unmanaged path, we try to create a
storage pool for the parent directory.

We skip directories like /dev where doing this might be problematic.

This makes things much friendlier to use for remote connections, and
means we can always rely on having libvirt's storage APIs to use
for format probing.
2014-02-08 19:24:14 -05:00
Cole Robinson
67743cbe31 storage: Only try lazy_refcounts with format=qcow2 2014-02-08 19:24:13 -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
5a097183a9 test: add more test cases for option --blkiotune
Add additional test cases for option --blkiotune.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-07 23:12:54 +08:00
Chen Hanxiao
3be9dd3eb3 virt-install: Add --blkiotune option
This patch provides the ability to
tune Blkio cgroup tunable parameters for the domain.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-06 22:41:00 +08: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
a8dd7bd213 util: Fix validate_name error reporting 2014-02-05 19:02:42 -05:00
Cole Robinson
46d3e0041a deviceinterface: Absorb cli 'default source' logic 2014-02-05 19:02:42 -05:00
Cole Robinson
f5c32063e4 wip 2014-02-05 14:09:05 -05:00
Cole Robinson
7a825d9a28 virt-install: Add usbredir channels by default if using spice
Can be disabled with --redirdev none
2014-02-05 13:07:01 -05:00
Cole Robinson
f635187bb8 virt-install: If using spice graphics, add <sound> by default
Can be disabled with --sound none
2014-02-05 12:51:27 -05: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
6f93d3decf Use .qcow2 extension when creating qcow2 files
Seems the be the practice these days
2014-02-04 17:30:24 -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
Cole Robinson
8618a3abd7 prefs: Add 'Add SPICE USB redirection' option, enable it
For qemu guests that are using spice, add 4 redirdevs so USB redirection
happens for free. This can be disabled in the preferences dialog.
2014-02-04 15:27:56 -05:00
Cole Robinson
e0103286bd devicedisk: Short circuit path_exists(None) 2014-02-03 16:43:25 -05:00
Cole Robinson
cac593da8f storage: Use qcow2 lazy_refcounts if supported 2014-02-03 15:55:20 -05:00
Cole Robinson
1ab206a3eb virt-manager: create: Disable s3/s4 by default (bz 1044145)
I don't think most virt-manager users want this enabled, since it can
make the shutdown button cause a VM suspend. If people complain we can
provide a Preference or UI in the boot screen to undo it.
2014-02-03 14:22:15 -05:00
Cole Robinson
156a2a1dcb cli: Clarify a translation string 2014-02-03 11:21:16 -05:00
Cole Robinson
0654784643 virt-install: Add --pm option 2014-02-03 11:11:38 -05:00
Cole Robinson
4fbee9aa41 cli: Make --cpu host-model and --cpu host-passthrough work 2014-02-03 11:11:38 -05:00
Cole Robinson
032dd0cf21 clone: Show destination host if on a remote connection (bz 881099) 2014-02-01 18:59:10 -05:00
Cole Robinson
4ce356985a util: Relax name validation (bz 917444)
Warn about common cases like spaces in name, and let libvirt error on
the rest.
2014-02-01 08:37:28 -05:00
Cole Robinson
24c1c5a2bd cli: --network: Support driver_queues option 2014-02-01 07:48:04 -05:00
Cole Robinson
34e2ca8389 cli: --network: Wire up virtualport options 2014-01-31 16:51:02 -05:00
Cole Robinson
b12f06b84b cli: --disk: Add iotune paramters 2014-01-31 15:38:39 -05:00
Cole Robinson
427400d3f3 virtinst: cpu: Reorder feature bits to match libvirt XML order 2014-01-31 13:44:50 -05:00
Cole Robinson
90c9b3ca2e details: Reword the CPU model UI a bit more
- Add options in the model drop down for clear, hvdefault, and app default
- Make 'copy host' a check box, when enabled it hides the model dropdown
- Detect if the VM CPU is a copy of the host CPU
- Undocumented bit that allows passing in host-model/host-passthrough
    to the model field for people that really want those settings.
2014-01-31 13:40:09 -05:00
Cole Robinson
0a77093cbc console: Handle ipv6 addresses (bz 974126) 2014-01-29 11:02:54 -05:00
Cole Robinson
6042d762b5 cli: Add --graphics connected option (bz 730923) 2014-01-29 09:52:49 -05:00
Cole Robinson
64b2d0c6b7 Move shared graphics editing UI to gfxdetails.py
Fixes a couple UI bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=696217
https://bugzilla.redhat.com/show_bug.cgi?id=875403
2014-01-29 09:22:28 -05:00
Cole Robinson
d0c734e215 devicegraphics: Fix updating listen address
We need to make sure to change the corresponding <listen> block on newish
libvirt.
2014-01-29 09:22:28 -05:00
Cole Robinson
bd15cd3d6e distroinstaller: Fix volume upload with latest libvirt bindings (bz 1058720) 2014-01-28 10:00:06 -05:00
Chen Hanxiao
ffda1e8ef4 virt-install: add support for option "--cpu host-model-only"
commit 7003a3a528 introduced
"nearest host cpu model" option.
This patch add an option "--cpu host-model-only" to virt-install.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-28 09:40:00 +08:00
Cole Robinson
dde460e399 xmlbuilder: Fix adding devices with child properties
And test it
2014-01-27 19:55:37 -05:00
Cole Robinson
b963c3ec39 cli: Allow '--option help' for introspection as well 2014-01-27 14:48:23 -05:00
Chen Hanxiao
4b72c5f2a0 virtinst: clearer error message when disks upper limits reached
We set upper limits for virtio, hd ... disks in virtinst.
So we should let users know this.

Improve error message suggested by:
https://bugzilla.redhat.com/show_bug.cgi?id=822331

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-27 10:22:08 +08:00
Cole Robinson
58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Cole Robinson
2688ca64bb virt-xml: Fill in man page 2014-01-26 13:09:26 -05:00
Cole Robinson
b004d11eae cli: Fix unsetting --disk path 2014-01-26 13:09:26 -05:00
Cole Robinson
57e89cda8b virt-xml: Create storage if necessary 2014-01-26 13:09:26 -05:00
Cole Robinson
6e06b3642b cli: Explicitly error on cli options like --disk readonly
All options should be opt=val pairs, but we behaved weirdly on missing
= before.
2014-01-25 20:30:08 -05:00
Cole Robinson
443ae1b303 virt-xml: Change clear format to clearxml=yes, add --help example 2014-01-25 20:30:08 -05:00
Cole Robinson
48f69dd638 virt-xml: Add --update option for hotplug/hotunplug 2014-01-25 19:51:56 -05:00
Cole Robinson
26737eb7d5 virt-xml: Allow --option clearxml to clear all XML first
Needed for things like --cpu host-model,clearxml to easily clear all
the previous state.
2014-01-25 17:20:30 -05:00
Cole Robinson
9f5a842a3a xmlbuilder: Make clear() remove unknown XML properties 2014-01-25 17:20:30 -05:00
Cole Robinson
16c8c31cbd xmlbuilder: Remove unneeded argument to _remove_xpath_node 2014-01-25 17:20:30 -05:00
Cole Robinson
5edf4de058 xmlbuilder: Only pass xml context to _remove_xpath_node
Was confusing otherwise, and can give us a speedup.
2014-01-25 17:20:29 -05:00
Cole Robinson
5c762a9851 simplify remove_ node args 2014-01-25 17:20:29 -05:00
Cole Robinson
329ebe0746 xmlbuilder: Remove some unneeded redirection 2014-01-25 17:20:29 -05:00
Cole Robinson
927a7ef265 cli: Add --metadata option
Can take name, description, uuid, and title (new). This deprecates the
separate --description and --uuid element, but we won't require it for
specifying a name with virt-install/virt-image since that's quite
overkill. Allowing --name with this option is mostly for the benefit
of virt-xml.
2014-01-25 17:20:29 -05:00
Cole Robinson
ec359fd5b2 cli: Add --disk readonly and shareable options
This deprecates the difficult perms= sub option
2014-01-25 17:20:29 -05:00
Cole Robinson
7ba76b5748 cli: Add --memory, deprecates -r/--ram
This is a compound option like we use elsewhere, with suboptions for
maxmemory and hugepages.
2014-01-25 17:20:29 -05:00
Cole Robinson
cf626c3afe cli: Fix --security label=foo,unknownopt=val
We should embed the unknown opt
2014-01-25 17:20:29 -05:00
Cole Robinson
65124ff66b cli: Add infrastructure for tracking alias property names
Use this to hide redundant --boot extra_args option from introspection
output.
2014-01-25 17:20:29 -05:00
Cole Robinson
70ce777c33 cli: --controller: Remove double register of type 2014-01-25 17:20:29 -05:00
Cole Robinson
87a611b547 cli: Allow controlling arch, type, emulator via --boot 2014-01-25 17:20:29 -05:00
Cole Robinson
748ff1c4cc virt-xml: Initial commit, basic set of tests 2014-01-25 17:20:29 -05:00
Cole Robinson
ffa9bb77b3 Fix some pylint 2014-01-25 15:52:34 -05:00
Cédric Bosdonnat
beab40e3b1 Share the list of all disk image formats
(crobinso: Fix some trailing whitespace)
2014-01-25 11:59:32 -05:00
Cédric Bosdonnat
796ddd966a Moved vmmFSDetail.convert_units to virtinst.util 2014-01-25 11:58:24 -05:00
Cole Robinson
35f6567c69 Allow command line introspection ex: disk=?
This will list all sub options associated with that command.
2014-01-22 15:37:23 -05:00
Cole Robinson
316b2bd73b virt-install: Add some examples in --cpu help 2014-01-22 10:43:57 -05:00
Cole Robinson
812c4c6d98 virt-install: Move more shared options to cli.py
virt-xml will use these
2014-01-22 10:43:48 -05:00
Cole Robinson
f9ab83a69e virt-install: Deprecate --init, make it --boot init= instead 2014-01-22 10:43:09 -05:00
Cole Robinson
ec79c676b3 cli: Deprecate explicit --cpuset option, make it a --vcpus sub option 2014-01-22 10:43:01 -05:00
Cole Robinson
54b73f4502 cli: Centralize most option handling dispatch
Rather than require tools to do multiple parse_* calls. This infrastructure
will help with virt-xml as well.
2014-01-22 10:42:05 -05:00
Cole Robinson
269339f29f cli: drop get_* helpers, just make parse_* helpers handle all cases 2014-01-22 10:40:48 -05:00
Cole Robinson
d216c44157 Stub out --check-cpu option
It's old, uninteresting, and I don't think anyone is depending on it
to work. Parse the command line option, but don't do anything differently.
2014-01-22 10:38:42 -05:00
Cole Robinson
6c7439d625 cli: Drop useless get_uuid helper 2014-01-22 10:36:21 -05:00
Cole Robinson
d1edce1ca5 cli: Drop dest= from most arguments, it was redundant 2014-01-22 10:36:14 -05:00
Cole Robinson
41a84bae9f cli: Rework adhoc CLI parsing into a class structure
This adds:

VirtCLIArgument: a single foo=bar mapping
VirtOptionString: A collection of VirtCLIArguments, that parses the whole thing
VirtCLIParser: Represents a single cli option like --disk, --network, etc.

Centralizing this infrastructure opens up a lot of doors for future
improvements, like cli option introspection.
2014-01-22 10:35:30 -05:00
Chen Hanxiao
a98515a4da virt-install: add support for '--panic option'
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>

(crobinso: man page and cli tweaks)
2014-01-22 09:33:18 -05:00
Martin Kletzander
dc0b9bbaaf Rename hide_unsupported_rhel_options to stable_defaults and clean-up its usage
There were multiple problems with the setting and usage of
hide_unsupported_rhel_options.  Due to the fact that the option has
several diferent namings throughout the code, this patch is renaming
it to stable_defaults, which basically says what the option does and
makes it possible to use it without need for more than one negation
(where the old code had up to 4 of them in some places), which also
helps understanding it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-01-21 17:13:18 +01:00
Cédric Bosdonnat
d888ff2394 Add lxc filesystem drivers: loop and nbd
These file systems drivers have been added in virtinst, but also in the
addhardware UI.
2014-01-21 09:29:13 -05:00
Cédric Bosdonnat
2f505822a1 Add Hardware: added the missing filesystem types for LXC guests.
This means tweaking the UI to input a memory usage for the 'ram'
filesystem type.
2014-01-21 09:29:12 -05:00
Martin Kletzander
10331a5f14 pylint: Skip hashlib import hackery and remove unused variable
hashlib's dynamic import hackery makes pylint very sad since it cannot
realize that the module has sha256 member (just created dynamically),
so let's just make it skip this error.

Also remove unused variable in virtinst.cli

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-01-20 14:42:07 +01:00
Cole Robinson
c426a30511 Convert all command line handling to argparse
Allows us to drop some hacks, and we may need it for a new upcoming
tool.
2014-01-19 11:32:08 -05:00
Cole Robinson
7f66926721 Fix first time remote URL installs from virt-manager (bz 1049852)
On first run, the remote URL install handling creates a storage pool
for /var/lib/libvirt/boot on the remote host. After this, it clears
the VirtualConnection's object cache, so the next time all pools are
fetched, it returns an accurate list.

However that clear_cache call wasn't propagated up to virt-manager's
cache. Add a new cb to fix it.
2014-01-18 14:57:39 -05:00
Cole Robinson
a82b60dcff capabilities: Remove some public API back compat 2014-01-18 13:23:30 -05:00
Cole Robinson
dcd67be2db osdict: Use virtio console and qemu ga for RHEL7 2014-01-18 13:06:09 -05:00
Cole Robinson
073b3a69e3 urlfetcher: Use inst.repo kernel option for new RH distros (bz 1026841) 2014-01-18 13:04:47 -05:00
Cole Robinson
962994f72f osdict: RHEL7 has a public beta, so it's 'supported' now 2014-01-18 10:35:55 -05:00
Cole Robinson
e151146cad cloner: Don't validate new clone name (bz 1054771)
Our validation check might not be up to date, WRT what characters are
acceptable. So if we try to --auto-clone an existing valid VM with
some characters we aren't expecting, we cause ourselves to error.

Just skip the validation and let libvirt complain if something is wrong.
2014-01-17 18:44:26 -05:00
Cole Robinson
d040bf3573 Drop the len <= 50 validation check for domain names
Just let libvirt error out, since we have no idea if this is still
relevant.
2014-01-17 18:42:15 -05:00
Cole Robinson
958dea6c5f createnet: Use typical name validation pattern 2014-01-17 18:40:30 -05:00