Commit Graph

3852 Commits

Author SHA1 Message Date
Jim Minter 764063dfe9 virt-install --disk discard= support
(crobinso: Remove default overriding, add test cases)
2014-04-29 10:38:30 -04:00
Cole Robinson 02f49be9e2 serialcon: Hide scrollbar until there's something to scroll 2014-04-29 10:28:06 -04:00
Chen Hanxiao 10e199279d console: fix a comment typo
s/arbitray/arbitrary

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-26 23:01:08 +08:00
Chen Hanxiao 8d3dbfb90c details: force select list entry before showing popup menu
We show/hide remove device menu by the attribute
of config-remove button.
But on some desktop, it showing popup menu before
selection.
This patch will force select list entry before
showing popup menu.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-26 22:45:50 +08:00
Chen Hanxiao 2dd2e440d1 addhardware: introduce populate_controller_model_combo
Introduce populate_controller_model_combo for details
and addhardware.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-26 22:41:31 +08:00
Chen Hanxiao 865dd99af2 addhardware: add controller UI
This patch will enable adding controller
without model.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-26 22:40:17 +08:00
Giuseppe Scrivano 33a2d1a1c8 virt-manager: use autocomplete for OS variant selection
After the migration to libosinfo, choosing an OS variant from "New VM"
wizard became a mess for the very long list of options.
Using an autocomplete entry text will facilitate this task, as an user
can start typing the variant as soon as the OS type is selected.
The combo-box is left untouched, so undecided users can still use it.

UI-suggested-by: Máirín Duffy <duffy@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-04-26 10:32:30 +02:00
Cole Robinson 6ed988ebfc osdict: Prevent traceback in the logs when detection fails 2014-04-25 16:31:00 -04:00
Chen Hanxiao b1236c1af0 console: fix a comment typo
s/succesfull/successful

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-22 23:41:04 +08:00
Chen Hanxiao cb682c09eb details: show/hide remove popup menu by remove button
Use the senesitive attribute of remove button to
determine whether remove popup menu should be shown.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-22 07:31:18 +08:00
Cole Robinson 70da20682c details: Explicit warn that 'format' doesn't change image format (bz 1089457) 2014-04-21 17:04:33 -04:00
Cole Robinson e6a67fc709 filesystem: Fix target validation when editing device (bz 1089422) 2014-04-21 16:51:57 -04:00
Giuseppe Scrivano b20462d861 virt-manager: display error on an empty installation URL
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1086529

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-04-18 09:52:44 +02:00
Giuseppe Scrivano 06e480c847 virt-manager, addhardware: disable "Finish" with unsupported devs
Disabled the "Finish" button in the "Add Hardware" window when the
specified dev is not supported by the HV.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-04-17 21:11:00 +02:00
Cole Robinson d4c27baa45 connection: Mark a few bits as private 2014-04-16 12:29:24 -04:00
Cole Robinson 873c22d19a connection: Avoid some useless errors when connection closes
- Run the connection
- Restart libvirtd, connection is auto closed
- Re-run the connection
- Manually stop it, see errors in the logs about unknown event IDs

We need to unconditionally clear our event ID list
2014-04-16 12:29:24 -04:00
Cole Robinson 1f7604b241 engine: More work to fix cascading error dialogs
If a remote network connection stalls, the tick queue becomes backed
up while we wait for the hung connection to continue. While this
happens, the queue is filled up with other requests to poll the hung
connection.

When the connection finally times out, the tick thread closes the
connection via an idle callback. However before that callback gets
a chance to run, all the other poll requests for the dead connection
are processed, all launching their own error dialog.

