Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 070699e

Browse files
committed
virt-install: Error if --extra-args passed w/o --location
1 parent f29157c commit 070699e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

tests/clitest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@
271271
"--hvm --pxe --os-variant farrrrrrrge"
272272
# Boot menu w/ bogus value
273273
"--hvm --pxe --boot menu=foobar",
274+
# cdrom fail w/ extra-args
275+
"--hvm --cdrom %(EXISTIMG1)s --extra-args console=ttyS0",
274276
],
275277
}, # category "install"
276278

virt-install

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,10 @@ def main():
954954
# Set host device info
955955
cli.get_hostdevs(options.hostdevs, guest)
956956

957+
if not options.location and options.extra:
958+
fail(_("--extra-args only work if specified with --location."))
957959
guest.extraargs = options.extra
960+
958961
cli.set_os_variant(guest, options.distro_type, options.distro_variant)
959962

960963
# and now for the full-virt vs paravirt specific questions

0 commit comments

Comments
 (0)