Commit Graph

1444 Commits

Author SHA1 Message Date
Cole Robinson
2e6093d6b6 create: Show inserted CDROM media in customize
This makes it easier for people to change install media afterwards
if they want:

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

But also this makes it more clear that if users want to use virtio-win,
they need to add an additional CDROM and not try to reuse the install
CDROM device
2018-10-13 10:17:50 -04:00
Cole Robinson
2482e57a15 create: Fix customize boot page
Installer reworks dropped the guest.autostart flag, need to add
it back. Add Uitest for it
2018-10-13 09:46:06 -04:00
Cole Robinson
11d1cbdf06 installer: DistroInstaller -> InstallerTreeMedia
Now we have only one Installer class, and callers don't need to
worry about choosing a particular class type depending on their
needs, just pass cdrom vs. location to the installer init and
we figure out everything behind the scenes.

Besides simplifying the callers this makes the control flow a
lot easier to follow whether looking at InstallerTreeMedia or
Installer classes
2018-10-13 09:42:11 -04:00
Cole Robinson
6fb81aeb65 cli: Another searchdata.user fix 2018-10-12 18:34:42 -04:00
Cole Robinson
8ff2043f2a urldetect: Drop boot.iso fetching
Since this was only used for the --cdrom $treeurl case, this is
no longer used
2018-10-12 15:54:39 -04:00
Cole Robinson
b90b8e3c07 distroinstaller: Remove --cdrom $URL boot.iso fetching
And instead treat any URL passed to --cdrom as a file to
access directly over http. Rationale for dropping this is
laid out here:

https://www.redhat.com/archives/virt-tools-list/2018-May/msg00011.html
2018-10-12 15:54:36 -04:00
Cole Robinson
4f320c2b98 distroinstaller: Remove implied cdrom installs
This is an obscure feature that I'm skeptical anyone is relying on,
and has weirdly subtle semantics that are hard to test.
2018-10-12 15:33:05 -04:00
Cole Robinson
286dbf6d51 installer: Fold PXEInstaller into base Installer class
PXEInstaller is really just 'boot off bootdev=network' which is
easy enough to model without a separate class
2018-10-12 15:15:20 -04:00
Cole Robinson
e05f74c2f0 devices: disk: Fix path search changing
Accessed the wrong variable name
2018-10-12 13:49:53 -04:00
Jim Fehlig
5a7698c799 Fix selection of network volumes
When creating a new VM and selecting a volume from a network-based
storage pool such as rbd, the volume is not recognized as network-based
and is treated as a volume from a directory storage pool.

This patch adds a method to check if the volume's path points to a
network-based volume, then uses the method to avoid actions like
setting unix file permissions on the volume, which doesn't make
sense for a network-based volume.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>

(crobinso: rebase, tweak lookup logic)
2018-10-12 13:49:53 -04:00
Cole Robinson
c0314cad2e storage: Remove needless manage_path wrapper 2018-10-11 19:23:18 -04:00
Cole Robinson
d36aa7fbaf device: disk: Move last host touching to diskbackend
This just conceptually makes more sense to keep it all in
one file, and DeviceDisk is the API for the rest of the code
to deal with any host storage state
2018-10-11 19:20:46 -04:00
Cole Robinson
425f599c84 device: disk: Move all path search handling to diskbackend
Simplify it slightly by combining return output and removing
an entry point. Add some additional test cases for it
2018-10-11 19:11:16 -04:00
Cole Robinson
fb1e63c100 devices: disk: remove dead code 2018-10-11 18:00:10 -04:00
Lin Ma
eb1a67a595 cli: disk: Add options to support SCSI persistent reservation
Create the managed or the unmanaged PR object to enable SCSI persistent
reservation for LUN Passthrough

Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Cole Robinson
42a96cfd59 virt-install: add --destroy-on-exit
This makes the console window behave like a raw qemu command line:
when the user closes it, the VM is hard powered off.
2018-10-11 15:24:16 -04:00
Cole Robinson
3e55e89453 tests: Add better virt-install console testing 2018-10-11 12:19:48 -04:00
Yossi Ovadia
215d296b61 cli: add --boot rebootTimout
virt-install -n blah -r 1024 --vcpu=1 --disk=/root/vm/blah.qcow2,size=10\
 --network=bridge:br-public --pxe --boot=network,rebootTimeout=3