Mark the connection as 'closing' before conn.close is scheduled, and
use it to short circuit the tick() routine.
2014-04-16 12:29:24 -04:00
Cole Robinson 341a453d28 error: Don't log redundant details bits 2014-04-16 12:17:10 -04:00
Chen Hanxiao 6288135f2b addhardware: use range to initialize page number
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-16 23:39:06 +08:00
Giuseppe Scrivano e980d9c737 virtinst: display the domain for PCI devices
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1085499

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-04-15 18:53:26 +02:00
Chen Hanxiao 86fc54be8e details: hiding removebutton for USB controller
commit 4c53debd8a
break hiding "config-remove" for USB controller.
This patch will fix this issue.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-15 22:44:43 +08:00
Giuseppe Scrivano 1d312a520e virtinst: early detect ftp connection errors
It fixes two problems:

i) "ftp://" was accepted as valid URL but then it causes this
exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/ftplib.py", line 387, in login
    resp = self.sendcmd('USER ' + user)
  File "/usr/lib64/python2.7/ftplib.py", line 243, in sendcmd
    self.putcmd(cmd)
  File "/usr/lib64/python2.7/ftplib.py", line 178, in putcmd
    self.putline(line)
  File "/usr/lib64/python2.7/ftplib.py", line 173, in putline
    self.sock.sendall(line)
AttributeError: 'NoneType' object has no attribute 'sendall'

ii) only a cryptic error message "Unable to complete install: '[Errno
-2] Name or service not known'" was showed to users when the DNS
lookup failed.  The exception is now intercepted and decorated with
more information.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-04-14 15:20:18 +02:00
Chen Hanxiao 4ccb1d862b details: use uniformed expression of "Default"
We use both "Default" and "default" for controllers
if no controller model needed.
They should be the same expression and "Default"
is a better choice.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-14 20:08:00 +08:00
Roman Bogorodskiy 05df5a6484 Add bhyve support
Allow connection to bhyve using bhyve:///system URI. That is
disabled by default and could be enabled using the new
configure option 'with-bhyve'.
2014-04-11 15:52:31 -04:00
Chen Hanxiao 35c9afad45 test: fix a pylint
After commit 7594cef35f,
pylint show a "access to a protected member" warning.
This patch introduces a static method to solve it.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-10 23:15:55 +08:00
Chen Hanxiao e0215dec61 addstorage: removing whitespace for storage path
virtinst util validate_name can't accept name
with whitespaces aroud it.
Remove it when getting text from UI.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-09 23:33:00 +08:00
Roman Bogorodskiy 7594cef35f tests: fix TestCapabilities.testCPUMap
testCPUMap() tries to open /usr/share/libvirt/cpu_map.xml file
and that fails if libvirt is not installed on the system
or cpu_map.xml path is different.

Force it to use tests/capabilities-xml/cpu_map.xml file instead.
2014-04-08 18:13:03 +02:00
Cole Robinson 8fa2aad1d3 createpool: Clarify iscsi IQN fields (bz 1084011) 2014-04-03 11:19:03 -04:00
Cole Robinson 932e6e00bb details: Fix changing graphics type (bz 1083903)
And clean up the API usage to avoid these types of issues in the future.
2014-04-03 10:53:54 -04:00
Cole Robinson ee6a541167 details: Fix showing vcpus values in 'customize' dialog (bz 1083903) 2014-04-03 10:30:37 -04:00
Cole Robinson a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Chen Hanxiao 01718bc408 man: update virt-manager bugreporting URL
Now we use http://virt-manager.org/bugs/ as
bug reporting page.
Although old URL will be redirected to this one,
direct URL would be better.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-01 23:08:30 +08:00
Cole Robinson adf3545671 connection: Hook into domain balloon event (bz 1081424) 2014-03-31 12:43:49 -04:00
Chen Hanxiao 89c45af26d interface: check ip address format
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-31 22:25:36 +08:00
Cole Robinson 7f802e287c gfxdetails: Show port number for active autoport VM (bz 1081614) 2014-03-30 17:34:26 -04:00
Chen Hanxiao 45d8d4ec85 config: fix a typo
s/authorizaation/authorization

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-30 22:57:21 +08:00
Chen Hanxiao 119025e1ef createinterface: raise value error when no ip addr set
We could set blank ip address

