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.
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.
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>
Remove some "Memory Backing" parameters from --memory,
and keep 'hugepages' for backward compatibility.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
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>
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>
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.
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.
Updated by this script:
find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\) \(.*[^#]\)$|\1 \2|g" \{\} \;
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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
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.
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.
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.
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.