Commit Graph

3693 Commits

Author SHA1 Message Date
Cédric Bosdonnat
7d5d9df91a vmmFSDetails: don't use a combo for RAM units, force to MB 2014-01-25 11:59:32 -05:00
Cédric Bosdonnat
0216aaadf6 Don't capitalize disk formats in the combo box 2014-01-25 11:59:32 -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
Charles Arnold
92a21f6d14 Fix default_uri xen check
The xend toolstack is deprecated upstream.  While support needs continue
for this legacy toolstack, the newer libxl toolstack does not need xend
to work.  Additionally, libvirt now has drivers for supporting the libxl
toolstack.

This patch changes the check from /var/lib/xend to /var/lib/xen
which is a common path in both toolstacks.  Neither the old path nor the
new one actually proves that xend is currently running.  It just validates
that xen has been installed on the machine.

Signed-off-by: Charles Arnold <carnold@suse.com>
2014-01-25 11:55:56 -05:00
Giuseppe Scrivano
f2dbae6118 create: show correctly the list of supported OS
Do not show only the OS supported stable when stable_defaults is not
used.  commit dc0b9bbaaf introduced this
issue.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-01-24 09:33:35 +01: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
Chen Hanxiao
4c53debd8a add support for showing and modifying scsi controller model
We could specify 'model' for scsi controllers,
that means we could see more than one controllers
with same icon and blank details.
That will confuse users.

This patch will show details of scsi controller device.
And also we could modify scsi controller model
between 'default' and 'virtio-scsi'.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-22 09:07:40 -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
d2f625cb22 Use vmmFSDetails in details dialog to allow editing filesystem devices 2014-01-21 09:49:09 -05:00
Cédric Bosdonnat
40422e13f2 Create a separate class vmmFSDetails to share filesystem addhardware UI
This class will be reused in the virtManager/details.py code soon to
provide the same UI to modify filesystem devices than to create them.
2014-01-21 09:29:13 -05: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
Chen Hanxiao
dc439b2c1c addhw: set virtio-scsi controller index via max index in scsi controller list
We set virtio-scsi controller index according to
the number of scsi controller in VM.
This patch will set virtio-scsi controller index
via max index in scsi controller list.

How to reproduce:
a)
If we got an VM with two scsi controller:
<controller type='scsi' index='0'>
<controller type='scsi' index='2'>

#reason for index='2':
someone delete a scsi controller with index=1
by virsh

b)
add a virtio-scsi disk by virt-manager

c)
error threw by virt-manager:
libvirtError: XML error: Multiple 'scsi' controllers with index '2'

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-21 09:00:39 -05:00
Chen Hanxiao
6d5acfab52 disable virtio disk with device type 'LUN'
We should not encourage user use device type 'LUN'
if they selected virtio bus.
This patch will prevent user from doing this.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-21 08:49:18 -05:00
Chen Hanxiao
0019036e97 man: fix a typo in virt-manager man page
s/-help/--help

Although '-help' could work, but we should not encourage
this, and also should be same as
the output of 'virt-manager -h' command.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-21 12:58:11 +01: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
a0c2fdf429 virt-manager: Make --show-domain-creator show the manager as well
Otherwise we don't have any way to close the app.
2014-01-19 12:03:17 -05: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
178805e265 asyncjob: Constrain size of text label 2014-01-18 13:23:05 -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
077eac8c1d createinterface: Fix creating bridge with unconfigured interface (bz 1048351) 2014-01-17 20:25:08 -05:00
Cole Robinson
62cfac18dc host: Fix looking up interfaces on repopulate signal 2014-01-17 20:23:29 -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
Cole Robinson
594e26d772 Change the kvm default cpu to 'nearest host cpu model'
This makes new x86 kvm guests use the host's CPU model as reported by
libvirt capabilities output. This is a reasonable compromise for now
to increase performance while we wait for libvirt/qemu to fix host-model.
2014-01-17 17:41:26 -05:00
Cole Robinson
7003a3a528 prefs: Allow changing the default VM CPU mode/model config
Add a preference for changing the default CPU mode/model. The options are:

- default (whatever virt-manager chooses as the default)
- hypervisor default (no <cpu> block, what we've always done)
- nearest host cpu model (just the 'model' from caps->host->cpu)
- copy host cpu (the entire <cpu> block from caps->host)

The setting only applies to KVM guests, not tested with anything else.
The default is left as is for now (hypervisor default).

copy host CPU will one day use mode='host-model', when it does what
we want. At that point we will probably make it the default
2014-01-17 17:41:26 -05:00
Cole Robinson
b215b27854 prefs: Modernize glade file
tables->grids
clean up some legacy spacing
make a new 'new vm' tab which will expand shortly
2014-01-17 15:30:10 -05:00
Cole Robinson
849141552d details: Fix stdout spew on hw_update error
Not sure what caused this, but its easy enough to avoid
2014-01-17 14:22:49 -05:00
Giuseppe Scrivano
770b173337 doc: state correctly the number of possible values for --network=
95170e8892 added --network=direct
without updating the number of possible values for --network in the
man page.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-01-15 15:55:10 +01:00
Cole Robinson
6d2f937c99 virt-install: --host-device: add driver_name option 2014-01-14 18:09:21 -05:00
Cole Robinson
b57a2094ff Probe entire backing chain when checking if path is in use 2014-01-14 17:44:14 -05:00
Cole Robinson
330bcd9c8b delete: Track kernel/initrd/dtb as well 2014-01-14 17:26:29 -05:00
Cole Robinson
79ce0dcdc5 details: Fix changing media for two different cdroms
We weren't updating the target device of the choosecd dialog, so only
the first targetted device was ever updated.
2014-01-14 17:18:02 -05:00