IP setting->Configure->Mode (static), then press "OK".

And libvirt will throw an error not very helpful:
Error creating interface: 'Could not define interface:
XML error: could not get interface XML description:
XML invalid - Element protocol failed to validate attributes.

This patch will forbid setting an empty ip address.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-30 07:47:57 +08:00
Giuseppe Scrivano 5120b90fc3 osdict: lazy load data from libosinfo
I've noticed that virt-manager took more time to startup after we
started reading OSes data from libosinfo.

Now the libosinfo data is loaded the first time it is accessed,
without pre-loading it.

This could be further improved by not loading completely an _OsVariant
object but only the data that is requested.

With the lazy load optimization (best of 10 attempts):

$ echo yes | time ./virt-xml --connect __virtinst_test__test:////home/gscrivano/src/virt-manager/tests/testdriver.xml,predictable --confirm test --edit --cpu host-passthrough > /dev/null
0.13user 0.02system 0:00.22elapsed 74%CPU (0avgtext+0avgdata 26756maxresident)k

Without (best of 10 attempts):

$ echo yes | time ./virt-xml --connect __virtinst_test__test:////home/gscrivano/src/virt-manager/tests/testdriver.xml,predictable --confirm test --edit --cpu host-passthrough > /dev/null
1.26user 0.04system 0:01.36elapsed 95%CPU (0avgtext+0avgdata 57996maxresident)k
0inputs+16outputs (0major+17499minor)pagefaults 0swaps

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-29 21:28:50 +01:00
Chen Hanxiao 58d8795b27 createinterface: set right ip address for ipv6
We use v4_addr for building ipv6 addr.
This patch will use right ip address for ipv6.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-27 22:01:21 +08:00
Giuseppe Scrivano 37eecb215d virtManager: hide "Remove Hardware" for non-devices
The menu item "Remove Hardware" in the Overview window is valid only
when a hardware device is selected, hide it in any other case.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-27 13:50:06 +01:00
Giuseppe Scrivano 6c68467be7 virt-manager: update copyright years in the About box
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 16:12:13 +01:00
Giuseppe Scrivano a3e1444a28 osdict: handle libosinfo lookup failure
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 16:12:13 +01:00
Giuseppe Scrivano 6b5171031e virt-manager: enable media detection for CD/ISO images
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 16:12:13 +01:00
Giuseppe Scrivano 6f52478b19 virtinst: DistroInstaller uses libosinfo detection first
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 16:12:13 +01:00
Cole Robinson 9d743ab4c8 snapshots: Tweak warning before run
Make it clear that VM configuration changes will also be dropped if
reverting to a snapshot while the VM is offline.

Suggested-by: Jorge Fábregas <jorge.fabregas@gmail.com>
2014-03-26 08:54:10 -04:00
Giuseppe Scrivano af216ebaf6 osdict: add new function lookup_os_by_media
"lookup_os_by_media" fetches the OS of the installation media by
querying libosinfo.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 10:51:40 +01:00
Marc-André Lureau c6a48c5123 addhw: fill new char-channel UI
Map values to CharDevice.source_channel.

Set correct channel type and Spice port name for Spice webdav channel.
2014-03-25 17:42:57 -04:00
Marc-André Lureau 2236275d4c addhw: add CharDevice "spiceport" type
Add a new channel type "spiceport".

Adding a new virtio channel of name org.spice-space.webdav.0 connected
to a Spice port with the same name allows the Spice client to share a
folder.
2014-03-25 17:42:57 -04:00
Marc-André Lureau 5882f05e3e addhw: add CharDevice.source_channel
This property maps to channel/source/@channel domain XML.
2014-03-25 17:42:57 -04:00
Marc-André Lureau 2606c1d1b8 ui: add 'channel' to addhardware char panel
Add a 'Channel' entry, to specify the name of a channel (Spice port,
currently).
2014-03-25 17:42:57 -04:00