2018-08-30 16:00:07 +03:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
2020-04-07 17:53:19 +03:00
|
|
|
Date: Mon, 6 Apr 2020 12:16:48 +0200
|
|
|
|
Subject: [PATCH] PVE: Add dummy -id command line parameter
|
2018-08-30 16:00:07 +03:00
|
|
|
|
|
|
|
This used to be part of the qemu-side PVE authentication for
|
|
|
|
VNC. Now this does nothing.
|
|
|
|
|
|
|
|
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
|
2019-06-06 13:58:15 +03:00
|
|
|
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
2018-08-30 16:00:07 +03:00
|
|
|
---
|
|
|
|
qemu-options.hx | 3 +++
|
2020-04-07 17:53:19 +03:00
|
|
|
softmmu/vl.c | 8 ++++++++
|
2018-08-30 16:00:07 +03:00
|
|
|
2 files changed, 11 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/qemu-options.hx b/qemu-options.hx
|
2022-06-27 14:05:40 +03:00
|
|
|
index aeade4ef80..a26f0b0400 100644
|
2018-08-30 16:00:07 +03:00
|
|
|
--- a/qemu-options.hx
|
|
|
|
+++ b/qemu-options.hx
|
2022-06-27 14:05:40 +03:00
|
|
|
@@ -1075,6 +1075,9 @@ DEFHEADING()
|
2020-04-07 17:53:19 +03:00
|
|
|
|
|
|
|
DEFHEADING(Block device options:)
|
2018-08-30 16:00:07 +03:00
|
|
|
|
|
|
|
+DEF("id", HAS_ARG, QEMU_OPTION_id,
|
|
|
|
+ "-id n set the VMID", QEMU_ARCH_ALL)
|
|
|
|
+
|
|
|
|
DEF("fda", HAS_ARG, QEMU_OPTION_fda,
|
|
|
|
"-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
|
|
|
|
DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
|
2020-04-07 17:53:19 +03:00
|
|
|
diff --git a/softmmu/vl.c b/softmmu/vl.c
|
2022-06-27 14:05:40 +03:00
|
|
|
index a3f2a3818c..4208142685 100644
|
2020-04-07 17:53:19 +03:00
|
|
|
--- a/softmmu/vl.c
|
|
|
|
+++ b/softmmu/vl.c
|
2022-06-27 14:05:40 +03:00
|
|
|
@@ -2785,6 +2785,7 @@ void qemu_init(int argc, char **argv, char **envp)
|
2021-05-27 13:43:32 +03:00
|
|
|
MachineClass *machine_class;
|
|
|
|
bool userconfig = true;
|
|
|
|
FILE *vmstate_dump_file = NULL;
|
2018-08-30 16:00:07 +03:00
|
|
|
+ long vm_id;
|
2021-05-27 13:43:32 +03:00
|
|
|
|
|
|
|
qemu_add_opts(&qemu_drive_opts);
|
|
|
|
qemu_add_drive_opts(&qemu_legacy_drive_opts);
|
2022-06-27 14:05:40 +03:00
|
|
|
@@ -3420,6 +3421,13 @@ void qemu_init(int argc, char **argv, char **envp)
|
2022-02-11 12:24:33 +03:00
|
|
|
machine_parse_property_opt(qemu_find_opts("smp-opts"),
|
|
|
|
"smp", optarg);
|
2018-08-30 16:00:07 +03:00
|
|
|
break;
|
|
|
|
+ case QEMU_OPTION_id:
|
|
|
|
+ vm_id = strtol(optarg, (char **)&optarg, 10);
|
|
|
|
+ if (*optarg != 0 || vm_id < 100 || vm_id > INT_MAX) {
|
|
|
|
+ error_report("invalid -id argument %s", optarg);
|
|
|
|
+ exit(1);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
case QEMU_OPTION_vnc:
|
2021-05-27 13:43:32 +03:00
|
|
|
vnc_parse(optarg);
|
2018-08-30 16:00:07 +03:00
|
|
|
break;
|