Commit Graph

686 Commits

Author SHA1 Message Date
Cole Robinson e71e5cd9dd devicedisk: Open code _xmlpath handling
Rather than depend on xmlbuilder infrastructure. We will need to extend
this logic for network disks, and it's easier this way.
2014-12-04 15:28:14 -05:00
Cole Robinson e992cc15b2 virt-xml: Disable clearxml= for devices
It doesn't work in the general case, and users can just --remove and
--add devices as needed for the same effect
2014-12-04 15:28:14 -05:00
Cole Robinson 8d6ffafa1b tests: testdriver: More network storage examples 2014-12-04 13:06:20 -05:00
Cole Robinson 899bff4c4d tests: Quiet things with non-latest libvirt 2014-12-04 13:04:02 -05:00
Giuseppe Scrivano d2e6271337 Revert "tests: fix tests suite with last libvirt version"
This reverts commit 9477f06376.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-12-01 18:00:16 +01:00
Giuseppe Scrivano 9477f06376 tests: fix tests suite with last libvirt version
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-12-01 17:02:22 +01:00
Giuseppe Scrivano 51e5a47120 virt-manager: reset vgamem for video when changing device type
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1169295

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-12-01 17:02:22 +01:00
Giuseppe Scrivano 9d633879b1 tests: fix failures with libvirt upstream version
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-25 10:42:51 +01:00
Cole Robinson 26828b52cc guest: Use virtio-scsi for arm machvirt CDROM
Since it's the only option we have to actually use the CDROM
2014-11-20 11:27:09 -05:00
Cole Robinson 60e62e2676 osdict: Add back compat 'virtio26' entry
We used to have that in the old osdict. Map it to fedora10 which gives
virtio net/block but nothing else, which matches the old behavior.
2014-11-17 10:22:37 -05:00
Anatoly Belikov 78c52a13f1 add gluster and sheepdog pool/volume to testdriver.xml 2014-11-16 15:46:27 -05:00
Martin Kletzander 339ead9f70 tests: fix failure on 32-bit machines
clitest.py used the value 100000000000 (100 PB) for memory size, which
was parsed as 0 by older libvirt.  Latest release (1.2.10) has the
parsing fixed and properly reports an error on overflow.  Changing the
memory size to 4000000 (4 TB) is still an overcommit, at least most
development machines and it works properly.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-11-05 09:00:58 +01:00
Cole Robinson baee53fbaa util: Simplify default_bridge to not confuse pylint 2014-10-27 19:53:25 -04:00
Cole Robinson cbf38cbe9f pylint: Ignore new warnings 2014-10-27 19:53:25 -04:00
Giuseppe Scrivano cce5827195 virtinst: add support for disk type="volume"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-26 16:24:59 +02:00
Cole Robinson 42ac7a3036 guest: Set optimal arm CPU defaults
If doing arm kvm, use cpu=host. Otherwise, specify cortex-a57 for aarch64
so we actually get a 64bit cpu
2014-09-23 16:18:23 -04:00
Cole Robinson c4162f6708 Use -M virt as default machine for arm/aarch64
Centralize the default machine logic in caps and use it consistently
2014-09-23 16:05:48 -04:00
Cole Robinson 0182ba3ead guest: Use virtio for arm -M virt
In fact it's the only thing it supports
2014-09-23 15:12:02 -04:00
Cole Robinson 92db9bd4dd tests: Add some more arm tests
Many are broken for now, but they will help validate we are setting
the correct defaults with subsequent patches.
2014-09-23 15:08:47 -04:00
Cole Robinson c216302743 tests: capabilities: Add aarch64 test data 2014-09-23 14:56:44 -04:00
Cole Robinson 86417d42ca osxml: Ensure kernel/initrd/dtb are absolute paths 2014-09-23 14:32:01 -04:00
Cole Robinson 4c4bdbb8b8 cli: Allow embedding comma in kernel_args
And fix can_comma for aliases
2014-09-23 14:14:21 -04:00
Cole Robinson 30db9ece22 osdict: Add qemu-ga for RHEL6 and RHEL7 guests (bz 1139109) 2014-09-22 17:33:55 -04:00
Cole Robinson b3fa8bb650 tests: Ensure osdict.py aliases is never extended 2014-09-21 15:26:03 -04:00
Cole Robinson df50fdc323 testdriver: Add a host-model and host-passthrough usage 2014-09-21 10:17:51 -04:00
Cole Robinson eda5eea549 virt-install: Switch --cpu host to use host-model, not copy (bz 1133155)
host-model offers us other protections now, like ensuring we don't try
to use a host cpu feature that qemu doesn't support.

