Commit Graph

230 Commits

Author SHA1 Message Date
Cole Robinson
0d095e22f7 cli: Have --vcpu cpuset=auto use placement=auto
For many years virt-install has supported a bit of logic that maps
--cpuset=auto to a CPU pinning based on host NUMA topology; we look
for a NUMA node who's current free memory is closest to the requested
memory allocation. This isn't very useful though, since it's a one time
allocation, the conditions at VM creation time likely aren't the
conditions of the machine in the future.

Libvirt has supported a smarter option in vcpu placement=auto for a long
while, which will perform a similar operation but at every VM startup.

Convert cpuset=auto to use this functionality instead.
2015-11-18 15:00:54 -05:00
Cole Robinson
492c9c4f28 cli: Add --vcpu placement=static|auto option 2015-11-18 15:00:42 -05:00
Cole Robinson
e9d5347395 cli: Support --network link_state=up|down 2015-11-18 13:59:15 -05:00
Pavel Hrdina
a8110c6cd7 virt-install: report warning for cpuset=auto on non-NUMA host
Currently we report an error but continue with installation, we should
report warning instead of error.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-03 11:03:14 +01:00
Abhijeet Kasurde
e5a0d1cbb8 Added support to on_lockfailure
Added cli option to specify on_lockfailure in events.
Also, added various testcases and related output XMLs.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(crobinso: add clitest.py example)
2015-10-07 10:25:12 -04:00
Abhijeet Kasurde
d7e678cb28 Added support pvspinlock in features
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-10-05 15:14:34 -04:00
Cole Robinson
65aba92797 virt-install: Add --feature pmu=on|off 2015-09-28 17:12:42 -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
5584863d18 urlfetcher: Switch to requests and urllib2 instead of urlgrabber
urlgrabber is largely dead upstream and isn't going to be ported to
python3 AFAIK. So we will need to move off of it eventually.

Use requests for http handling which is the most common library nowadays,
and just plain old urllib2 for ftp fetching.
2015-09-18 19:50:35 -04:00
Cole Robinson
e3fb2f9023 virt-manager: Don't print ugly logging if VIRTINST_TEST_SUITE set 2015-09-08 12:33:35 -04:00
Pavel Hrdina
39da70a456 Added option to enable kvm_hidden feature in virt-install cmd-line
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-08 12:03:04 +02:00
Cole Robinson
697164f2e5 virtinst: Centralize urlgrabber meter lookup
We will eventually want to drop this dep since it's basically dead
upstream, this is a small step in that direction
2015-09-06 15:09:44 -04:00
Cole Robinson
9e23843961 devicechar: Simplify host/port/mode handling
It's kinda crazy, and parts of cli API depend on it, but we can strip
a lot of the confusing bits away by pushing a small bit of logic to
the callers.
2015-09-05 17:16:18 -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
4d87d2f27b cli: Make child lookup not specific to guest devices
<seclabel> is not singleton nowadays, so we need to extend our
infrastructure to handle non-device child properties. This is part of
that
2015-09-04 16:16:25 -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
Chen Hanxiao
a51eea16f8 cli: fix a comment typo
s/uncoditionally/unconditionally

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-07-30 11:05:59 +08:00
Pavel Hrdina
0fbe8e7a1f translation: fix wrong usage of _() function
All the strings have to be at first translated and then we can fill the
formated and translated string.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-06-05 16:33:51 -04:00
Marc-André Lureau
b44cfde6ac virtinst: add features.vmport option
Message-Id: <1428012248-5767-3-git-send-email-marcandre.lureau@gmail.com>
2015-05-04 12:40:13 -04:00
Cole Robinson
93f826a8b2 cli: Replace add --check option (bz 1063471)
For fine grained enabling/disabling validation checks. Use this to
replace the heavy handed --force option.
2015-04-11 19:48:35 -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
527c49dec2 virt-install: Add --input option
For configuring VM <input> devices
2015-04-09 13:22:40 -04:00
Cole Robinson
9b21f27e31 cli: Maintain same --print-xml behavior for non virt-install
Don't want it scooping up any nargs
2015-04-07 19:58:28 -04:00
Cole Robinson
86f1133777 guest: Encode defaults into the XML at install time
Previously we made all the default encoding non-permanent by XML objects
before generating the XML, making changes to the copies, and restoring
to the old state after the XML is returned to the user.

