Commit Graph

705 Commits

Author SHA1 Message Date
Giuseppe Scrivano
21319c4232 osdict, libosinfo: use "minimum" resources when "recommended" is missing
Some OS entries in libosinfo miss the "recommended" resources block.
In this case use the "minimum" resources when available.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:12:04 +02:00
Giuseppe Scrivano
0218d29a35 virtinst: add ich9 to the list of audio models
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:04:14 +02:00
Chen Hanxiao
30c3434916 test: update compare_check flags for auto-clone cases
auto-clone cases use SUPPORT_CONN_BARE_BACKINGSTORE,
which check libvirt 1.2.4.
Change it to SUPPORT_CONN_LOADER_ROM(1.2.9)
and drop SUPPORT_CONN_BARE_BACKINGSTORE.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-16 10:03:27 +08:00
Chen Hanxiao
4a83ea3a83 test: skip unit tests affected by loader extention before libvirt 1.2.9
libvirt commit for 1.2.9
68bf13dbef8342eaee0bf57c73cebb60b7de11e8
conf: Extend <loader/> and introduce <nvram/>

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-16 10:02:57 +08:00
Cole Robinson
eb7612356e virtinst: Switch to relative imports, fix cyclic import warnings 2014-09-12 16:28:38 -04:00
Cole Robinson
f512c05381 diskbackend: Get volume path from XML
The XML is likely already cached, and path() can hit the network, so
this can speed things up.
2014-09-12 16:28:38 -04:00
Cole Robinson
3064f4058d diskbackend: Simplify pool source lookup
Have it share logic with a similar routine
2014-09-12 16:28:38 -04:00
Cole Robinson
508debaf2d virtinst: Don't needlessly call conn.getType 2014-09-12 16:28:37 -04:00
Giuseppe Scrivano
a94cc98238 osdict: merge _OsVariantOsInfo with _OsVariant
Make a new class _OsVariantType which contains only the minimum
information shared between a OS type and an OS variant.

As it is not possible anymore to specify the type as the variant name,
define some alias names.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Giuseppe Scrivano
1291ffc8b7 osdict: _OsVariantOsInfo._init_ doesn't call _OsVariant._init_
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Giuseppe Scrivano
cbe5ffcee7 osdict: drop attribute "parent" from _OSVariant
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Lubomir Rintel
cf79f06559 nodedev: Be more descriptive about USB device identification
libvirt often passes devices with vendor and product information missing or
malformed, making the USB sharing dialog ugly or useless to the point it's
impossible to identify the device.

This aims to fix pretty-printing of weird textural identification and fall
back to numeric product and device id (in case textual represetations are
not present in the descriptor and device is too new to be in device
database).
2014-09-11 15:37:10 -04:00
Chen Hanxiao
61eadad354 distroinstaller: fix a typo
s/prepartions/preparations

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-11 11:08:22 +08:00
Chen Hanxiao
2987c721fb virtinst: fix a pylint warning
fix a "attribute-defined-outside-init" warning.
We set installer.livecd in virt-install.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-11 09:33:50 +08:00
Cole Robinson
db41d9459f cli: Don't error if logfile setup fails (bug 1138991)
If the logfile is owned as root, like could happen if the first run of
virt-manager is done via 'su -c' or similar, virt-manager refustes to
start on subsequent runs under reduced privs. Just log an error and
skip the logfile setup if that happens.
2014-09-08 10:51:34 -04:00
Cole Robinson
17f57eaaa7 Centralize call to setup_i18n in virtinst __init__
No need to call it twice
2014-09-08 10:42:44 -04:00
Cole Robinson
d9ca950acb distroinstaller: Don't attempt distro detection for remote CDROMs
We shouldn't access the local disk in this case
2014-09-07 16:16:39 -04:00
Cole Robinson
d8d6af55e5 distroinstaller: Cache fetcher and distro store lookups
Since we already determine the distro store ahead of time via
check_location and detect_distro, cache the result in the installer
class to save us some network traffic.
2014-09-07 14:40:09 -04:00
Cole Robinson
050d0fb16e urlfetcher: Make fetcher cleanup idempotent 2014-09-07 14:22:56 -04:00
Cole Robinson
faa0ef5e55 urlfetcher: Point to man page if location URL is invalid 2014-09-07 14:01:40 -04:00
Cole Robinson
46e135c7a1 urlfetcher: Remove outdated comment 2014-09-07 13:59:54 -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
1247e8d43e installer: Don't needlessly pass around scratchdir 2014-09-07 13:35:34 -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
Cole Robinson
bfb3174ec2 osdict: Manually tweak 'supported' info
Many old OSes don't have an EOL date tracked with libosinfo, and
we just treat them as 'supported'. So the default distro list in
the create wizard is wayyy too huge and contains all sorts of
crazy options.

