Commit Graph

548 Commits

Author SHA1 Message Date
Cole Robinson
42fe235cbf virt-install: Add --network portgroup= option 2014-05-31 14:30:07 -04:00
Cole Robinson
1c608f3ba8 network: Parse <portgroup> XML 2014-05-31 14:20:56 -04:00
Chen Hanxiao
33c7e63a99 cli: fix some style misc issue
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-05-29 17:06:13 +08:00
Chen Hanxiao
3c45262526 virt-install: add --events support
This patch will enable setting event configuration:
on_poweroff, on_reboot and on_crash.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-05-29 09:46:24 +08:00
Giuseppe Scrivano
b84f8cb406 osdict: fix default value for devices data
commit 4f056dcba9 didn't take into
account the default value.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-05-21 10:09:41 +02:00
Giuseppe Scrivano
4f056dcba9 osdict: lazy load devices data
Do not load the devices data for each OS as most of this data will
will not be used by virt-manager.  It makes the "Create new VM" wizard
faster on the first time it is accessed (~0.5s faster on my machine).

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-05-20 08:41:22 +02:00
Cole Robinson
ea89dfb53f tests: Don't fail on non-latest libvirt 2014-05-11 19:11:45 -04:00
Cole Robinson
196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -04:00
Cole Robinson
feadd98fed Fix using storage when the directory name contains whitespace (bz 1091384) 2014-04-29 14:09:14 -04:00
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
6ed988ebfc osdict: Prevent traceback in the logs when detection fails 2014-04-25 16:31:00 -04:00
Cole Robinson
e6a67fc709 filesystem: Fix target validation when editing device (bz 1089422) 2014-04-21 16:51:57 -04: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
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
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
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
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
89c45af26d interface: check ip address format
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-31 22:25:36 +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
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
6f52478b19 virtinst: DistroInstaller uses libosinfo detection first
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-26 16:12:13 +01: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
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
Chen Hanxiao
e4e39b777d osdict: fix a typo
s/inheiriting/inheriting

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-25 22:34:35 +08:00
Giuseppe Scrivano
2374f8458e osdict: expose libosinfo recommended resources for an OS
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00
Giuseppe Scrivano
db6d001b0e tests: fix to not fail with libosinfo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00
Giuseppe Scrivano
ad0575f731 virtinstall: add some quirks
It also adds aliases for OS names that are different under libosinfo
to maintain backward compatibility.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:42 +01:00
Giuseppe Scrivano
28273e3374 virtinstall: read OSes information from libosinfo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:41 +01:00
Giuseppe Scrivano
517bbad087 virtinstall: allow to redefine typename in _OSVariant
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-24 12:40:41 +01:00
Cole Robinson
b49f647e0c details: Fix unsetting autoport values 2014-03-22 18:29:08 -04:00
Cole Robinson
9050998028 cli: Rename --membacking to --memorybacking
More consistent with the existing --memory option, and the
XML block name.
2014-03-22 12:28:23 -04:00
Cole Robinson
a5b3c1d2f8 guest: Drop back compat hugepage attribute 2014-03-22 12:25:28 -04:00
Cole Robinson
d1749c614d cli: Move hugepages=on example to membacking 2014-03-22 12:19:44 -04:00
Chen Hanxiao
7096c3708e virt-install: Add --membacking option
Add option --membacking for "Memory Backing".

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-22 12:16:24 -04:00
Chen Hanxiao
58a07d04fb remove memoryBacking parameters from --memory
Remove some "Memory Backing" parameters from --memory,
and keep 'hugepages' for backward compatibility.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-22 12:16:24 -04:00
Cole Robinson
8562c3258e More pylint fixes 2014-03-22 11:21:19 -04:00
Cole Robinson
d763126862 Turn off some warnings with latest pylint 2014-03-22 10:01:19 -04:00
Cole Robinson
a99da363a4 capabilities: Handle arch=none for CPU lookup 2014-03-20 14:04:29 -04:00
Cole Robinson
1f5b07bea8 capabilities: Handle broken return value of failed CPUModelNames 2014-03-20 14:04:29 -04:00
Cole Robinson
994b1fa4f4 connection: Add explicit API for getting virConnect object 2014-03-20 14:04:29 -04:00
Giuseppe Scrivano
ef2206a8f5 virtManager: read the reason for the domain state
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-20 08:48:47 +01:00
Chen Hanxiao
008feeb09a Add more parameters for memoryBacking
Add support for parameters nosharepages and locked
if using option --memory.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-14 21:23:23 +08:00
Giuseppe Scrivano
81696a5144 virtinst: use libvirt getCPUModelNames when available
Read the list of CPU models trough getCPUModelNames instead of
accessing directly the file cpu_map.xml.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-13 19:00:54 +01:00
Giuseppe Scrivano
6c2645f0d2 virtinst: drop parsing of cpu features
As for the previous patch, this information is not used anywhere and
this information should be retrieved using the libvirt baselineCPU
API.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-13 16:50:40 +01:00
Giuseppe Scrivano
143a689592 virtinst: drop cpu_map parsing of arch features
This information is not used anywhere and there is no way to read
it directly from libvirt without parsing the cpu_map.xml file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-13 16:50:37 +01:00
Giuseppe Scrivano
75349b9cf0 lxc: define a private network for OS containers
By default, specify the the "<privnet>" feature with LXC operating
system containers.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1040406
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-10 15:48:42 +01:00
Cole Robinson
797afb3b27 virt-install: Fix --location iso again, and test it (bz 1071513) 2014-03-06 12:46:46 -05:00
Cole Robinson
df7012a68b Handle libvirt generating invalid volume XML (bz 1072770) 2014-03-06 12:04:08 -05:00
Cole Robinson
75a2e12dc0 tests: Fix a few failures with older libvirt 2014-03-06 11:29:23 -05:00