Commit Graph

266 Commits

Author SHA1 Message Date
Cole Robinson
9dd0900b7d guest: Add default console device for xenpv
Libvirt already adds one so this is kinda redundant, but it makes
things clearer in the virt-manager 'customize' UI at least.
2015-09-22 12:41:57 -04:00
Cole Robinson
85307b9bd2 devicefilesystem: Default to accessmode=mapped for qemu
libvirt qemu default's to accessmode=passthrough, which really only
works correctly when qemu is run as root, which isn't common for libvirt
nowadays. So use accessmode=mapped which has a better chance of working
2015-09-20 20:33:46 -04:00
Cole Robinson
6a9f0089b9 devicefilesystem: Rename mode->accessmode
To reflect the name in the XML
2015-09-20 20:16:21 -04:00
Cole Robinson
68962f48f7 virtinst: Support multiple seclabels
libvirt has supported this for a while. Wire it all up through the
cli, and fix some bad assumptions along the way.
2015-09-05 13:49:36 -04:00
Cole Robinson
7786c4b35b xmlbuilder: Make clear() work for child objects
So we can call clear() on a Guest owned VirtualDisk, and it actually
does the correct thing. This allows us to enable clearxml= cli option
for most devices.
2015-09-05 13:16:35 -04:00
Cole Robinson
5e68b0fc3d guest: Don't try to set vmport on non-x86, it isn't supported (bz 1259998) 2015-09-04 12:14:22 -04:00
Daniel P. Berrange
d6ea493d1b virtinst: support virtual port parameters for non-802.1Qbg NICs
Previous commit added support for virtual port profiles
on NICs, but only defined the attributes needed by the
802.1Qbg NIC type.

  commit 34e2ca8389
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Fri Jan 31 16:51:02 2014 -0500

    cli: --network: Wire up virtualport options

This commit adds the profileid and interfaceid parameters
needed by 801.Qbh, openvswitch and midonet

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-08-28 12:40:18 +01:00
Cole Robinson
6279c3a3d8 tests: Add clitest for USB duplicate checking 2015-08-10 15:01:03 -04:00
Cole Robinson
82ea5bfc62 tests: Add qemu:///session unit tests 2015-08-10 12:46:47 -04:00
Pavel Hrdina
1590490fa3 capabilities: detect ACPI and APIC capabilites properly
Instead of hard-coding that ACPI and APIC are enabled by default, detect
their presence from libvirt capabilities and use it.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1215692

(crobinso: Adjust for recently added test case)

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:26:42 -04:00
Pavel Hrdina
3ff35898a4 refactor detection of guest type capabilities
Each guest type can have its own capabilities and we should always ask
only for those capabilities.

The old approach was to get capabilities from libvirt and then for
example cycle trough all guests and return True, if any guest type
supports kvm or pae, etc.

Now we check those capabilities only for the correct guest type
according to defaults and input from user.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:11:40 -04:00
Kevin Zhao
8dbe96fc01 virt-manager : add support for architecture type "s390x".
For architecture "s390x",the disk and the network device are base
on "virtio" bus.The cdrom is based on "scsi".So set the default
cdrom bus as "scsi",the default bus as "virtio".Also the default
machine type is set to "s390-ccw-virtio" as it is the only supported
in "s390x".Also add a test cast of virt-install by cdrom in s390x.

(crobinso: Tweak test suite and minor formatting stuff)
2015-07-14 12:45:32 -04:00
Cole Robinson
b82b739d5a tests: Fix output to work the same with libvirt <console> change
See this thread for the original patches:

https://www.redhat.com/archives/virt-tools-list/2015-June/msg00091.html

But this fix is nicer since it will work before those libvirt changes as
well.
2015-06-08 17:41:16 -04:00
Chen Hanxiao
24302dfdfd tests: fix test cases failed by 'vmport'
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-05-11 04:55:14 -04:00
Marc-André Lureau
e2184ea2cf tests: add some vmport tests
Message-Id: <1428012248-5767-6-git-send-email-marcandre.lureau@gmail.com>
2015-05-04 12:40:14 -04:00
Cole Robinson
33cfe883c6 guest: arm kvm should use host-passthrough, not model=host
Seems to work with libvirt, not sure if it was ever broken as the comment
suggested.
2015-04-23 10:14:58 -04:00
Cole Robinson
bbb048cbd0 clitest: Add KVM tests for aarch64, armv7, ppc64le 2015-04-22 20:28:47 -04:00
Cole Robinson
6fd3983f6d tests: Clean up capabilities test data
Make it clear which ones are used for the caps unit tests, and which
are for cli/UI testing and can be updated at will. And drop a bunch
of outdated stuff.
2015-04-22 19:05:06 -04:00
Cole Robinson
8a3e3391c8 clitest: Drop explicit fake.iso filename
Just use one of the other files we stub out
2015-04-22 18:00:00 -04:00
Cole Robinson
d4bf3b58a0 clitest: Drop prompttest infrastructure
Just fake it for the one remaining test
2015-04-22 18:00:00 -04:00
Cole Robinson
ccc0da3e51 tests: Add specific VM for virtxml tests
Decouple it from test-many-devices which is really about manual testing
of virt-manager UI. It's annoying that every time test-many-devices is
extended we need to regenerate all the virtxml tests.
2015-04-21 19:50:41 -04:00
Cole Robinson
0f3d86ac9e guest: Disable PM for virt-install as well
We are just mirroring the behavior that virt-manager (and boxes) have
used for a while now.

In my experience the average user is confused by their VMs suspending,
so for our sake I'd rather make people opt into this feature.
2015-04-11 18:02:45 -04:00
Cole Robinson
a2c7d62ec4 guest: Disable spice image compression for local VMs
The image compression setting has a noticably detrimental effect on
spice graphics quality. It's meant to be used for spice VDI but the
vast majority of people don't use spice in a way that makes bandwidth
usage matter.

Boxes has already done this for a while as well:

https://mail.gnome.org/archives/commits-list/2013-March/msg14904.html

