Commit Graph

70 Commits

Author SHA1 Message Date
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 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 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
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 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
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 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 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
Cole Robinson 19a72a4881 support: Remove negative version handling
We can do it in other ways
2014-02-10 16:14:39 -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 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 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 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 0654784643 virt-install: Add --pm option 2014-02-03 11:11:38 -05:00
Cole Robinson 57e89cda8b virt-xml: Create storage if necessary 2014-01-26 13:09:26 -05:00
Cole Robinson a82b60dcff capabilities: Remove some public API back compat 2014-01-18 13:23:30 -05:00
Cole Robinson e151146cad cloner: Don't validate new clone name (bz 1054771)
Our validation check might not be up to date, WRT what characters are
acceptable. So if we try to --auto-clone an existing valid VM with
some characters we aren't expecting, we cause ourselves to error.

Just skip the validation and let libvirt complain if something is wrong.
2014-01-17 18:44:26 -05:00
Cole Robinson d040bf3573 Drop the len <= 50 validation check for domain names
Just let libvirt error out, since we have no idea if this is still
relevant.
2014-01-17 18:42:15 -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 c9680b34a1 ppc64 pseries guests use vga graphics, not qxl (bz 1034693) 2013-12-18 16:17:01 -05:00
Cole Robinson 8dcb65bd50 create: Fix default qemu-ga setup (bz 1016613)
We were adding default devices before setting the OS value, which qemu_ga
setup depends on.
2013-11-09 18:52:05 -05:00
Cole Robinson eb33bd34e7 Misc improvements to some debug messages 2013-11-09 18:17:29 -05: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
Cole Robinson 3f532fe263 VirtualDisk: Handle the blktap default
And cache the blktap lookup once for the localhost
2013-10-06 13:17:35 -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 dae3678d26 guest: Absorb more default device checks 2013-10-06 08:30:33 -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 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 18d8512699 Move the 'default graphics type' logic into Guest
So we can share it, and make virt-install more robust
2013-10-02 18:06:52 -04:00
Cole Robinson a2cbb9f500 support: s/CONN_HV/CONN/g
We don't need to distinguish these days.
2013-10-02 16:41:23 -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 1212cf43a9 DomainFeatures: Drop __getitem__ helpers
They just complicate matters
2013-09-27 15:08:44 -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 737016c0cf guest: Allow parsing domain ID 2013-09-23 21:27:42 -04:00
Cole Robinson a23f1794d0 guest stuff 2013-09-20 10:55:48 -04:00
Cole Robinson 99a50de53e Simplify XMLProperty declarations 2013-09-19 13:31:33 -04:00
Cole Robinson 0be727e6bb xmlbuilder: Track singleton child properties explicitly
Things like Guest.Seclabel, VirtualDevice.VirtualAlias, etc.

Now we don't need to track a full xpath with each class, just its root
name and we build its hierarchy depending on its parent.
2013-09-19 13:31:33 -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