Commit Graph

999 Commits

Author SHA1 Message Date
Cole Robinson
617b92710f osdict: Don't return virtio1.0-net as a valid device name (bug 1399083)
We can't depend on libosinfo device names being valid libvirt network
model names, so use a whitelist

https://bugzilla.redhat.com/show_bug.cgi?id=1399083
2016-12-13 12:58:14 -05:00
Cole Robinson
435de2d40c pylint: Fix some issues with F25 version 2016-12-13 12:36:49 -05:00
Marc-André Lureau
ee6a60a9b9 virtinst: error out if spice+gl is not supported
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-11-14 09:55:43 +01:00
Marc-André Lureau
b4858842f9 virtinst: fix bad version check regression from 55327c81b7
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-11-14 09:03:30 +01:00
Guido Günther
a26c656d5c osdict: Debian8 onwards has qemu-ga 2016-10-31 09:07:33 -04:00
Chen Hanxiao
e77c98ae1b virtinst: fix a typo
s/appened/appended

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2016-10-25 23:35:47 +08:00
Charles Arnold
a3206f89c8 virtinst: Add the --sysinfo option
Allow passing SMBios information to the guest using the new sysinfo
option. Also update the appropriate files with test cases.
2016-09-08 11:36:59 -04:00
Charles Arnold
b31c0b442e virtinst: Add classes for defining SMBios information
This includes adding an smbios sub-element to the guest os element and a
sysinfo sub-element to the guest. The sysinfo sub-element contains the SMBios
specific data.
2016-09-08 11:36:59 -04:00
Chen Hanxiao
c859d39428 virt-install: introduce vhostuser interface
Add support to interface type 'vhostuser' by:

--network vhostuser,source_type=unix,source_path=/tmp/vhost1.sock,source_mode=server,model=virtio

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2016-09-02 18:58:47 -04:00
Cole Robinson
c84c2cfd58 devicechar: Support source_master and source_slave
Needed for type=nvdm for *bsd

https://bugzilla.redhat.com/show_bug.cgi?id=1369803
2016-08-24 16:37:36 -04:00
Cole Robinson
4c759ad23d util: Move default_* network bits to deviceinterface 2016-08-24 16:14:33 -04:00
Cole Robinson
927be95b95 util: default_route: Handle lack of /proc/net/route
Which doesn't exist on freebsd for example

https://bugzilla.redhat.com/show_bug.cgi?id=1369803
2016-08-24 16:00:46 -04:00
Cole Robinson
eb2a56f700 util: Move xml_indent to XMLBuilder 2016-08-24 15:56:13 -04:00
Cole Robinson
5dea1c2d80 util: privatize stat_disk() 2016-08-24 15:56:13 -04:00
Cole Robinson
49ad2df0cb util: Remove some unused functions 2016-08-24 15:37:34 -04:00
Cole Robinson
3f15a489cd urlfetcher: Fix ubuntu --location $iso arch detection
Reported here:
http://www.redhat.com/archives/virt-tools-list/2016-August/msg00009.html
2016-08-16 19:37:02 -04:00
Manjunath A Kumatagi
cd35470e3c Update initrd and kernel path for ppc64le platform.
In CentOS 7 ppc64le platform initrd and kernel files are present under ppc/ppc64 folder. Currently GenericDistro module will find only under images/pxeboot folder. So to support custom boot the CentOS 7 ppc64le platform I've added the code to search under ppc/ppc64 folder as well.
2016-08-16 18:52:20 -04:00
Cole Robinson
f55772845a osdict: Remove some pylint 2016-08-09 11:53:44 -04:00
Tristan Helmich
27703ca379 storage: Enable creation of zfs storave volumes 2016-08-09 11:48:34 -04:00
Cole Robinson
1d2cd30677 osdict: Fix incorrect usage of virtio input
Regression reported with latest libosinfo, when the OS reports
virtio-input support:

http://www.redhat.com/archives/virt-tools-list/2016-July/msg00109.html

Really our code presently only cares about the USB tablet, so adjust
our libosinfo lookup to explicitly check for it
2016-07-29 13:17:36 -04:00
Pavel Hrdina
9cdf78e94c translation: fix usage of translate function
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-07-26 09:34:20 +02:00
Cole Robinson
4727b31e61 cli: Ignore virt-viewer checks in test suite
Otherwise we can end up hanging with the default --wait behavior
2016-07-20 18:14:37 -04:00
Cole Robinson
d70fccd296 cli: Add helper for checking if we are in the test suite 2016-07-20 18:14:37 -04:00
Cole Robinson
322d212516 cli: Add --serial log.file= and log.append=
And for other character devices --console, --parallel, --channel
2016-07-18 15:04:40 -04:00
Cole Robinson
b08647c2f2 xmlbuilder: Handle setting conditional xpaths correctly
So if xml=<foo> and xpath=./bar[@baz='foo'] and val=XXX, xmlbuilder
previously would generate XML

  <foo>
    <bar>XXX</bar>
  </foo>

But now generates the expected

  <foo>
    <bar baz='foo'/>XXX</bar>
  </foo>