Turn it off by default if creating the VM on a local connection.
2015-04-11 17:53:17 -04:00
Cole Robinson
20d37422fe virt-install: Fill in a bunch of --graphics spice options (bz 1110017) 2015-04-11 16:56:27 -04:00
Cole Robinson
9a789c19e2 virt-install: Support --hostdev scsi passthrough (bz 1054912)
Pass it a type=scsi nodedev name, and we will set things up correctly.
2015-04-11 15:55:09 -04:00
Chen Hanxiao
06c05ca078 test: fix a testcase
commit 92c42bc5a0
breaks testsuit.
Fix it.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-04-09 22:44:50 -04:00
Cole Robinson
527c49dec2 virt-install: Add --input option
For configuring VM <input> devices
2015-04-09 13:22:40 -04:00
Cole Robinson
a5d03fdf6e guest: Don't unconditionally overwrite on_poweroff/on_crash 2015-04-07 19:53:15 -04:00
Cole Robinson
e29f216503 guest: Use sata by default for q35 cdrom, non-virtio (bz #1207834) 2015-04-06 13:43:18 -04:00
Cole Robinson
3a36d95da0 details: Explicitly label virtio scsi disks + controllers 2015-04-04 20:06:40 -04:00
Cole Robinson
cfe9e7dc7e virt-install: Make '--cpu none' work with aarch64 2015-03-23 17:46:09 -04:00
Cole Robinson
c7c772b200 virt-install: Default to --boot uefi
Try to use --boot uefi if the user hasn't already specified loader params,
or a kernel to boot. If we can't determine a UEFI setup, just print a
warning.
2015-02-22 10:25:51 -05:00
Cole Robinson
a04307cd70 virt-install: Add --boot uefi
Will enable UEFI if we know libvirt + hypervisor support it, and libvirt
is advertising a suitable UEFI binary.
2015-02-22 10:25:47 -05:00
Anatoly Belikov
e44b95149b devicedisk: fix source name attribute for gluster volumes
(crobinso: Small code tweak, and add test cases)
2015-01-29 11:31:43 -05:00
Giuseppe Scrivano
dc169c1406 tests: check that HYPER-V is not enabled on win7 guest with UEFI
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-01-27 20:52:06 +01:00
Cole Robinson
5018233f63 tests: Test --channel none 2015-01-09 10:52:59 -05:00
Cole Robinson
aa772f01e1 guest: Prefer virtio-scsi for arm mach-virt
Since it gives us disk hotplug, and CDROM devices, etc.

This requires fairly recent patches to UEFI/OVMF/AAVMF
2014-12-17 15:23:05 -05:00
Chen Hanxiao
5d0c68cc0c clitest: replace DIR from current pwd to '/var'
Introduced by f16dc4dd34
This will cause test case failure on different machines.
Use '/var' to replace it.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-12-12 10:05:40 +08:00
Cole Robinson
9ae3dbe05b virt-install: Fix --disk pool=NETPOOL,size=... creation 2014-12-10 13:22:42 -05:00
Cole Robinson
cb124bccbd testdriver: Add more gluster examples 2014-12-10 13:22:42 -05:00
Cole Robinson
117cbfe12f devicedisk: Don't set driver name=unknown for rbd vols 2014-12-10 13:22:42 -05:00
Cole Robinson
f16dc4dd34 tests: clitest: Lots of house cleaning
Drop redundant tests, organize things better, add more tests where we
can stick new cli device options and view the output, since that's the
most common extension.
2014-12-10 13:22:42 -05:00
Cole Robinson
464ebabc5a virt-install: Wire up --disk vol= for network volumes
This involves convering pool/vol XML to disk source bits
2014-12-09 18:23:22 -05:00
Cole Robinson
838d7f015c tests: Drop a bunch of redundant xmlconfig tests
These are mostly covered by clitests. Keep the important ones around
for code coverage.
2014-12-09 13:19:56 -05:00
Cole Robinson
9952764dda virt-install: Make --disk $URL 'just work'
If VirtualDisk.path is set to a URL, parse it and fill in all the
source_* values automagically.
2014-12-09 10:45:26 -05:00
Cole Robinson
cd305da3f8 virt-install: support network --disk's
Handle type=network in devicedisk.py, and wire up all the network fields
for virt-install --disk. Right now it requires manually spelling out
all the protocol, name, host/port etc fields.

The one 'magic' bit is that VirtualDisk.path will be a pretty URL when
all those network fields are specified. This is keeps things mostly
working in various parts of the code where we expect 'path' to be an
identifier for a VirtualDisk.
2014-12-06 21:00:51 -05:00
Cole Robinson
86682c8c54 virt-install: Support --disk source_pool,source_volume
For setting type=volume disks. This requires some reworking of
devicedisk bits
2014-12-06 17:14:16 -05:00
Cole Robinson
7e7b1bdd4e tests: Order disks in same order libvirt shows them 2014-12-06 16:43:53 -05:00
Cole Robinson
7b8e850bc0 clitest: Sanitize diff output some more 2014-12-06 16:32:10 -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
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
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
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
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
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
6a8194ebc7 docs: Document virtio-scsi better, and add explicit test cases for it 2014-09-20 15:03:19 -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
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
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
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
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
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
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
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
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
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
b49f647e0c details: Fix unsetting autoport values 2014-03-22 18:29:08 -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
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
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
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
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
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
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
8917445e32 Fix tests with latest libvirt 2014-02-03 16:08:34 -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
6638587077 clitest: Don't needlessly deviate default_bridge from test infra 2014-02-01 14:19:37 -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
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
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
110d6aac83 virt-xml: Add --build-xml option for just outputing XML 2014-01-25 20:30:08 -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
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
748ff1c4cc virt-xml: Initial commit, basic set of tests 2014-01-25 17:20:29 -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
Cole Robinson
f02b85d913 guest: Don't add qemu-ga on ARM where virtio slots are limited 2014-01-12 14:58:43 -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
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
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
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
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
81c6beca03 Fix a test case after recent testdriver change 2013-10-01 10:14:46 -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
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
97f641f645 tests: cli: Fix fallout from testdriver alterations 2013-09-10 18:34:36 -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
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
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
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
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