http://bugzilla.redhat.com/show_bug.cgi?id=1133155
2014-09-20 20:44:13 -04:00
Cole Robinson 64106230bd virt-install: Add hidden option --test-media-detection
Can help with debugging and test cases
2014-09-20 20:32:19 -04:00
Cole Robinson 3933ff101b guest: Limit number of default usb redirdevs to 2 (bug 1135488)
If we use 4 devices here, we fill up all the emulated USB2 slots,
and directly assigned devices are forced to fall back to USB1

https://bugzilla.redhat.com/show_bug.cgi?id=1135488
2014-09-20 20:16:31 -04:00
Cole Robinson d7e1a40352 virt-install: Deprecate --nodisks in favor of --disk none 2014-09-20 19:16:13 -04:00
Cole Robinson 57ae284ad4 virt-install: Deprecate --nonetworks in favor of --network none
Follows the pattern used by the other cli options
2014-09-20 19:02:38 -04:00
Cole Robinson e3de3d8b69 virt-convert: Fix pointing to relative config file 2014-09-20 18:29:20 -04:00
Cole Robinson 1bfdf0575f test_inject: Drop old bits, add f21 and rhel7, reorg a bit 2014-09-20 15:58:52 -04:00
Cole Robinson 6a8194ebc7 docs: Document virtio-scsi better, and add explicit test cases for it 2014-09-20 15:03:19 -04:00
Cole Robinson 5130d959e5 cli: Advertise the --host-device option as --hostdev
It annoys me that all the other CLI options map to the libvirt XML name,
except this one. Of course, keep the old option around for back compat,
just give precendence to the new option.
2014-09-20 14:29:34 -04:00
Cole Robinson c88d085d03 virt-xml: Make --remove-device --host-device <str> work
Need to add some infrastructure for arbitrary lookup functions
2014-09-20 14:22:29 -04:00
Cole Robinson dd67c48233 connection: Handle nodedev polling too
And cleanup up a bunch of nodedev functions as a result
2014-09-20 12:04:49 -04:00
Cole Robinson 8cd4958a19 cli: Break out function to disable libvirt error printing
We need it early in the test suite
2014-09-20 12:04:37 -04:00
Cole Robinson 55739055fd ui: Set all files to minimum requirement of gtk 3.8
That way gives us better feedback from glade
2014-09-19 21:19:26 -04:00
Cole Robinson d119a1bf6a pylint: Disable cyclic-import check
Yeah it has a point... but the code works fine in practice, and the
remaining issues will need some decent reorg to fix.
2014-09-19 20:13:52 -04:00
Cole Robinson 052220cfc8 virtinst: Add DomainCapabilities parser 2014-09-17 18:29:24 -04:00
Giuseppe Scrivano 17a37ea39b virt-install: add tests for OVMF
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:47:02 +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
Giuseppe Scrivano 1341928e92 test: Fix tests with latest libvirt
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-15 11:27:35 +02: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 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 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 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
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
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
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
Cole Robinson f6e214d438 testdriver: Add network <bandwidth> example 2014-06-26 08:50:08 -04: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 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 eca6cd9471 virt-convert: Don't print 'convert' output with --print-xml 2014-05-31 16:41:30 -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 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
Cole Robinson f397d96ca6 virt-install: Don't require install option with --print-xml (bz 1095789) 2014-05-11 19:19:00 -04:00
Cole Robinson ea89dfb53f tests: Don't fail on non-latest libvirt 2014-05-11 19:11:45 -04:00
Chen Hanxiao c28516e73c test: Fix tests with latest libvirt
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-05-05 11:00:35 +08:00
Cole Robinson 196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -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
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
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
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
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
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
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
Cole Robinson f23c031af4 ui: Drop minimum version to match RHEL7
And add unit test to catch future dependency issues
2014-03-10 11:17:58 -04: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
Chen Hanxiao 40c1f5fdb8 clitest: put fake iso under /tmp dir
commit 797afb3b27
bring a dir depending issue when using
fake iso.
Test output will be undecided when virt-manager source
in different dirs.

This patch will touch a fake iso under /tmp,
so test case will pass on most of the machines.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-03-07 09:06:27 +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 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
Cole Robinson dd577de636 tests: Remove 'support' module, not very useful these days 2014-02-25 15:06:36 -05: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
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 6722d2049e tests: update test suites output with the last libvirt
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-24 11:33:42 +01: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 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 20b103d910 tests: test_inject: Minor fixups 2014-02-14 11:35:29 -05: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 4196f4287b Use proper python version
since we work with python2 only, mentioning it in all shebangs make
the commands from git work even when python3 is set as default.

This also fixes one test where command being ran is 'virt-xml' through
subprocess.Popen().

While at that, add '-tt' where possible in order to make everyone use
same indentation characters.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Cole Robinson d680539b46 Add missing test file 2014-02-12 13:57:36 -05: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
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 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 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
Chen Hanxiao e067051287 test: fix some test suites
commit:
67743cbe31
c5f6c6852a
and
98ea4cdad2

break some test suites.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-09 08:38:56 -05:00
Cole Robinson 98ea4cdad2 Reduce test suites clear_cache calls 2014-02-08 19:28:56 -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 dbfa8166b1 virt-xml: fix a terminal_width depends issue
One of virt-xml test case will output logs by
urlgrabber.process, which will get the real width of
terminals.
If we resize terminal, of who is running test, from
80 to other size, test case will fail.
This patch will screen it when running test case.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-07 23:05:41 +08:00
Giuseppe Scrivano 74463e394e tests: fix tests suite with the last libvirt version
commit 499cb63f65 broke the test suite
with the last version of libvirt.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-07 00:04:20 +01:00
Giuseppe Scrivano 499cb63f65 doc: remove reference to SDL from virt-install man page
Adjust some tests to not use --graphics sdl.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-06 16:20:12 +01: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
Cole Robinson dff14ea12b tests: Use consistent predictable URIs 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 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 8917445e32 Fix tests with latest libvirt 2014-02-03 16:08:34 -05:00
Cole Robinson 02402fcc0a Fix some pylint 2014-02-03 16:00:03 -05:00
Cole Robinson 35d06e668a setup: Add tests --regenerate-output
Static variable is too dangerous (notice I forgot to unset it with a
recent commit)
2014-02-03 15:55:20 -05:00
Cole Robinson cac593da8f storage: Use qcow2 lazy_refcounts if supported 2014-02-03 15:55:20 -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 66d9cdbe22 tests: Strip beginning lines from diff output to not conflict so much 2014-02-02 13:44:20 -05:00
Cole Robinson bce8ee942d Fix some pylint 2014-02-01 19:47:31 -05:00
Cole Robinson 6638587077 clitest: Don't needlessly deviate default_bridge from test infra 2014-02-01 14:19:37 -05:00
Cole Robinson 184fe3fdb1 clitest: Make it easier to filter prompt tests 2014-02-01 14:17:03 -05:00
Cole Robinson a0bcaf55d9 testdriver: Add startupPolicy example 2014-02-01 09:51:08 -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 16390a5433 clitest: Infrastructure for skipping test compare
Our virt-xml tests don't compare correctly if we aren't using the
latest libvirt that supports the <panic> device.
2014-01-30 11:05:45 -05:00
Giuseppe Scrivano 3a4be995db tests: fix tests with latest libvirt from git
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-01-30 08:41:52 -05:00
Cole Robinson dde0012732 tests: Fix my busted clone skip change 2014-01-30 08:41:28 -05:00
Cole Robinson 4314a8379b tests: Silence needless 'skip' output 2014-01-29 11:36:19 -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 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
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 443ae1b303 virt-xml: Change clear format to clearxml=yes, add --help example 2014-01-25 20:30:08 -05:00
Cole Robinson 110d6aac83 virt-xml: Add --build-xml option for just outputing XML 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 ecfc1a527d virt-xml: Make --domain positional, allow stdin XML 2014-01-25 18:16:16 -05:00
Cole Robinson 6fa2876486 virt-xml: Actually update the INACTIVE xml 2014-01-25 17:20:30 -05:00
Cole Robinson e49e61f71e virt-xml: Add --add-device and --remove-device options 2014-01-25 17:20:30 -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 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 748ff1c4cc virt-xml: Initial commit, basic set of tests 2014-01-25 17:20:29 -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 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 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
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 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 765b1ed7d6 Track kernel/initrd/dtb in 'path in use by' UI 2014-01-14 16:57:32 -05:00
Chen Hanxiao 2bee4a128d panic notifier: display default value if not set
If we didn't set values for @type and @iobase in
XML, libvirt will use the default value.
Currently, virt-manager will display "-" if we don't
set any values.
This patch will use default value for display.
And update test case to cover this scenario.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-14 09:58:09 -05:00
Cole Robinson f02b85d913 guest: Don't add qemu-ga on ARM where virtio slots are limited 2014-01-12 14:58:43 -05:00
Chen Hanxiao 8419835b1d virtinst: add support for panic notifier device
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-11 14:32:18 -05:00
Cole Robinson 95170e8892 virt-install: Support --network source, source_mode, target
The latter two bits are needed for macvtap configuration.
2014-01-06 15:17:32 -05:00
Cole Robinson c9680b34a1 ppc64 pseries guests use vga graphics, not qxl (bz 1034693) 2013-12-18 16:17:01 -05:00
Cole Robinson 70f1f8df1e storage: Parse volume key 2013-12-05 09:17:12 -05:00
Cole Robinson 02f3546e02 testdriver: Add <filesystem> examples 2013-12-02 13:47:09 -05:00
Cole Robinson a9c42724cd tests: Limit recent clone changes to only very recent libvirt 2013-12-02 13:41:52 -05:00
Giuseppe Scrivano 941350b8ae tests: fix tests with latest libvirt from git
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-12-02 13:26:31 -05:00
Giuseppe Scrivano d3a6f1a537 virtinst: parse capabilities baselabel element
libvirt since version 1.1.4 shows the security context used to execute
the hypervisor process.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-11-18 09:05:22 +01:00
Giuseppe Scrivano a832d77559 virt-install: EGD RNG devs need a host to connect to if backend_mode=bind
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:32:06 +01:00
Giuseppe Scrivano 8248331d6c virtinst: allow EGD RNG devices to have both bind and connect sources
Remove backend_mode from VirtualRNGDevice and allow to directly specify
bind and connect sources.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:32:06 +01:00
Giuseppe Scrivano 2a040ccd17 mass update: remove double spaces from comments
Updated by this script:

find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\)  \(.*[^#]\)$|\1 \2|g" \{\} \;

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:31 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson 6673123185 nodedev: Parse PCI iommuGroup 2013-10-10 09:41:49 -04:00
Cole Robinson 56b9f6187b Streamline support checks
Just use one function check_support
2013-10-06 10:08:04 -04:00
Cole Robinson d4103eac26 virt-install: Add '--console none' and '--channel none'
For skipping the default channel and default console behavior
2013-10-06 09:43:56 -04:00
Cole Robinson 18fa751059 Add qemu-guest-agent channel automatically for supported OS 2013-10-06 09:19:59 -04:00
Cole Robinson f44ad5ae05 Default to virtio console for supported OS
This could cause issues for people trying unattended non-graphical
kickstart installs and expecting ttyS0 in the guest to be hooked
up to the default console. So to get back the default behavior, you
can do:

  --console pty
2013-10-06 08:53:05 -04:00
Cole Robinson 4911cb990e tests: Fix a rogue failure after last commits 2013-10-06 08:23:22 -04:00
Cole Robinson eede884554 guest: Set more involved clock defaults for qemu
The XML we use is:

  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>

Which translates to the qemu commands:

    -no-hpet -no-kvm-pit-reinjection -rtc driftfix=slew

The latter two bits are already used by openstack and gnome boxes by
default.

On RHEL hpet is compiled out so -no-hpet is the default,
but not everywhere else. Though recently the RH guys confirmed that
for regular usage it should be turned off because a) qemu support
is not that good, b) most users don't need it anyways c) it has
a performance penalty.

This default can be overridden from a virt-install command like

  --clock rtc_tickpolicy=delay

