Skip to content

Commit 0204657

Browse files
committed
qvm-device: add --force flag for dom0 device attachment
Fixes: QubesOS/qubes-issues#10825
1 parent 386de45 commit 0204657

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

qubesadmin/tools/qvm_device.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ def attach_device(args):
229229
options = dict(opt.split("=", 1) for opt in args.option or [])
230230
if args.ro:
231231
options["read-only"] = "yes"
232+
if args.force:
233+
options["force"] = "yes"
232234
parse_ro_option_as_read_only(options)
233235
assignment.options = options
234236

@@ -679,6 +681,15 @@ def get_parser(device_class=None):
679681
help="Alias to `assign --required` for backward " "compatibility",
680682
)
681683

684+
attach_parser.add_argument(
685+
"--force",
686+
"-f",
687+
dest="force",
688+
action="store_true",
689+
default=False,
690+
help="Allow attaching devices to dom0",
691+
)
692+
682693
mode_parser = assign_parser.add_mutually_exclusive_group()
683694
mode_parser.add_argument(
684695
"--ask",

0 commit comments

Comments
 (0)