No users yet, but they are incoming
2016-07-18 14:46:50 -04:00
Cole Robinson
835ddc5f77 xmlbuilder: More comments for _build_xpath_node 2016-07-18 14:46:50 -04:00
Cole Robinson
a931a1a6ad xmlbuilder: Opencode single addnode= usage 2016-07-18 14:46:50 -04:00
Cole Robinson
559e813b96 xmlbuilder: Clarify the node 'pretty' helper function 2016-07-18 14:46:50 -04:00
Cole Robinson
d8a0a78805 xmlbuilder: Update XMLProperty docs 2016-07-18 14:46:50 -04:00
Pavel Hrdina
023a55cb39 deviceinterface: disallow using source dev for ethernet interface
Device <interface type='ethernet'/> doesn't support <source dev=''/> attribute
and we should ignore it the same way as we do for <interface type='user'/>.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-07-08 18:02:07 +02:00
Cole Robinson
c5ce0ab512 connection: Fix transport detection for qemu://$HOST/system
In this case, when a host is specified but not a transport, libvirt
defaults to transport=tls
2016-06-21 11:31:26 -04:00
Cole Robinson
40e0354631 guest: Fix multiple address.type=pci auto allocate requests
And test it for aarch64, which is the only place it's really
interesting at the moment
2016-06-17 17:17:49 -04:00
Richard W.M. Jones
246e3c9c59 virtinst: Add --transient flag.
If this flag is specified, --import|--boot will create a transient
libvirt domain, ie. one which goes away when the guest shuts down or
the host is rebooted.

(crobinso: some tweaks and tests)
2016-06-17 12:20:24 -04:00
Cole Robinson
116fabb37a virt-install: Access domain in place via guest.domain
And stop returning the domain object from Guest.start_install, it's
redundant
2016-06-17 12:13:21 -04:00
Cole Robinson
0e8d4007cf tests: Add some virt-install autoconsole tests 2016-06-17 12:13:21 -04:00
Cole Robinson
59edd87e9f guest: Rename noboot -> doboot
It's a bit easier to follow the logic IMO
2016-06-17 12:13:21 -04:00
Cole Robinson
b5d0b381ba guest: Rename start_xml -> install_xml
Make it more clear what the case is
2016-06-17 12:13:21 -04:00
Cole Robinson
837a9710a3 guest: Use newer named CreateXML API
CreateLinux is the very old style name. CreateXML has been around
since at least 2009, which covers our minimum libvirt-python version
2016-06-17 08:58:28 -04:00
Cole Robinson
48ba2883e5 virtinst: break out kernel/initrd vol upload to its own file 2016-06-17 07:52:42 -04:00
Cole Robinson
dbb057d095 virtinst: Move initrdinject handling to its own file 2016-06-17 07:52:42 -04:00
Cole Robinson
9f297eda5b virtinst: guest: drop 'continue_install' concept
continue_install is intended to facilitate windows XP style 3 stage
installs:

  stage 1: initial dos style disk setup, reboot
  stage 2: actual full installer, reboot
  stage 3: OS is functional, virt-install is done

The code assumed that we needed to keep the cdrom as the primary
boot device for the second stage, so virt-install/virt-manager needed
to hang around through the second stage run, wait until the VM shutdown,
then encode the final XML to boot of the disk.

Windows is and always has been smart enough to handle that case though...
after the initial boot, if we set the hd as the primary boot device
for stage 2, the disk bits that windows already installed will make
use of the cdrom as necessary. So the entire premise of continue_install
is irrelevant. Maybe back when it was added, when xen didn't even have
working ACPI support, this served a purpose, but I'm pretty sure we
can safely drop it nowadays.
2016-06-17 07:52:42 -04:00
Cole Robinson
5398282e12 storage: Detect backing_store format automatically
By attempting to manage/import the passed path. This makes it
work via both virt-install and virt-manager

https://bugzilla.redhat.com/show_bug.cgi?id=1235406
2016-06-16 20:36:30 -04:00
Cole Robinson
8d4e58c501 cli: Add --disk backing_format= option 2016-06-16 20:09:37 -04:00
Pavel Hrdina
de9cd87fda virtinst.capabilities: return recommended machine for XEN
This is required in order to ask for correct domcapabilities.  If you don't
specify any machine libvirt will return domcapabilities for default machine
which is xenpv.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-16 12:16:49 +02:00
Pavel Hrdina
86e11786b5 maint: update all libvirt checks for version from 1.3.6 to 2.0.0
There want be 1.3.6 version, libvirt switched to new release numbering, for more
information see <http://libvirt.org/downloads.html#numbering>.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-15 12:05:11 +02:00
Cole Robinson
19b4cf026e cli: Support --cpu cellX.id (and cpus, and memory)
This allows configuring <cpu><numa><cell> bits via the command line.
This uses the optional numbering scheme described in the previous
commit.
2016-06-14 19:07:55 -04:00
Cole Robinson
b785f3f594 cli: Support --disk seclabelX.model (and relabel, and label)
This adds support for setting VirtualDisk <seclabel> XML. This
invents a new command line scheme for cases like this where there
are possibly multiple child elements that we want to specify
on the command line. So if you just want to specify one <seclabel>
block, you can do the expected

  --disk ...,seclabel.model=dac,relabel=no

However if you want to specify 2 <seclabel> blocks you need to do:

  --disk ...,seclabel0.model=dac,seclabel0.relabel=no,seclabel1.model=selinux,seclabel1.relabel=no
2016-06-14 19:05:30 -04:00
Cole Robinson
7ec97400a5 cli: Only instantiate VirtCLIArguments at parse time
We register the VirtCLIArgument classes with the static parse
instructions, but instantiate it with the actual key=val pair
from the command line. This fixes some layering violations, and
gives callers access to the actual command line key that we
are parsing, if that's interesting.
2016-06-14 16:26:56 -04:00
Cole Robinson
dc49d46f62 cli: Separate out can_comma handling
Clarify things by taking it out of the main parse loop
2016-06-14 14:08:50 -04:00
Cole Robinson
8532dacde0 cli: Pass virtarg and parser to setter callback
This should provide access to every bit of info we could possibly
want from the setter callbacks
2016-06-14 13:54:17 -04:00