all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu] api: qemu: create: default cpu to x86-64-v2-AES
@ 2024-10-01 14:08 Maximiliano Sandoval
  2024-10-02  7:50 ` Shannon Sterz
  2024-10-22 11:23 ` Fiona Ebner
  0 siblings, 2 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2024-10-01 14:08 UTC (permalink / raw)
  To: pve-devel

This makes it so newly created VMs, e.g. with `qm create` will have the
same default value as VMs created via the web UI.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
I am not entirely sure if there is side-effect that I am not taking into account.

 PVE/API2/Qemu.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index d25a79fe..383218fd 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1152,6 +1152,10 @@ __PACKAGE__->register_method({
 			$conf->{vmgenid} = PVE::QemuServer::generate_uuid();
 		    }
 
+		    if (!defined($param->{cpu})) {
+			$conf->{cpu} = 'x86-64-v2-AES';
+		    }
+
 		    my $machine_conf = PVE::QemuServer::Machine::parse_machine($conf->{machine});
 		    my $machine = $machine_conf->{type};
 		    if (!$machine || $machine =~ m/^(?:pc|q35|virt)$/) {
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-10-23 11:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-01 14:08 [pve-devel] [PATCH qemu] api: qemu: create: default cpu to x86-64-v2-AES Maximiliano Sandoval
2024-10-02  7:50 ` Shannon Sterz
2024-10-22 11:23 ` Fiona Ebner
2024-10-22 11:35   ` Thomas Lamprecht
2024-10-22 12:15     ` Maximiliano Sandoval
2024-10-22 13:35       ` Thomas Lamprecht
2024-10-23  9:56         ` Fiona Ebner
2024-10-23 11:06           ` Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal