public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server 0/1] pxe: Fix machine types with pxe
@ 2021-03-25 18:12 Luca Berneking
  2021-03-25 18:12 ` [pve-devel] [PATCH qemu-server 1/1] " Luca Berneking
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Berneking @ 2021-03-25 18:12 UTC (permalink / raw)
  To: pve-devel

Fixes a problem with custom pxe roms.
I need to boot a custom ipxe rom image in my pve vms.
I simply replaced the rom file in `/usr/share/kvm/pxe-virtio.rom`
with my custom rom build.
But to actually load these rom images in a new vm, you need to use a
machine type with a ".pxe" suffix. Theres the problem, proxmox adds
"+pve0" to the machine type specified in the config, so
"pc-i440fx-5.0+pve0.pxe" became "pc-i440fx-5.0+pve0.pxe+pve0" which
obviously does not exists and failes to boot.


Luca Berneking (1):
  pxe: Fix machine types with pxe

 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.31.0




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

* [pve-devel] [PATCH qemu-server 1/1] pxe: Fix machine types with pxe
  2021-03-25 18:12 [pve-devel] [PATCH qemu-server 0/1] pxe: Fix machine types with pxe Luca Berneking
@ 2021-03-25 18:12 ` Luca Berneking
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Berneking @ 2021-03-25 18:12 UTC (permalink / raw)
  To: pve-devel

Fixes a problem with custom pxe roms.
I need to boot a custom ipxe rom image in my pve vms.
I simply replaced the rom file in `/usr/share/kvm/pxe-virtio.rom`
with my custom rom build.
But to actually load these rom images in a new vm, you need to use a
machine type with a ".pxe" suffix. Theres the problem, proxmox adds
"+pve0" to the machine type specified in the config, so
"pc-i440fx-5.0+pve0.pxe" became "pc-i440fx-5.0+pve0.pxe+pve0" which
obviously does not exists and failes to boot.

Signed-off-by: Luca Berneking <luca@berneking.net>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a498444..85b9fc8 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2872,7 +2872,7 @@ sub get_vm_machine {
 	}
     }
 
-    if ($add_pve_version && $machine !~ m/\+pve\d+$/) {
+    if ($add_pve_version && $machine !~ m/\+pve\d+(.pxe)?$/) {
 	# for version-pinned machines that do not include a pve-version (e.g.
 	# pc-q35-4.1), we assume 0 to keep them stable in case we bump
 	$machine .= '+pve0';
-- 
2.31.0




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

end of thread, other threads:[~2021-03-25 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 18:12 [pve-devel] [PATCH qemu-server 0/1] pxe: Fix machine types with pxe Luca Berneking
2021-03-25 18:12 ` [pve-devel] [PATCH qemu-server 1/1] " Luca Berneking

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal