Re: [pve-devel] [PATCH qemu-server v2] vm_start: add syslog info with which PID a VM was started

2024-10-28 Thread Daniel Herzig
This works flawlessly on my testsetup. I find this information very useful. Reviewed-by: Daniel Herzig Daniel Kral writes: > Adds a syslog entry to log the process id that has been given to the > QEMU VM process at start. This is helpful debugging information if the > pid shows up

[pve-devel] [PATCH manager 12/12] ui: qemu: hardware: add eject button for cdroms

2024-10-25 Thread Daniel Herzig
Eject by setting file to none. Signed-off-by: Daniel Herzig --- www/manager6/qemu/HardwareView.js | 43 +++ 1 file changed, 43 insertions(+) diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js index 59e670db..5d1c18a5 100644 --- a/www

[pve-devel] [PATCH container] fix #5742: lxc: setup: centos template keep static ipv6 assignment

2024-10-28 Thread Daniel Herzig
] https://bugzilla.proxmox.com/show_bug.cgi?id=5745 Reported-by: Andres Moya Signed-off-by: Daniel Herzig --- src/PVE/LXC/Setup/CentOS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/LXC/Setup/CentOS.pm b/src/PVE/LXC/Setup/CentOS.pm index 2ad1f0c..fddcffa 100644 --- a

[pve-devel] [PATCH widget-toolkit v2] node/ServiceView: fix #5611: hiding the non-installed services

2024-11-10 Thread Daniel Herzig
This patch adds a filter to identify services, which are reported as 'not-found' by the api. By default they will not be shown in the UI anymore, but visibility can still be toggled using a new checkbox. Signed-off-by: Daniel Herzig --- changes since v1: * applied Thomas' sugg

[pve-devel] [PATCH qemu-server, manager 0/12] bugzilla #4225 -- improve handling of unavailable ISOs

2024-10-25 Thread Daniel Herzig
ect' button to the hardwareview in the WebGUI, which can be used as a convenience shortcut to manually editing the missing ISO file to 'Do not use any media'. *** BLURB HERE *** qemu-server: Daniel Herzig (9): fix #4225: qemuserver: drive: add optional required parameter q

[pve-devel] [PATCH qemu-server 3/12] fix #4225: qemuserver: add function to eject isofiles

2024-10-25 Thread Daniel Herzig
The function is called while config_to_command iterates over all volumes to allow for early storage activation and early exit in the case of missing required files. Signed-off-by: Daniel Herzig --- PVE/QemuServer.pm | 39 +++ 1 file changed, 39 insertions(+)

[pve-devel] [PATCH qemu-server 2/12] qemuserver: add helper function for mocking files

2024-10-25 Thread Daniel Herzig
This stub function can be used for mocking a file's existance in testruns. Signed-off-by: Daniel Herzig --- This is just a method to allow for mocking a files (not) existance for testing, as I did not find a way to mock '-e' itself -- ideas very welcome! PVE/QemuServer.pm |

[pve-devel] [PATCH qemu-server 4/12] test: chomp all trailing newlines from errors and warnings

2024-10-25 Thread Daniel Herzig
Ease EXPECT_ERROR and EXPECT_WARN string matching with errors/warnings that have more than one trailing newline. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/run_config2command_tests.pl b/test

[pve-devel] [PATCH qemu-server 1/12] fix #4225: qemuserver: drive: add optional required parameter

2024-10-25 Thread Daniel Herzig
Add parameter to allow for marking a drive as required. Signed-off-by: Daniel Herzig --- PVE/QemuServer/Drive.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm index 6e98c095..c80c0f07 100644 --- a/PVE/QemuServer

[pve-devel] [PATCH qemu-server 9/12] test: cfg2cmd: add tests for testing the iso required parameter

2024-10-25 Thread Daniel Herzig
-nfs.conf Signed-off-by: Daniel Herzig --- test/cfg2cmd/ide-required-iso-missing.conf| 12 ++ .../cfg2cmd/ide-required-iso-missing.conf.cmd | 0 .../cfg2cmd/ide-required-iso-offline-nfs.conf | 12 ++ .../ide-required-iso-offline-nfs.conf.cmd | 0 test/cfg2cmd/ide-required.conf

[pve-devel] [PATCH qemu-server 5/12] test: mock cifs-store

2024-10-25 Thread Daniel Herzig
Let cifs-store appear as online to a call from PVE::Storage::activate_storage. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 13 + 1 file changed, 13 insertions(+) diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl index 2911483e

[pve-devel] [PATCH qemu-server 8/12] test: mock log_warn warnings

2024-10-25 Thread Daniel Herzig
Strip log_warn wrapper for catching warnings on testruns. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 4 1 file changed, 4 insertions(+) diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl index 3414eea7..dd6717e2 100755 --- a/test

[pve-devel] [PATCH manager 10/12] fix #4225: ui: form: isoselector: add optional required checkbox

2024-10-25 Thread Daniel Herzig
Add a checkbox for marking an iso file as required. This option is used in the backend to determine if the VM should start up in case the configured ISO file is not available. By default this box is not visible and disabled. Signed-off-by: Daniel Herzig --- www/manager6/form/IsoSelector.js

[pve-devel] [PATCH qemu-server 7/12] test: mock existing files

2024-10-25 Thread Daniel Herzig
Let all files checked by file_exists appear as existing if the path does not contain the string 'I_DO_NOT_EXIST'. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 4 1 file changed, 4 insertions(+) diff --git a/test/run_config2command_tests

[pve-devel] [PATCH qemu-server 6/12] test: add nfs-offline storage

2024-10-25 Thread Daniel Herzig
Add an nfs-offline storage to allow for comparatative testing against potentially mocked online storages. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 9 + 1 file changed, 9 insertions(+) diff --git a/test/run_config2command_tests.pl b/test

[pve-devel] [PATCH manager 11/12] fix #4225: ui: qemu: cdedit: enable required checkbox for isos

2024-10-25 Thread Daniel Herzig
Enables the 'required' checkbox for the IsoSelector. If the parameter is not set, the backend will use the default (set to 1). Behaviour: * Only send parameter if not default (required=0) * Checked if parameter is missing (default) * Unchecked when adding a new CD-ROM Signed-off-

[pve-devel] [PATCH storage] dirplugin: fix #3986: check for trailing slashes

2024-11-13 Thread Daniel Herzig
This patch removes trailing slashes from manually entered paths by adding an additional if clause in the sub check_config. Signed-off-by: Daniel Herzig --- src/PVE/Storage/DirPlugin.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage

[pve-devel] [PATCH docs] increase verbosity of sdn dhcp docs.

2024-10-03 Thread Daniel Herzig
These minor additions to and rearrangements within the documentation target easier accessibility for the SDN DHCP feature. Signed-off-by: Daniel Herzig --- pvesdn.adoc | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pvesdn.adoc b

[pve-devel] [PATCH widget-toolkit] node/ServiceView: fix #5611: hiding the non-installed services

2024-11-06 Thread Daniel Herzig
This patch adds a filter to identify services, which are reported as 'not-found' by the api. By default they will not be shown in the UI anymore, but visibility can still be toggled using a new checkbox. Signed-off-by: Daniel Herzig --- src/node/ServiceView.js | 24 +

Re: [pve-devel] [PATCH docs/widget-toolkit/manager v3] implement tagview

2024-11-08 Thread Daniel Herzig
Dominik Csapak writes: > On 11/7/24 14:52, Aaron Lauterer wrote: >> gave this a quick test. >> two things I noticed: >> * root element in tree per tag: wouldn't it be better to override >> the display style to 'full'? Otherwise I might have a lot of >> colorful dots, but don't know what the tags

Re: [pve-devel] [PATCH manager] proxy: ui: vm console: autodetect novnc or xtermjs