Assume lack of EOL date means 'unsupported', and add a manual whitelist
for some still common distros. We will fix this at the libosinfo level.
2014-09-07 10:49:50 -04:00
Cole Robinson
eb01bc1b61 osdict: Disable virtioconsole default
We used to enable this for Fedora 18+, because systemd would
autostart a getty on /dev/hvc0 which made 'virsh console' work
out of the box for a login prompt. However now in Fedora
virtio-console is compiled as a module, and systemd doesn't
detect it in time to start a getty. So the benefit of using
it as the default is erased, and we reverted to this.

More info: https://bugzilla.redhat.com/show_bug.cgi?id=1039742
2014-09-06 18:37:20 -04:00
Cole Robinson
5aafe008bc Remove virt-image, as scheduled
As promised with the last release, remove virt-image. In 6 months I didn't
hear a peep from any actual users that cared.
2014-09-06 18:05:43 -04:00
Cole Robinson
2e7d477156 urlfetcher: Bunch of distro detection fixes
And update test_urls to ensure it's passing
2014-09-06 16:42:09 -04:00
Cole Robinson
95f8b4c6b0 distroinstaller: Fix https:// installs 2014-09-06 15:08:40 -04:00
Cole Robinson
f2f2c1fd95 Fix some pylint 2014-09-06 13:47:10 -04:00
Cole Robinson
7d25dbe7a3 osdict: Always use vmvga for ubuntu
There's been a couple reports recently that virt-manager's default of video
model=qxl doesn't work well with latest ubuntu 14.04:

https://bugzilla.redhat.com/show_bug.cgi?id=1129803
https://lists.fedoraproject.org/pipermail/virt/2014-August/004105.html

However vmvga works, so let's use it for all ubuntu versions and not just a
couple of them. Marc Deslauriers confirmed it should be safe.
2014-09-06 13:45:15 -04:00
Cole Robinson
d89888a7bd osdict: Don't force encode cirrus as the video default
Forcing cirrus isn't correct for non-x86 architectures, so let's have
libvirt fill in the default so there's only one place to fix it.
2014-09-06 13:45:15 -04:00
Cole Robinson
0759a31acc osdict: Turn videomodel check into a function
The previous setup of having an OS register a preferred videomodel is
overly simplistic and doesn't cover all our needs. Rework it without any
logic change for now, we will alter the logic in subsequent commits.
2014-09-06 13:45:15 -04:00
Cole Robinson
d1f46a75e7 cli: Don't rely on libvirt to generate MAC if mac=RANDOM (bz 1130449) 2014-08-15 15:02:57 -04:00
Giuseppe Scrivano
c1fd79c4f7 virtinst, snapshot: do not hardcode the value of VIR_DOMAIN_PMSUSPENDED
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-08-01 09:30:21 +02:00
Chen Hanxiao
cff8e32c55 virt-install: support setting hugepages/page/[@size, @unit, @nodeset] for memorybacking
libvirt commit
136ad49740f017aabcac48d02d2df6ab7b0195e9
introduce ./hugepages/page/[@size, @unit, @nodeset]
for memory backing.
This patch will add support in virt-install.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-07-30 14:34:03 +08:00
Chen Hanxiao
5f3ede96de storage: fix a typo
s/paramaters/parameters

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-07-28 16:55:28 +08:00
Giuseppe Scrivano
148576d69e virtinst, clone: use the specified MAC address for the new VM
Prevent setup_clone from changing the self._clone_macs list so that
further calls will access the same data.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-28 10:38:31 +02:00
Cole Robinson
5f81c4bdc0 virtinst: cli: Tweak some command line strings and indentation 2014-07-15 09:25:20 -04:00
Cole Robinson
8ea634f9e4 guest: Enable Hyper-v Enlightenments for Windows VMs
These are the recommended defaults for all windows VMs, when using
a new enough libvirt + kvm. Some more details in this boxes bug report:

https://bugzilla.gnome.org/show_bug.cgi?id=732811
2014-07-07 18:24:40 -04:00
Cole Robinson
1e77c05c4e Clarify some translation strings, reported on transifex 2014-07-04 16:42:24 -04:00
Giuseppe Scrivano
3606bb573d virtinst: add method to set connection keep-alive
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-07-02 15:31:40 +02:00
Ron
ea1d973957 Don't create disk images world readable and executable
Python's os.open() defaults to mode 0777 if not explicitly specified.
Disk image files don't need to be executable, and having them world
readable isn't an ideal situation either.  Owner writable and group
readable is probably more than sufficient when initially creating
them.

Signed-off-by: Ron Lee <ron@debian.org>
2014-07-02 07:35:15 +02:00
Chen Hanxiao
ddd88dac25 storage: fix another comment typo
s/explictly/explicitly

Thanks for Giuseppe's reminding.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-30 16:20:38 +08:00
Chen Hanxiao
7ce434fed7 urlfetcher: fix a comment typo
s/Explictly/Explicitly

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-30 10:58:53 +08:00
Giuseppe Scrivano
57d26e6265 virtinst: parse "bandwith" node in network definition
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-06-26 15:26:37 +02:00
Chen Hanxiao
75d43f6a37 fix some missed binary prefixes for units
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-17 09:33:14 +08: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
Chen Hanxiao
d3d76beb5b guest: fix order in _XML_PROP_ORDER
re-order xml values according to libvirt code.

a) move "blkiotune" "memtune" ahead of "memoryBacking"
b) move "resource" ahead of "pm"

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-05 08:52:24 +08:00
Chen Hanxiao
d1b0fade1d virt-install: add --resource support
This patch will enable setting
resource partition configuration.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-04 10:08:05 +08:00
Cole Robinson
809c5a81e5 diskbackend: Fix pool 'create' call (bz 1103442) 2014-06-03 16:26:28 -04:00
Cole Robinson
aefd4c4824 connection: Use name instead of uuid for object keys
And clean up the API mess while we are at it. Treat the key as an opaque
value that users shouldn't depend on.

Besides the improved code clarity and API layout, this will help diagnose
'key error' issues, since we'll see an object name instead of UUID which
is hard to trace back.
2014-06-02 17:48:32 -04:00
Cole Robinson
d3e9af8328 pollhelpers: Use correct dictionary keys for old pool/net polling (bz 1099827)
We were inadvertently using the object name rather than UUID when libvirt
didn't support new style polling APIs.
2014-06-02 12:18:59 -04:00
Cole Robinson
d3e55a1fbf pollhelpers: Add debugging helper to force old polling 2014-06-02 12:02:09 -04:00
Cole Robinson
da73e4980b virt-install: Add --boot initargs=
Expects a shell escaped string which we split into individual initarg bits
2014-05-31 17:15:03 -04:00
Cole Robinson
ceab99cf7b virtconv: Don't create default pool when in dry mode
We will still need to create pools to probe source storage if doing
--print-xml.
2014-05-31 16:30:00 -04:00
Cole Robinson
d6f063d0b8 diskbackend: If pool not running, start it
Nowadays we depend on the pool existing and running, so better to get
an error up front if pool startup will fail
2014-05-31 16:29:29 -04:00
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
Cole Robinson
b4e4f68376 cli: Add --graphics defaultMode 2014-02-27 17:43:59 -05:00
Chen Hanxiao
c1e7da72b7 cli: add missing remove_first method for --blkiotune
Add missing remove_first method for --blkiotune.
Update related man pages.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-26 09:38:20 +08:00
Cole Robinson
a2ab8a2643 tests: 'skip' a test if compare check fails
And make latest tests dependent on libvirt.git version
2014-02-25 15:05:58 -05:00
Cole Robinson
0b94c83beb xmlbuilder: Actually import logging 2014-02-25 14:56:54 -05:00
Cole Robinson
3efbefe91a Don't forbid object names that are only all numbers (bz 1067127)
Just let libvirt error, since in the case of things like storage pools
this is totally legitimate.
2014-02-25 14:54:06 -05:00
Cole Robinson
87c2ff1a14 xmlbuilder: Log broken XML if we can't parse it
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1066564
2014-02-25 12:45:15 -05:00
Chen Hanxiao
a48f75078d virt-install: Add --memtune option
This patch provides the ability to
tune memroy tunable parameters for the domain.
Also add test cases for --memtune option
and update man page.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-24 21:02:31 -05:00
Chen Hanxiao
0dceb24b3b virtinst: fix an issue of disk bus caculation
commit 466c2bcf9c
will generate the same index for
'hda' and 'hdaa'.
Also break test cases.

This patch will fix this.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-23 13:31:48 +08:00
Martin Kletzander
466c2bcf9c disk: calculate the disk bus properly
I forgot to amend this change when changing it the last time.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-19 10:12:53 +01:00
Chen Hanxiao
155bd7da8f cli: unify tag style
Unify tag style, looks a little better.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-18 22:40:39 +08:00
Martin Kletzander
55d5b35e50 Fix generate_target once more
Passing a zero to the generate_target() function's as pref_ctrl
parameter makes the 'if pref_ctrl' conditions obviously false.  Also
the range created was starting from 0 and not from 1.  Apart from
fixing this, also fix tests so they actually test something this time.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-18 08:14:32 +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
Cole Robinson
5d5be6df28 Remove some pylint 2014-02-14 11:37:47 -05:00
Cole Robinson
f431efc9b7 tests: Don't overwrite mkstemp, just check environment
Since this can interfere with the initrdinject test
2014-02-14 11:02:35 -05:00
Martin Kletzander
6c4302b0a7 disk: generate target controller-wise
Add an optional parameter to generate_target() that controls what
controller the disk should reside in (using libvirt's rules to create
addresses).

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Martin Kletzander
a9c791b5b8 Add target_to_num method
Opposite to num_to_target.  It will be used in future patch.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Martin Kletzander
55e85b1612 Unify prettification of VirtIO serial
Use the same case for occurrences of 'VirtIO' which start with
uppercase V.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Cole Robinson
a808bd6692 connection: Handle volume XMLDesc errors (bz 1064275)
This commonly happens when a file is deleted from a storage pool
behind libvirt's back.
2014-02-12 13:57:44 -05:00
Chen Hanxiao
b53b3874a4 virt-xml: add "-c" as short option of "--connect"
Add "-c" as short option of "--connect" for virt-xml.

We could use either
virt-xml -c lxc:///
or
virt-xml --connect lxc:///

This will be more convenient if we operate
non-default hypervisor.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-12 22:57:40 +08:00
Giuseppe Scrivano
7a1ffff927 storage: add support for gluster fs pools.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Giuseppe Scrivano
a2706e9258 storage: add new attribute "source_dir"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Giuseppe Scrivano
dd0af85d5a storage: make "target_path" optional
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Cole Robinson
7aecd1a9b8 connection: Fix deregisterevent tracebacks on app close 2014-02-11 16:26:15 -05:00
Chen Hanxiao
020957c756 cli: fix a tiny typo
s/./:

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-11 22:08:55 +08:00
Cole Robinson
21fb072d4a virt-install: Default to qcow2 for new images
Following along with virt-manager's change. It has all the features and
good enough performace, and is easy enough to override for people that
care.
2014-02-10 18:47:58 -05:00
Cole Robinson
cdd9dbe7fc cli: Add simple mode --disk size=X
Works the same as pool=default, we generate a disk image path and
create it in the default pool.
2014-02-10 18:34:44 -05:00
Cole Robinson
7bff99f853 cli: Use correct file extension for --disk pool=FOO 2014-02-10 18:27:06 -05:00
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