Commit Graph

284 Commits

Author SHA1 Message Date
Pavel Hrdina a2985f07e6 virtinst: add support for memory device
This is the actual memory device that is used to hot(un)plug memory
to(from) a guest.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-05-05 12:20:52 +02:00
Pavel Hrdina 3ebbeef80e virtinst: introduce support for <maxMemory> element
This element controls hot(un)plugable memory for the guest in
addition to the initial memory configured by <memory> element.

One has to configure <maxMemory> and guest numa nodes using <numa>
element to enable hot(un)plug of memory modules.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-05-05 11:49:27 +02:00
Cole Robinson 7aee124d9a cli: Don't double warn when skipping disk size warning (bz 1433239) 2017-04-27 12:19:53 -04:00
Venkat Datta N H 66435cb03d virt-install:support --features hyperv_synic=(on/off) 2017-03-30 14:19:06 -04:00
venkat 935c93812f virt-install: support --features hyperv_reset=(on/off) 2017-03-27 17:50:35 -04:00
Cole Robinson d62e975568 guest: Add default virtio-rng /dev/urandom (bz 1212082)
For guests that support it, per libosinfo, and new enough libvirt
to handle /dev/urandom. See the bug for discussion

https://bugzilla.redhat.com/show_bug.cgi?id=1212082
2017-03-08 17:26:19 -05:00
Cole Robinson dff27a298e cli: Default to ignoring 'none' strings
If the parsed option string is just 'none', make it a no-op.
This helps us be backwards compatible: for example, --rng none is
a no-op, but one day we decide to add an rng device by default to
certain VMs, and --rng none is extended to handle that. --rng none
can be added to users command lines and it will give the expected
results regardless of the virt-install version.

Options that already have special 'none' handling need to opt out
of the default behavior.
2017-03-08 17:05:36 -05:00
Cole Robinson 191896d0dc cli: Add --qemu-commandline option 2017-03-06 22:15:46 -05:00
Cole Robinson d056508d71 cli: --sysinfo: Set type=smbios by default
Libvirt requires it, so don't force users to manually specify it if
they pass any other --sysinfo params.
2017-03-05 21:18:26 -05:00
Cole Robinson 7a8f756a42 sysinfo: Validate in shared code, not at cli parse time 2017-03-05 20:55:21 -05:00
Cole Robinson 1757e394bb virt-install: Support --video vram64= (bz 1377080) 2017-03-05 14:51:25 -05:00
Cole Robinson d31e933f24 virt-install: support --network trustGuestRxFilters= (bz 1427600) 2017-03-05 14:43:31 -05:00
Marc-André Lureau dffb2aaa2d virtinst/cli: add spice rendernode argument
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 18:31:43 -05:00
Pavel Hrdina b1c0a1c2d9 virtinst/cli: set default value for disk sparse to "yes"
Commit 41a84bae9 reworked CLI parsing, but lost the default value disk
sparse option.  Man page also states that the default value is "yes".

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-17 12:54:12 +01: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
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 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 0e8d4007cf tests: Add some virt-install autoconsole tests 2016-06-17 12:13:21 -04:00
Cole Robinson 8d4e58c501 cli: Add --disk backing_format= option 2016-06-16 20:09:37 -04: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
Cole Robinson 984b368725 cli: Rework VirtCLIParser instantiation
Only initialize VirtCLIParser at actual parse time. The data that's
passed to __init__ is the particular data for that parse task, like
the option string, and the Guest object we are editing.

As a result we can drop the whole parsermap handling, since the
parserlist is immutable.

There's a bunch of other reworks mixed in like dropping the
VirtOptionString abstraction...
2016-06-14 10:51:50 -04:00
Cole Robinson 8a0fd7927f cli: Improve comments for _VirtCLIArgument 2016-06-14 07:38:59 -04:00
Cole Robinson 3ce5af712b cli: Drop unused VirtCLIParser.option_variable_name 2016-06-13 19:15:35 -04:00
Cole Robinson 7018904959 cli: Move introspection checking out of Parser class
We can do that at the cli entry point, and only have the parser
print its subargs
2016-06-13 19:15:19 -04:00
Cole Robinson 7cd04a9f86 cli: Register VirtCLIArguments at class definition time
The VirtCLIArguments, (for example, path=, size=, etc. for --disk)
are only registered when a VirtCLIParser is actually initialized.
This seems backwards, since those arguments are really more immutable
factors of the actual command line parsing, so make more sense only
initializing them once, at class definition time.

This switches to use that pattern. This makes the parsing flow a bit
cleaner and can be a basis for future improvements.
2016-06-13 18:37:30 -04:00
Cole Robinson 4db0cd2eab cli: Tweak clearxml argument setup
Just unnest the callback to make it a little easier to follow
2016-06-13 18:37:30 -04:00
Cole Robinson cb6853eea6 cli: More shared 'address.*' handling output VirtCLIParser
Make it a global function rather than complicating VirtCLIParser any
further with irrelevant functions
2016-06-13 18:37:30 -04:00
Cole Robinson 7bee927276 conn: Stop using VirtOptionParser
It only needs a minimal portion of the functionality, so separate
that out and use it explicitly. Clean up some of the surrounding
cli.py bits as well
2016-06-13 18:37:30 -04:00
Cole Robinson efad67aab2 cli: Separate param parse and lookup
Makes the code a bit easier to follow
2016-06-12 19:48:16 -04:00
Cole Robinson 31b8051525 cli: Rename opts.opts -> opts.optdict
To make it more clear to callers what type of structure they are
dealing with
2016-06-12 10:32:23 -04:00
Cole Robinson 0663e52a62 cli: Use OrderedDict for tracking cli values
Allows us to drop the single 'orderedopts' usage
2016-06-12 10:11:11 -04:00
Cole Robinson 263a35fe7a cli: Wrap setter_cb bits in a class
Will make it less churny if we want to add new bits in the future
2016-06-11 17:22:27 -04:00
Cole Robinson 14fd99255b cli: add --graphics listen=socket support
This is the new style socket support, where we request libvirt to
allocate a socket path for us. Plus this is the only way to enable
socket support for type=spice
2016-06-11 16:56:41 -04:00
Cole Robinson 4c0b761cfb virtinst: graphics: Add listen=none support
Not strictly needed for spice, but now available for vnc if
people want it
2016-06-11 16:48:34 -04:00
Cole Robinson 2b34831b26 cli: Add device address.type/address.bus/... options
This exposes every device <address> option, for each device
cli option. So --disk, --network, --video, etc.

Fill out a few more address XML bits as well
2016-06-11 16:10:31 -04:00
Cole Robinson 1330f8c675 cli: Move blkiotune and memorybacking out of the device code area 2016-06-11 13:45:05 -04:00
Pavel Hrdina df1c3e74aa virt-install: add a new guest feature GIC for ARM guests
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1334857

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-11 18:41:31 +02:00
Pavel Hrdina 9ca3ec8b17 virtinst.cli: remove duplicated line
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-10 18:08:07 +02:00
Cole Robinson 55327c81b7 xmlbuilder: Support clear()ing an object in place
This gives friendly XML output via virt-xml for clearxml=yes +
extra options: the XML block is editted in place, rather than removed
and with the newchanges appended
2016-05-20 14:51:31 -04:00
Cole Robinson 635a228f6b cli: Warn if we think spice GL settings won't work 2016-05-20 14:51:31 -04:00
Marc-André Lureau 8aead7619c virtinst: add listen=none graphics option
Add a special listen value to disable any extra display server listening
socket. This is necessary now that qemu prevents starting a spice+virgl
VM with listening sockets (until spice allows remoting with virgl).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-05-20 14:51:31 -04:00
Cole Robinson 4a076232b6 cli: Expose --video heads, ram, vram, vgamem, accel3d 2016-05-20 11:44:18 -04:00