2024-11-25 Thread Daniel Herzig
ups above this works like a charm! Tested-by: Daniel Herzig ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

2024-11-18 Thread Daniel Herzig
I've just tested this series with the following images: + GNS3 with VMware ESXi image from https://www.gns3.com/software/download-vm, unzipped and uploaded to local dir storage. + Ubuntu Noble from https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.ova, downloaded straight

Re: [pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

2024-11-18 Thread Daniel Herzig
Daniel Herzig writes: > I've just tested this series with the following images: > > + GNS3 with VMware ESXi image from https://www.gns3.com/software/download-vm, > unzipped and uploaded to local dir storage. > + Ubuntu Noble from > https://cloud-images.ubuntu.com/nob

Re: [pve-devel] [PATCH storage] dirplugin: fix #3986: check for trailing slashes

2024-11-14 Thread Daniel Herzig
Thanks for your feedback, I started working on a v2 including your suggestions. Stoiko Ivanov writes: > Thanks for tackling this long-open issue! > > On Wed, Nov 13, 2024 at 05:32:49PM +0100, Daniel Herzig wrote: >> This patch removes trailing slashes from manually entered >&g

[pve-devel] [PATCH guest-common 1/4] fix #5900: add helper function

2024-12-05 Thread Daniel Herzig
This patch adds a small helper function to retrieve the bridge name from the netN parameter string of a container or VM configuration. Signed-off-by: Daniel Herzig --- src/PVE/GuestHelpers.pm | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/PVE/GuestHelpers.pm b/src/PVE

[pve-devel] [PATCH network 2/4] fix #5900: add helper functions

2024-12-05 Thread Daniel Herzig
This patch adds helper functions to evaluate if a vnet (bridge) associated with a zone under SDN's auto-dhcp control via dnsmasq can retrieve a dhcp lease. Signed-off-by: Daniel Herzig --- src/PVE/Network/SDN/Dhcp.pm | 83 + 1 file changed, 83 inser

[pve-devel] [PATCH container 3/4] fix #5900: do not create container if dhcp range is exhausted

2024-12-05 Thread Daniel Herzig
This patch prevents containers to be created if their bridge is associated with a SDN zone with dnsmasq automatic dhcp enabled, and if the dhcp-range is exhausted or unset. Signed-off-by: Daniel Herzig --- src/PVE/API2/LXC.pm | 12 1 file changed, 12 insertions(+) diff --git a/src

[pve-devel] [PATCH guest-common, network, container, qemu-server 0/4] fix #5900: enhance SDN auto-dhcp behaviour

2024-12-05 Thread Daniel Herzig
creation, this is overridden, which can lead to confusing behaviour as described in detail on bugzilla. *** BLURB HERE *** guest-common: Daniel Herzig (1): fix #5900: add helper function src/PVE/GuestHelpers.pm | 11 +++ 1 file changed, 11 insertions(+) network: Daniel Herzig (1

[pve-devel] [PATCH qemu-server 4/4] fix #5900: do not create vm if dhcp range is exhausted

2024-12-05 Thread Daniel Herzig
This patch prevents VMs to be created if their bridge is associated with a SDN zone with dnsmasq automatic dhcp enabled, and if the dhcp-range is exhausted or unset. Signed-off-by: Daniel Herzig --- PVE/API2/Qemu.pm | 12 1 file changed, 12 insertions(+) diff --git a/PVE/API2

Re: [pve-devel] [PATCH qemu-server v3 2/6] fix #4225: qemuserver: introduce sub eject_nonrequired_isos

2025-02-03 Thread Daniel Herzig
Fiona Ebner writes: > Am 31.01.25 um 14:58 schrieb Daniel Herzig: >> Fiona Ebner writes: >> >>> Am 31.01.25 um 10:36 schrieb Fiona Ebner: >>>> Am 30.01.25 um 12:31 schrieb Daniel Herzig: >>>>> + >>>>> +$drive->{essentia

Re: [pve-devel] [PATCH qemu-server v3 0/6] bugzilla #4225 -- improve handling of unavailable ISOs

2025-01-31 Thread Daniel Herzig
Fiona Ebner writes: > Am 30.01.25 um 12:31 schrieb Daniel Herzig: >> This patch series addresses bugzilla entry #4225. >> >> Currently VMs refuse to to start if a configured isofile becomes unavailable, >> be it a deleted file or an unavailable network storag

Re: [pve-devel] [PATCH qemu-server v3 1/6] fix #4225: qemuserver: drive: add parameter to mark drive required

2025-01-31 Thread Daniel Herzig
hat redundancy. Will be fixed in some v4. > Am 30.01.25 um 12:31 schrieb Daniel Herzig: >> This commit add the parameter `essential` to mark a drive as required >> for booting the VM. >> >> Signed-off-by: Daniel Herzig >> --- >> PVE/QemuServer/Drive.pm | 9 ++

Re: [pve-devel] [PATCH qemu-server v3 2/6] fix #4225: qemuserver: introduce sub eject_nonrequired_isos

2025-01-31 Thread Daniel Herzig
Fiona Ebner writes: > Am 31.01.25 um 10:36 schrieb Fiona Ebner: >> Am 30.01.25 um 12:31 schrieb Daniel Herzig: >>> + >>> +$drive->{essential} = 1 if !defined($drive->{essential}); >> >> This should rather be done when parsing the drive. > &g

[pve-devel] [PATCH 2/8 container] cloudinit: basic implementation

2025-02-10 Thread Daniel Herzig
From: Leo Nunner The code to generate the actual configuration works pretty much the same as with the VM system. We generate an instance ID by hashing the user configuration, causing cloud-init to run every time said configuration changes. Instead of creating a config drive, we write files direc

[pve-devel] [PATCH 6/8 manager] cloudinit: introduce panel for LXCs

2025-02-10 Thread Daniel Herzig
From: Leo Nunner based on the already existing panel for VMs. Some things have been changed, there is no network configuration, and a separate "enable" options toggles cloud-init (simillar to adding/removing a cloud-init drive for VMs). Signed-off-by: Leo Nunner --- www/manager6/Makefile

[pve-devel] [PATCH 3/8 container] cloudinit: add dump command to pct

2025-02-10 Thread Daniel Herzig
From: Leo Nunner Introduce a 'pct cloudinit dump ' command to dump the generated cloudinit configuration for a section. Signed-off-by: Leo Nunner --- src/PVE/API2/LXC.pm | 33 + src/PVE/CLI/pct.pm | 4 src/PVE/LXC/Cloudinit.pm | 11 +++

[pve-devel] [PATCH 8/8 docs] pct: document cloudinit for LXC

2025-02-10 Thread Daniel Herzig
From: Leo Nunner adds documentation for Cloud-Init for containers. Most of it has been taken from the VM documentation, since the configuration mostly works the same. Added a script to extract the cloudinit parameters the same way it's already done for VMs. Signed-off-by: Leo Nunner --- Makefi

[pve-devel] [PATCH 1/8 container] cloudinit: introduce config parameters

2025-02-10 Thread Daniel Herzig
From: Leo Nunner Introduce configuration parameters for cloud-init. Like with VMs, it's possible to specify: - user - password - ssh keys - enable/disable updates on first boot It's also possible to pass through custom config files for the user and vendor settings. We don't allow

[pve-devel] [PATCH 0/8 container/manager/docs] fix #4686: Cloudinit support for LXC

2025-02-10 Thread Daniel Herzig
This series introduces basic cloudinit support for containers. All in all, it works quite similar to VMs, with the caveat that we only allow network configuration through the alrady existing systems, and not via cloud-init. Changes since original patch series from Leo Nunner [0]: * rebased onto cu

[pve-devel] [PATCH 7/8 docs] pct: add script to generate cloudinit options

2025-02-10 Thread Daniel Herzig
From: Leo Nunner …the same way as it's already being done for VMs. Signed-off-by: Leo Nunner --- gen-pct-cloud-init-opts.pl | 16 1 file changed, 16 insertions(+) create mode 100755 gen-pct-cloud-init-opts.pl diff --git a/gen-pct-cloud-init-opts.pl b/gen-pct-cloud-init-opts.

[pve-devel] [PATCH 5/8 manager] cloudinit: rename qemu cloudinit panel

2025-02-10 Thread Daniel Herzig
From: Leo Nunner Signed-off-by: Leo Nunner --- www/manager6/qemu/CloudInit.js | 4 ++-- www/manager6/qemu/Config.js| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js index 0449d810..5c8c3859 100644 --- a/www

[pve-devel] [PATCH 4/8 container] cloudinit: add function dumping options for docs

2025-02-10 Thread Daniel Herzig
From: Leo Nunner Adds a cloudinit_config_properties function which dumps the config parameters from the cloudinit config description. This is called automatically when generating the docs. Signed-off-by: Leo Nunner --- src/PVE/LXC/Config.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git

[pve-devel] [PATCH pve-manager v3 4/6] fix #4225: ui: form: isoselector: add checkbox for 'essential' param

2025-01-30 Thread Daniel Herzig
Add a checkbox for marking an iso file as required for booting via the 'essential' drive parameter. This option is used in the backend to determine if the VM should start up in case the configured ISO file is not available. By default this box is not visible and disabled. Signed-off-

[pve-devel] [PATCH qemu-server v3 0/6] bugzilla #4225 -- improve handling of unavailable ISOs

2025-01-30 Thread Daniel Herzig
@Dano) * shortened code and streamlined code logic (qemu-server, THX @Dano) * reduced changes on testing framework (qemu-server) * reuse existing code for parsing values (pve-manager, THX @Friedrich) * properly html-encode warning messages (pve-manager, THX @Friedrich) qemu-server: Daniel Herzig (3)

[pve-devel] [PATCH pve-manager v3 5/6] fix #4225: ui: qemu: cdedit: enable 'Essential' checkbox for isos

2025-01-30 Thread Daniel Herzig
and the VM will attempt to start, even if the file or underlying storage is not available (by temporarily setting the value to 'none,media=cdrom'). Signed-off-by: Daniel Herzig --- www/manager6/qemu/CDEdit.js | 8 1 file changed, 8 insertions(+) diff --git a/www/manager6/

[pve-devel] [PATCH pve-manager v3 6/6] fix #4225: ui: qemu: hardware: add eject button for cdroms

2025-01-30 Thread Daniel Herzig
This commit adds a button in the hardware view for quickly ejecting unnecessary cdroms or ISO files by setting file to 'none'. Signed-off-by: Daniel Herzig --- www/manager6/qemu/HardwareView.js | 42 +++ 1 file changed, 42 insertions(+) diff --git a/ww

[pve-devel] [PATCH qemu-server v3 2/6] fix #4225: qemuserver: introduce sub eject_nonrequired_isos

2025-01-30 Thread Daniel Herzig
The function `eject_nonrequired_isos` checks on whether a cdrom drive is marked as required for booting the VM or not. If the parameter `essential` is not defined, it will assume `essential` to be true and keep the current behaviour. If `required` is set to 0, the function 'ejects' the ISO file

[pve-devel] [PATCH qemu-server v3 1/6] fix #4225: qemuserver: drive: add parameter to mark drive required

2025-01-30 Thread Daniel Herzig
This commit add the parameter `essential` to mark a drive as required for booting the VM. Signed-off-by: Daniel Herzig --- PVE/QemuServer/Drive.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm index 1041c1dd

[pve-devel] [PATCH qemu-server v3 3/6] fix #4225: qemuserver, test: put eject_nonrequired_isos in place

2025-01-30 Thread Daniel Herzig
ing. * Add testcases for new behaviour triggered by `eject_nonrequired_isos`. Signed-off-by: Daniel Herzig --- PVE/QemuServer.pm | 2 + test/cfg2cmd/ide-required-iso-missing.conf| 12 ++ .../cfg2cmd/ide-required-iso-missing.conf.cmd | 0 .../cfg2cmd/ide-

Re: [pve-devel] [PATCH network 2/4] fix #5900: add helper functions

2024-12-16 Thread Daniel Herzig
Hey Stefan, thanks for the feedback! Stefan Hanreich writes: > > If we do it this way (see top-level discussion), I think we should > abstract this into the IpamPlugins itself, since this implementation is > specific to the PVE Plugin, but that's just one type of IPAM plugin. > Something like:

Re: [pve-devel] [PATCH guest-common 1/4] fix #5900: add helper function

2024-12-16 Thread Daniel Herzig
Hi Stefan, thanks for the feedback. Thanks for hinting at ~PVE::LXC::Config::parse_lxc_network~. I oversaw that and did not want to pull ~PVE::QemuServer::parse_net~ into LXC's deps. Stefan Hanreich writes: > On 12/5/24 17:33, Daniel Herzig wrote: >> This patch adds a small h

[pve-devel] [PATCH storage v2] dirplugin: fix #3986: check for trailing slashes

2024-11-22 Thread Daniel Herzig
Currently, setting up a directory storage with trailing slashes in the path results in log messages with double slashes, if this path gets expanded by an action like vzdump. This patch removes those trailing slashes once the directory storage class config gets updated. Signed-off-by: Daniel

Re: [pve-devel] [PATCH storage v2] dirplugin: fix #3986: check for trailing slashes

2024-11-22 Thread Daniel Herzig
Thomas Lamprecht writes: > Am 22.11.24 um 14:13 schrieb Daniel Herzig: >> diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm >> index fb23e0a..c72c321 100644 >> --- a/src/PVE/Storage/DirPlugin.pm >> +++ b/src/PVE/Storage/DirPlugin.pm >> @@

[pve-devel] [PATCH storage v3] dirplugin: fix #3986: check for trailing slashes

2024-11-22 Thread Daniel Herzig
Currently, setting up a directory storage with trailing slashes in the path results in log messages with double slashes, if this path gets expanded by an action like vzdump. This patch removes those trailing slashes once the directory storage class config gets updated. Signed-off-by: Daniel

Re: [pve-devel] [PATCH container/manager v4 0/3] Show container ip in summary and network tab

2025-01-08 Thread Daniel Herzig
I just tested this series against an alpine container with sdn simple zone dhcp IP assignment and it seems to do what it promises. This makes a very nice streamlined experience with VM behaviour. Tested-by: Daniel Herzig Gabriel Goller writes: > Show the ip/hwaddress of the netw

Re: [pve-devel] [PATCH v2 12/12] ui: qemu: hardware: add eject button for cdroms

2025-01-23 Thread Daniel Herzig
Hi Friedrich, thanks for looking into this, this comes right in time, as I've so far finished v3 of the backend-part. Friedrich Weber writes: > Hi, I have two small things that I noticed skimming the series (inline). > > On 13/01/2025 09:56, Daniel Herzig wrote: >> Ejec

[pve-devel] [PATCH v2 9/12] test: cfg2cmd: add tests for testing the iso required parameter

2025-01-13 Thread Daniel Herzig
-nfs.conf Signed-off-by: Daniel Herzig --- test/cfg2cmd/ide-required-iso-missing.conf| 12 ++ .../cfg2cmd/ide-required-iso-missing.conf.cmd | 0 .../cfg2cmd/ide-required-iso-offline-nfs.conf | 12 ++ .../ide-required-iso-offline-nfs.conf.cmd | 0 test/cfg2cmd/ide-required.conf

[pve-devel] [PATCH v2 4/12] test: chomp all trailing newlines from errors and warnings

2025-01-13 Thread Daniel Herzig
Ease EXPECT_ERROR and EXPECT_WARN string matching with errors/warnings that have more than one trailing newline. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/run_config2command_tests.pl b/test

[pve-devel] [PATCH v2 8/12] test: mock log_warn warnings

2025-01-13 Thread Daniel Herzig
Strip log_warn wrapper for catching warnings on testruns. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 4 1 file changed, 4 insertions(+) diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl index 71b00e9a..8df4f4e8 100755 --- a/test

[pve-devel] [PATCH v2 12/12] ui: qemu: hardware: add eject button for cdroms

2025-01-13 Thread Daniel Herzig
Eject by setting file to none. Signed-off-by: Daniel Herzig --- www/manager6/qemu/HardwareView.js | 43 +++ 1 file changed, 43 insertions(+) diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js index 59e670db..5d1c18a5 100644 --- a/www

[pve-devel] [PATCH v2 1/12] fix #4225: qemuserver: drive: add optional required parameter

2025-01-13 Thread Daniel Herzig
Add parameter to allow for marking a drive as required. Signed-off-by: Daniel Herzig --- PVE/QemuServer/Drive.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm index 7b298454..b816fbec 100644 --- a/PVE/QemuServer

[pve-devel] [PATCH v2 2/12] qemuserver: add helper function for mocking files

2025-01-13 Thread Daniel Herzig
This stub function can be used for mocking a file's existance in testruns. Signed-off-by: Daniel Herzig --- PVE/QemuServer.pm | 5 + 1 file changed, 5 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 5cde94a1..d07c170e 100644 --- a/PVE/QemuServer.pm +++

[pve-devel] [PATCH v2 11/12] fix #4225: ui: qemu: cdedit: enable required checkbox for isos

2025-01-13 Thread Daniel Herzig
Enables the 'required' checkbox for the IsoSelector. If the parameter is not set, the backend will use the default (set to 1). Behaviour: * Only send parameter if not default (required=0) * Checked if parameter is missing (default) * Unchecked when adding a new CD-ROM Signed-off-

[pve-devel] [PATCH v2 7/12] test: mock existing files

2025-01-13 Thread Daniel Herzig
Let all files checked by file_exists appear as existing if the path does not contain the string 'I_DO_NOT_EXIST'. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 4 1 file changed, 4 insertions(+) diff --git a/test/run_config2command_tests

[pve-devel] [PATCH v2 5/12] test: mock cifs-store

2025-01-13 Thread Daniel Herzig
Let cifs-store appear as online to a call from PVE::Storage::activate_storage. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 19 +++ 1 file changed, 19 insertions(+) diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl index

[pve-devel] [PATCH v2 qemu-server, manager 00/12] bugzilla #4225 -- improve handling of unavailable ISOs

2025-01-13 Thread Daniel Herzig
.134466-1-d.her...@proxmox.com/ Changes from initial series: * rebased onto current master * fix cifs mocking in run_config2command_tests.pl * fix expected outcome in ide-required.conf.cmd qemu-server: Daniel Herzig (9): fix #4225: qemuserver: drive: add optional required parameter qemuserver: a

[pve-devel] [PATCH v2 6/12] test: add nfs-offline storage

2025-01-13 Thread Daniel Herzig
Add an nfs-offline storage to allow for comparatative testing against potentially mocked online storages. Signed-off-by: Daniel Herzig --- test/run_config2command_tests.pl | 9 + 1 file changed, 9 insertions(+) diff --git a/test/run_config2command_tests.pl b/test

[pve-devel] [PATCH v2 3/12] fix #4225: qemuserver: add function to eject isofiles

2025-01-13 Thread Daniel Herzig
The function is called while config_to_command iterates over all volumes to allow for early storage activation and early exit in the case of missing required files. Signed-off-by: Daniel Herzig --- PVE/QemuServer.pm | 39 +++ 1 file changed, 39 insertions(+)

[pve-devel] [PATCH v2 10/12] fix #4225: ui: form: isoselector: add optional required checkbox

2025-01-13 Thread Daniel Herzig
Add a checkbox for marking an iso file as required. This option is used in the backend to determine if the VM should start up in case the configured ISO file is not available. By default this box is not visible and disabled. Signed-off-by: Daniel Herzig --- www/manager6/form/IsoSelector.js

Re: [pve-devel] [PATCH qemu-server] api: vmlist: add plugged cpu count to vmlist table

2025-01-13 Thread Daniel Herzig
I just tested this patch and think it gives very valuable information. One thing I noticed, more by chance than intentional -- if the host has a lower cpu-count than the count configured for the VM, the stats will not be updated. E.g. my pve-host only has 2 cores available and if I configure 4 cor

Re: [pve-devel] [PATCH v2 3/12] fix #4225: qemuserver: add function to eject isofiles

2025-01-17 Thread Daniel Herzig
Daniel Kral writes: > On 1/13/25 09:55, Daniel Herzig wrote: >> Current behaviour prevents a VM from starting, if an ISO file defined >> in the configuration becomes unavailable. >> The function eject_nonrequired_isos checks on whether a cdrom drive >> is >> ma

Re: [pve-devel] [PATCH v2 11/12] fix #4225: ui: qemu: cdedit: enable required checkbox for isos

2025-01-17 Thread Daniel Herzig
Daniel Kral writes: > On 1/13/25 09:56, Daniel Herzig wrote: >> Enables the 'required' checkbox for the IsoSelector. >> If the parameter is not set, the backend will use the default (set to >> 1). >> Behaviour: >> * Only send parameter if not defaul

Re: [pve-devel] [PATCH v2 12/12] ui: qemu: hardware: add eject button for cdroms

2025-01-17 Thread Daniel Herzig
Daniel Kral writes: > On 1/13/25 09:56, Daniel Herzig wrote: >> Eject by setting file to none. > > That's a great addition to the WebGUI! > > One small thing: What about also allow ejecting physical CDROMs? :) > Let me think about this :) __

Re: [pve-devel] [PATCH v2 qemu-server, manager 00/12] bugzilla #4225 -- improve handling of unavailable ISOs

2025-01-17 Thread Daniel Herzig
Thanks for this review, this helps a lot on setting up an optimized v3. Daniel Kral writes: > >> If the parameter is set to 0, the configuration will temporarily >> changed to use >> 'none' as file for the cd drive, which allows qemu to start up the machine. >> The configuration is not changed i

Re: [pve-devel] [PATCH v2 2/12] qemuserver: add helper function for mocking files

2025-01-17 Thread Daniel Herzig
Daniel Kral writes: > On 1/13/25 09:55, Daniel Herzig wrote: >> This stub function can be used for mocking a file's existance in testruns. >> Signed-off-by: Daniel Herzig >> --- >> PVE/QemuServer.pm | 5 + >> 1 file changed, 5 insertions(+) &

Re: [pve-devel] [PATCH 1/8 container] cloudinit: introduce config parameters

2025-02-13 Thread Daniel Herzig
Fiona Ebner writes: > Am 10.02.25 um 13:07 schrieb Daniel Herzig: >> From: Leo Nunner >> >> Introduce configuration parameters for cloud-init. Like with VMs, it's >> possible to specify: >> - user >> - password >> - ssh keys >>

Re: [pve-devel] [PATCH 2/8 container] cloudinit: basic implementation

2025-02-13 Thread Daniel Herzig
Mira Limbeck writes: > On 2/13/25 12:01, Fiona Ebner wrote: >> Am 10.02.25 um 13:07 schrieb Daniel Herzig: >>> From: Leo Nunner >>> >> >> @Mira do you know more by chance? > I don't think vendor-data should be part of the instance-id. It's us