When Guest() sees that a timer has already been defined, it won't
set the new defaults, and that setting above is the old implied
default rtc setting.
2013-10-05 17:12:11 -04:00
Cole Robinson d0b067f2fc virt-install: Add --clock option 2013-10-05 16:48:07 -04:00
Cole Robinson a163f44a27 clock: Add timer parsing 2013-10-05 16:05:31 -04:00
Cole Robinson ff73f1119e details: If we know the channel target name, pretty list it 2013-10-05 14:04:49 -04:00
Cole Robinson 0366589812 Rip out all support for local RHEL6 version checks
These bits only apply if virt-manager is running directly on a RHEL6.
Since latest virt-manager can't do that thanks to GTK3 conversion,
just drop it all.
2013-10-05 13:57:55 -04:00
Cole Robinson a3493c8a50 testdriver: Add some <console> devices 2013-10-05 11:07:05 -04:00
Cole Robinson 20dfebeda3 clitest: Fix pylint, drop a few overkill tests 2013-10-05 10:22:11 -04:00
Cole Robinson e7e97a8088 domain: If title present, print only it
Forcing the name to be in the picture reduces the usefulness IMO
2013-10-04 11:50:19 -04:00
Cole Robinson 3756235a72 testdriver: Fix snapshot metadata 2013-10-04 08:54:31 -04:00
Fred A. Kemp 05254479db virt-install: Add --disk removable option 2013-10-04 07:57:13 -04:00
Fred A. Kemp bcd47d6471 virtinst: Expose disk/target/@removable 2013-10-04 07:57:13 -04:00
Cole Robinson d83b2c02fa virt-manager: Add USB3 convenience option to the controller UI
and a --controller usb3 option to virt-install
2013-10-03 16:34:28 -04:00
Giuseppe Scrivano 8e85840546 virt-install: allow to specify "startupPolicy" for --disk
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-03 16:51:23 +02:00
Giuseppe Scrivano f5a7476497 virtinst: expose disk/source startupPolicy attribute
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-03 16:49:49 +02:00
Cole Robinson 0bd2f97bda VirtualDisk: Try to append targets, not just use first free (bz #905439)
This used to happen:

- create VM with cdrom, cdrom gets hdc
- customize before install
- add new cdrom, gets target hda or hdb (first free target)
- new cdrom now has priority in the boot order

Change the logic to try to append targets first, and if there isn't
any space left, use the first free one. This may cause other issues
but we'll just have to wait and see.
2013-10-03 08:48:15 -04:00
Cole Robinson 5860b132dc tests: Add focused unit test for device numbering 2013-10-03 08:48:11 -04:00
Cole Robinson 0614e490c8 VirtualDisk: Don't try to force cdrom target=hdc
It was required a long long time ago, before qemu supported -drive
and possibly ancient xen. Nowadays it should be pointless, and contributes
to some issues like bz 905439
2013-10-02 20:31:57 -04:00
Cole Robinson cda621548b Fix last remnants of default_graphics=vnc 2013-10-02 18:51:27 -04:00
Cole Robinson c136fde04d cliconfig: Use default values if we're in the test suite
We were doing this by hand more or less, but this way is more future
proof.
2013-10-02 18:42:51 -04:00
Cole Robinson fb7868db19 Enable cache=None and io=native by default for block devices
This is where performance issues hit the most. This changes the
RHEL default to remove cache=None for all file volumes. If anyone
cares they can speak up, but it seems an overly unnecessary deviation
from upstream qemu.
2013-10-02 16:10:39 -04:00
Cole Robinson 8d59a7132b tests: Revive most disk=block checks
The patches to drop /dev/loop0 meant get_blkdisk was inaccurate and
we weren't testing many things that were intended. Use a block disk
from the test driver.
2013-10-02 16:05:43 -04:00
Cole Robinson 9c57c72eac Default to adding USB2 for new enough KVM
We enable this for virt-install as well. To avoid it, you can do either

--controller usb,model=none or --controller usb
2013-10-02 15:54:35 -04:00
Cole Robinson 868fbd9fc9 snapshots: Add screenshot support
Show a screenshot in the 'new snapshot' wizard. If we successfully create
that snapshot, save the screenshot in

~/.cache/virt-manager/$connuri/$vmuuid/snap-screenshot-$snapname.$ext

And show it in the snapshot details overview. We don't do any reaping
on snapshot delete, vm delete, etc, but that could be added later.
2013-10-01 10:14:51 -04:00
Cole Robinson 81c6beca03 Fix a test case after recent testdriver change 2013-10-01 10:14:46 -04:00
Cole Robinson dd823d2d8c cli: Don't log to debug files from the test suite
We shouldn't be doing it anyways, but my recent cache_dir change broke
a bunch of stuff without this.
2013-10-01 10:14:46 -04:00
Cole Robinson d44f863c2d details: Disable snapshot buttons if conn or guest doesn't have support 2013-09-30 20:33:42 -04:00
Cole Robinson 6043a88a0c snapshots: Add some specific UI for external snapshots
We sort them separately in the snapshot list, explicitly mention that
they are 'external', and add a UI field listing the memory/disk
details.

In general mixing internal and external snapshots is a recipe for
confusion and disaster, so I think the best thing to do is at least
acknowledge their presence in the UI but not make any attempt to
predict what will or will not work.
2013-09-30 19:55:21 -04:00
Cole Robinson 45e84d46ec snapshots: Make state type/icon UI match other usage 2013-09-30 17:12:24 -04:00
Cole Robinson 34c502560f storage: Drop unused static function
This allows us to simplify the parameters for find_free_name
2013-09-30 16:22:12 -04:00
Cole Robinson b3c5d123ca testdriver: Add bits for status, transient, managed save, snapshots
No unit tests for any of these, just for UI testing at the moment.
These require some non-upstream libvirt patches, but it doesn't
hurt in the interim while they are reviewed.
2013-09-30 14:30:25 -04:00
Cole Robinson 66f71262f0 clitest: Add case to verify collision check via backing store 2013-09-29 09:43:39 -04:00
Cole Robinson 40870dbcd8 tests: Add extra caching to speed up tests 2013-09-28 21:07:22 -04:00
Cole Robinson bc34df1dc7 storage: Parse volume backingstore 2013-09-28 19:21:58 -04:00
Cole Robinson 4822e6478f clitest: Don't fork rm for every test
Speeds up the tests quite a bit
2013-09-28 17:23:23 -04:00
Cole Robinson 4f59c24b40 tests: Add test_initrd_inject command
This is a standalone test like test_urls, and requires interraction. It
pulls down a bunch of kernels from public URL trees, inject known
kickstarts that induce quick failure. User inspects the output to
ensure initrd inject is working as expected.
2013-09-28 16:50:08 -04:00
Cole Robinson 5329a9afc9 virt-install: Add --tpm /dev/tpm convenience option 2013-09-28 10:28:04 -04:00
Cole Robinson eca87838fb virt-install: Add --features option
And hide docs about old --noacpi/--noacpi options. I don't think
anyone really uses them anyways, but if anyone complains we should
just implement --features for the other CLI commands.
2013-09-28 09:58:57 -04:00
Cole Robinson fd00ad74e2 devicehostdev: Drop device creation helper
Goes against other device paradigms, and is cleaner when we unwind it.
2013-09-27 18:28:28 -04:00
Cole Robinson a900ca14e3 domainfeatures: Fill out XML support 2013-09-27 15:35:27 -04:00
Cole Robinson 1212cf43a9 DomainFeatures: Drop __getitem__ helpers
They just complicate matters
2013-09-27 15:08:44 -04:00
Cole Robinson 186d33d8c5 Fix some pylint 2013-09-27 11:11:09 -04:00
Cole Robinson 90a610eaef tests: Fix REPLACEME image.py hack 2013-09-26 19:56:16 -04:00
Giuseppe Scrivano 153e485bb7 Fix some tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-26 19:41:40 -04:00
Cole Robinson 74a2ab5612 test_urls: Fix --path option 2013-09-26 18:32:50 -04:00
Cole Robinson d49e11dabc urlfetcher: Fix distro lookup short circuiting if os_variant specified 2013-09-26 17:45:02 -04:00
Cole Robinson 7aa24be31a urlfetcher: Detect debian, ubuntu, and opensuse variant from URL 2013-09-26 17:44:57 -04:00
Cole Robinson 1220d3082c test_urls: Fix SL6 test 2013-09-26 14:53:59 -04:00
Cole Robinson 7d02d508dd test_urls: Encode expected distro store in URL object 2013-09-26 14:40:52 -04:00
Cole Robinson c5f5d5ad9d urlfetcher: Clean up APIs for fetching URL media 2013-09-26 14:28:13 -04:00
Cole Robinson 655f458298 test_urls: Turn each URL test into an object, not a dict
Update the URL list and fix a couple bugs
2013-09-26 12:36:21 -04:00
Cole Robinson ff5b8d29e2 test_urls: Use multiple unittests, not a single big one 2013-09-26 11:49:16 -04:00
Giuseppe Scrivano 601eb5f15e virt-install: accept a single argument form for RNG devices
Detect the "--rng /dev/random" case and assume it is the "random" type.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-26 10:09:33 +02:00
Cole Robinson 15eac4de59 tests: Fix and update test_urls 2013-09-25 19:36:15 -04:00
Cole Robinson 382a24d08d Fix tests on f20, /dev/loop0 isn't available 2013-09-25 19:35:05 -04:00
Giuseppe Scrivano 0d03f972a3 virtinst: handle the guest "title" XML element
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-25 19:16:22 +02:00
Cole Robinson a2e5206730 deviceinterface: Fix creating direct interfaces (bz 1006324)
And take the opportunity to standarize on setting net.source,
rather than have API users have to do net.bridge/network/source_dev
2013-09-24 10:00:01 -04:00
Cole Robinson 9ec845af03 xmlbuilder: Unify make_xpath callbacks 2013-09-24 09:25:05 -04:00
Cole Robinson a660088768 cloner: Unset domain ID when cloning
This unbreaks the cli clone tests whenever a new guest is added to
the testdriver.xml
2013-09-23 21:27:54 -04:00
Cole Robinson 737016c0cf guest: Allow parsing domain ID 2013-09-23 21:27:42 -04:00
Cole Robinson d261299b5a testdriver: Add test-alternate-devs guest for alternate rng config 2013-09-23 19:59:42 -04:00
Cole Robinson 85813203dc createnet: Use virtinst.Network for XML generation 2013-09-23 13:49:20 -04:00
Cole Robinson 0323fcfbf7 network: Fix parsing route netmask 2013-09-23 09:10:43 -04:00
Cole Robinson b690557a53 Convert NodeDevice to XMLBuilder 2013-09-23 08:25:20 -04:00
Cole Robinson a7834f5d6c Add Network class for parsing <network> XML
Convert virtManager/host.py, do some cleanups and modernization to the
UI there, add tests.

createnet.py hasn't really been touched yet, but still works because
it was building the XML by hand anyways.
2013-09-22 11:16:07 -04:00
Giuseppe Scrivano a55438f880 virt-install: add support for virtio-rng devices
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-20 18:56:19 -04:00
Giuseppe Scrivano 8abcae5073 virtinst: add support for virtio-rng devices
The virtio-rng device is supported by libvirt since version 1.0.3.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-20 18:56:12 -04:00
Cole Robinson aff0ddb259 Use XMLBuilder for Storage object handling
Simplify the API a bunch while we are at it, add tests, etc.
2013-09-20 10:00:08 -04:00
Cole Robinson 3db5cb5f06 Use XMLBuilder for Interface XML
So we unify parsing and building the XML.

Since we already do this for vmmDomain, take the opportunity to move
the shared infrastructure into vmmLibvirtObject
2013-09-19 16:56:38 -04:00
Cole Robinson cb06f7eb3d xmlbuilder: Ensure top level XML objects always end with a newline 2013-09-19 13:48:28 -04:00
Cole Robinson eb4068cc47 xmlbuilder: Add infrastructure for parsing into subclasses
We already had this open coded in several classes with varying methods.
Now all someone has to do is

features = XMLChildProperty(CPUFeature)

The xmlbuilder code will pull the relevant xpath from the CPUFeature class,
handling parsing into instances of that class directly. The only
thing that needs to be manually added is the add_* remove_* functions.
2013-09-10 21:34:45 -04:00
Cole Robinson 10e608e9dd guest: Fix adding a parsed device to a built guest 2013-09-10 18:34:36 -04:00
Cole Robinson 97f641f645 tests: cli: Fix fallout from testdriver alterations 2013-09-10 18:34:36 -04:00
Cole Robinson 2e4685590f testdriver: Drop test-many-nets
It doesn't even have as many nets as test-many-devices
2013-09-09 11:38:14 -04:00
Cole Robinson 67cc81f6b1 virt-install: Add --boot useserial=on
Which gives bios output over serial console via sgabios
2013-09-04 11:57:26 -04:00
Martin Kletzander 70fae14635 Automatically add multifunction address parameter when needed
Also check for use of duplicate addresses before passing such XML to
libvirt.  And fix tests (of course).
2013-09-03 08:08:06 +02:00
Daniel Gollub 1730a8e5ff virtinst: add nwfilter support
This allows to make use of libvirt network filtering support with virt-install.
With the additional option "filterref" in the --network parameter one can
configure any defined nwfilter per network interface, i.e.:
virt-install ... --network network=mynet,model=virtio,filterref=clean-traffic

(crobinso: add an xmlparse test case)
2013-08-29 11:44:40 -04:00
Cole Robinson 9d11c7eae3 virtinst: Add DomainSnapshot object and some plumbing
Just for parsing domainsnapshot XML and performing some support checks
2013-08-21 18:26:27 -04:00
Cole Robinson e52f6050fa qemu ARM support: wire up virtio, fix a bunch of defaults
This has some fallout on non-x86 tests which were wrong to begin with.
There's still some missing bits but this is the jist of it.
2013-08-18 12:30:58 -04:00
Cole Robinson 8c6149d3f3 tests: Add recent libvirt capabilities, share URIs better 2013-08-18 08:39:51 -04:00
Cole Robinson 414f6bbd99 guest: Use virtio on plain qemu on x86
It's been available for a long long time, and unifies code paths.
2013-08-17 18:00:31 -04:00
Cole Robinson 3130f64e35 VirtualDisk: Add is_disk, is_cdrom, is_floppy helpers 2013-08-17 14:21:30 -04:00
Cole Robinson c2a4ca66e9 clitest: Add infrastructure for skipping tests based on support checks 2013-08-17 13:50:36 -04:00
Cole Robinson aa2e105f2b clitest: Simplify test register boilerplate a bit 2013-08-17 09:44:11 -04:00
Cole Robinson 71a25c267b clitest: Drop some useless tests 2013-08-17 09:36:03 -04:00
Cole Robinson e02fa9b4fe virt-install: Add --boot dtb=DTB support
Allows passing in a device tree binary to the guest. Needed for
some non-x86 configurations.
2013-08-16 19:25:26 -04:00
Cole Robinson cc75bc9311 guest: Remove needless functions
And simplify some test infrastructure as a result
2013-08-14 19:43:02 -04:00
Cole Robinson 81ce0a1085 osdict: Clean up 'default' handling usage
- Unify looking up osdict values
- Have Guest.py pass in its defaults, not encoding them in osdict
- Explicitly specify every device parameter that osdict handles, rather
    than have some psuedo magic dictionary format to handle it
2013-08-12 13:31:47 -04:00
Cole Robinson c426d5a16f Guest: Drop os_type, just use single os_variant
Internally the distinction hasn't been valuable for a long time,
so simplify the API here.
2013-08-11 12:39:36 -04:00
Cole Robinson 3e158b80bf guest: Move cpuset static functions to DomainNumatune 2013-08-11 12:39:28 -04:00
Cole Robinson 87789548ba guest: Drop consolecb and wait parameters from start_install 2013-08-11 12:39:28 -04:00
Cole Robinson 952708f509 virtinst: Rename most files to be more sensible
- Lower case everything
- Virtual... -> device...
- A few other similar bits
2013-08-09 08:54:39 -04:00
Cole Robinson 01629d3f2c virtinst: Combine ImageInstaller and ImageParser code
They aren't touched much these days, so unify the files for clarity.
2013-08-08 21:00:37 -04:00
Cole Robinson accff84ecc virtinst: Fix import ordering to standardize on relative imports
Kind of annoying that some imports were directly from files while
some were from the __init__.py convenience bits.
2013-08-08 20:49:50 -04:00
Cole Robinson 68ddb9d885 capabilities: Drop workarounds for long gone libvirt bugs
These were both fixed 4-5 years ago
2013-08-08 19:41:39 -04:00
Cole Robinson 623edd1a84 tests: Clean up cli imports even if --skipcli passed 2013-08-06 14:58:43 -04:00
Giuseppe Scrivano 4f63458050 tests: move the storage pool under /dev.
The commit efab27afbf02743a3a2582e9a111eb1b7d985b26 in libvirt uses
/dev/%s for logical pools, change the tests to accommodate it.

(crobinso: additional fix to work with older libvirt)
2013-07-29 10:01:18 -04:00
Cole Robinson 7616077ebf testdriver: Drop iscsi <auth>, tough to support with old and new libvirt 2013-07-29 09:41:44 -04:00
Cole Robinson 03bd6f024e xmlbuilder: Fix setting float value for is_int 2013-07-25 15:31:40 -04:00
Cole Robinson 695c4b7189 VirtualDisk: Make the driver/type auto changes opt-in
It was hard to get this right, so just require that any API users
which are changing the path of an existing disk call sync_path_props()
2013-07-25 15:04:47 -04:00
Cole Robinson bba3c93508 xmlbuilder: Always keep around an xml node, even if building from scratch
This further unifies the 'parse existing' vs. 'build new' case.
2013-07-25 10:59:23 -04:00
Cole Robinson 7a369a9802 xmlbuilder: Drop is_multi option
It complicates things quite a bit. And there's only one user, so just open
code it.
2013-07-24 12:36:44 -04:00