By default, in case of (first) pxe boot failure the VM will simply
stop trying.
By adding the above, VM will re-try pxe boot. ( useful when DHCP not
replys on first attempt.

Libvirt support it and VM XML will look as follow : ( 'bios rebootTimeout'
will be created under OS section. )

  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.5.0'>hvm</type>
    <boot dev='network'/>
    <bios rebootTimeout='3'/>
  </os>

(crobinso: fix it, add test case)
2018-10-11 11:24:07 -04:00
Chen Hanxiao
70f9817bdc pylint: fix simplifiable-if-statement issue
pylint complain:
    The if statement can be replaced with 'var = bool(test)'

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2018-10-11 11:19:49 -04:00
Cole Robinson
71626b1dd2 initrdinject: Remove RHEL4 support
It's end of life, let's move on
2018-10-09 14:18:36 -04:00
Cole Robinson
be628ad54f cli: Log openauth callback prompts 2018-10-08 09:15:06 -04:00
Cole Robinson
7eaf036acf virtinst: Remove stable_defaults concept
This switch says: if we detect a rhel host, use special version
checks that match rhel backports. This pattern sucks. The way
forward is to have libvirt advertise the bits that are supported,
through domcapabilities. Then virt-manager/virtinst can react
as appropriate.
2018-10-06 19:45:51 -04:00
Cole Robinson
019a33e975 clock: Drop RHEL hyperv clock distinction
I think enough time has passed that we can just check the
support based on the older RHEL version.
2018-10-06 19:45:51 -04:00
Cole Robinson
e6738d9827 cliconfig: Remove --default-qemu-user
Libvirt has given us this info in capabilities for a long time,
this shouldn't matter anymore
2018-10-06 12:30:59 -04:00
Cole Robinson
a4097b7691 cli: Merge multiple instances of single use opts
So --memory 123,maxmem=456 --memory 555 is equivalent to
--memory 555,maxmem=45
2018-10-05 13:23:20 -04:00
Cole Robinson
03439dd9a3 cli: Remove some --sysinfo examples
This is a sufficiently uncommon option, it doesn't need 5 examples
2018-10-04 20:52:32 -04:00
Cole Robinson
40dc4b1131 support: Limit qemu-xhci check to qemu 2.9.0 2018-10-04 20:48:43 -04:00
Cole Robinson
945c0125db cli: Remove VirtStreamHandler
This was needed at one point to make our logging not throw
exceptions when passed non-ascii text, like logging translated
errors. pretty sure python 3 and probably python2.7 fixed all
those issues, so lets drop it
2018-10-04 19:45:06 -04:00
Cole Robinson
9edca3486a virt-manager: Wire up support for default mode=host-model
Simplify things a long the way
2018-10-04 14:43:44 -04:00
Cole Robinson
469fed08a0 guest: Default to cpu mode=host-model if libvirt is new enough
We check whether host-model is exposed in domcapabilities, which
indicates host-model is using the smarter new safer method in
cooperation with qemu
2018-10-04 14:43:41 -04:00
Cole Robinson
76334bfabd guest: Add DomainCapabilities caching 2018-10-04 12:30:14 -04:00
Cole Robinson
210cb858bc controller: usb: Use ports=15 for usb3
It's the max that qemu supports, so why not add as many as possible.
Gerd indicated in private mail that he didn't know of any issues
with it.
2018-10-04 11:55:57 -04:00
Cole Robinson
35dd99f172 cli: Don't hardcode nec-xhci for --controller usb3
Use our helper function to choose the optimal model
2018-10-04 09:24:43 -04:00
Cole Robinson
b51104ad22 guest: Tweak error with invalid --os-variant
Try to point people in the right direction if they specify an
unknown distro name on the cli, like was reported here:

https://bugzilla.redhat.com/show_bug.cgi?id=1576473
2018-10-03 19:32:09 -04:00
Cole Robinson
046a242bd4 guest: Use USB3 for x86 qemu if OS supports it
Using new annotations in osinfo-db
2018-10-03 19:02:07 -04:00
Cole Robinson
c539f06eeb cli: Give better --controller examples
ich9-ehci1 isn't a recommended configuration
2018-10-03 18:52:33 -04:00
Pino Toscano
8227b820ee osinfo: warn when using deprecated osinfo IDs
At some point in the future it could be a good idea to drop the _aliases
mapping altogether; it will be hard to do so, in case the users are not
informed that they are using a deprecated ID.

(crobinso: Tweak format and message)

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2018-10-02 11:41:34 -04:00
Marc-André Lureau
4ad74278ca cli: add memory backing access_mode & source_type
Allow to set some memory backing options, ex:
--memorybacking access_mode=shared,source_type=anonymous

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-10-02 11:12:13 -04:00
Cole Robinson
760dc32bac osdict: Clarify comment about rhel virtio-serial hack 2018-10-01 11:39:58 -04:00
Cole Robinson
ff3d6c65d8 Fix some pep8 warnings 2018-10-01 11:37:28 -04:00
Cole Robinson
b2e7986c7b osdict: Switch device lookups to be ID based
I'm not positive device names will never change, but presumably the IDs
won't, so use them instead
2018-10-01 11:24:45 -04:00
Cole Robinson
757910a1bb cli: Add --metadata os_name= and os_full_id=
Allows changing the libosinfo metadata for an existing vm via virt-xml
2018-09-30 20:55:32 -04:00
Cole Robinson
b19f94299b details: Add OS name view/edit, + oslist rework
This is just a big nasty commit.

Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
2018-09-30 20:55:32 -04:00
Cole Robinson
65e1187c10 osdict: Add a helpful __repr__ 2018-09-30 09:37:14 -04:00
Cole Robinson
31e4b72a8b osdict: Drop Glib.Date API usage
Use python datetime instead, it's more python friendly
2018-09-29 15:22:44 -04:00
Cole Robinson
97ea737386 devices: interface: Have x86 fallback model be e1000
libvirt will use rtl8139, but the qemu default changed a while
ago to e1000, and libvirt has diverged. e1000 is more modern and
considered the better default here, so use it
2018-09-29 14:35:28 -04:00
Cole Robinson
627bfabc32 pylint: Silence output on Fedora 29 2018-09-29 14:27:34 -04:00
Cole Robinson
4adb1c8c30 pycodestyle: fix W605 invalid escape sequence 2018-09-29 13:59:19 -04:00
Cole Robinson
7356afcca7 osdict: Use USB tablet if no OS specified
Most OS users will be installing benefit from it, so make it the
default
2018-09-29 13:36:42 -04:00
Cole Robinson
184b96a815 virtinst: util: Remove unused validate_uuid
We let libvirt error nowadays
2018-09-14 15:19:03 -04:00