[pve-devel] [PATCH qemu-server] api: vm_start: 'force-cpu' is for internal migration use only

Oguz Bektas o.bektas at proxmox.com
Mon Mar 7 14:20:25 CET 2022


'force-cpu' parameter was introduced to allow live-migration of VMs with
custom CPU models; it does not need to be allowed for general use on
vm_start for regular users, since they would be able to set arbitrary
cpu types or cpuid parameters that aren't supported.

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 PVE/API2/Qemu.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 9be1caf..68077cc 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2287,9 +2287,7 @@ __PACKAGE__->register_method({
 	my $node = extract_param($param, 'node');
 	my $vmid = extract_param($param, 'vmid');
 	my $timeout = extract_param($param, 'timeout');
-
 	my $machine = extract_param($param, 'machine');
-	my $force_cpu = extract_param($param, 'force-cpu');
 
 	my $get_root_param = sub {
 	    my $value = extract_param($param, $_[0]);
@@ -2304,6 +2302,7 @@ __PACKAGE__->register_method({
 	my $migration_type = $get_root_param->('migration_type');
 	my $migration_network = $get_root_param->('migration_network');
 	my $targetstorage = $get_root_param->('targetstorage');
+	my $force_cpu = $get_root_param->('force-cpu');
 
 	my $storagemap;
 
-- 
2.30.2






More information about the pve-devel mailing list