This allows us to call start_install multiple times with the same Guest
object and not alter it's original config... but that feature isn't really
useful anymore, and this behavior makes the 'customize before install'
dialog difficult to handle.

So drop most of it, and fix some of the minor fallout.
2015-04-07 18:36:06 -04:00
Cole Robinson
a773a66a3f virtcli: Export config variables in a class object
Makes things easier to extend later
2015-04-06 15:54:35 -04:00
Cole Robinson
3d6831ec8f virt-install: Deprecate --print-step, just use --print-xml
argparse lets us handle this in a back compat fashion, so let's simplify
the CLI.
2015-04-04 17:10:45 -04:00
Cole Robinson
c6481f6c5d cli: Drop needless assignment that confuses pylint 2015-03-23 14:03:52 -04:00
Pavel Hrdina
1689677482 virtinst/cli: don't use hard-coded path for binaries
The binaries could be installed somewhere else and we should not
hard-code the binary paths.  This patch allows non-root user to build
their own virt-viewer/virsh, set the PATH env and run virt-manager
tests.

(crobinso: Fix check_output args, alphabetize imports)

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Message-Id: <ddf77f9519da580c8d5f3df0f56bdb36d5c000fa.1427117670.git.phrdina@redhat.com>
2015-03-23 13:31:49 -04:00
Giuseppe Scrivano
31836e2b5d virtinst: add support for <disk> sgio attribute
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-16 20:32:40 +01: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
Cole Robinson
9464ca3dcf cli: Fix debug message formatting 2015-01-29 10:03:35 -05:00
Cole Robinson
8a96406902 man: Document --disk $URL format 2014-12-10 13:22:42 -05:00
Cole Robinson
e1ab165b1a cli: Don't try to create storage with source_pool + size 2014-12-10 13:22:42 -05:00
Cole Robinson
f7c17d4c46 diskbackend: Mandate parent_pool when vol_object is passed
We will need parent pool for looking up info about network volumes
2014-12-09 17:03:48 -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
9b62c2260d devicedisk: Catch --disk /dev/idontexist,size=2 2014-12-06 16:44:21 -05:00
Cole Robinson
40a5ec75b7 tests: Switch away from set_create_storage 2014-12-05 21:49:10 -05:00
Cole Robinson
210ab4d8e0 devicedisk: Add set_vol_install
And use it in places where we don't need set_create_storage
2014-12-05 21:49:10 -05:00
Cole Robinson
2acbf52ce3 cli: If creating storage, always build vol_install
This is the start of moving this logic out of devicedisk
2014-12-05 20:00:11 -05:00
Cole Robinson
ef0beeb18b cli: Clean up disk source handling
...sort of. This stuff is a hairy mess, but this makes it more stream line
and easier to extend.
2014-12-05 19:05:15 -05:00
Cole Robinson
6489df83ca devicedisk: Rename path_exists -> path_definitely_exists
Since it's a best effort attempt, try to make it more clear that
we aren't certain if paths exist in some cases.
2014-12-04 20:10:37 -05:00
Cole Robinson
a75aa47daf devicedisk: Use consistent capitalization for property names 2014-12-04 16:30:18 -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
Chen Hanxiao
a6e72f30f3 virtinst: fix some comment typos
s/occurence/occurrence

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-10-29 16:00:28 +08:00
Cole Robinson
cbf38cbe9f pylint: Ignore new warnings 2014-10-27 19:53:25 -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
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
99700821c6 virt-install: Reorder --help output a bit 2014-09-20 19:30:16 -04:00