* [pve-devel] [PATCH container/manager/qemu-server 0/5] add option to create HA resource upon guest create or restore
@ 2025-10-06 15:52 Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation Michael Köppl
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Michael Köppl @ 2025-10-06 15:52 UTC (permalink / raw)
To: pve-devel
This patch series aims to make the creation of a HA resource for a new
or restored guest easier for users by adding a parameter to the API that
allows adding the guest as a HA resource right away. In the web GUI, a
checkbox is added to the CreateWizard and Restore dialogs. Note that
the state of the resulting HA resource will match the value of the
'start' parameter, i.e. if 'Start after creation' is set to true, the
state of the resource will be 'started', otherwise 'stopped'. This is
done to avoid unexpected behavior for users, where 'Start after
creation' was set to false, but the default 'started' state of the HA
resource would start the VM anyway.
qemu-server:
Michael Köppl (1):
api: create/store: allow adding VM as HA resource after creation
src/PVE/API2/Qemu.pm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
pve-container:
Michael Köppl (1):
api: create/store: allow adding CT as HA resource after creation
src/PVE/API2/LXC.pm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
pve-manager:
Michael Köppl (3):
qemu: create: add checkbox for creating HA resource upon VM creation
lxc: create: add checkbox for creating HA resource upon CT creation
ui: restore: add checkbox for adding HA resource upon restore of guest
www/manager6/lxc/CreateWizard.js | 17 ++++++++++++++---
www/manager6/qemu/CreateWizard.js | 17 ++++++++++++++---
www/manager6/window/Restore.js | 12 ++++++++++++
3 files changed, 40 insertions(+), 6 deletions(-)
Summary over all repositories:
5 files changed, 81 insertions(+), 6 deletions(-)
--
Generated by git-murpp 0.8.0
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation
2025-10-06 15:52 [pve-devel] [PATCH container/manager/qemu-server 0/5] add option to create HA resource upon guest create or restore Michael Köppl
@ 2025-10-06 15:52 ` Michael Köppl
2025-10-06 17:23 ` Thomas Lamprecht
2025-10-06 17:24 ` Thomas Lamprecht
2025-10-06 15:52 ` [pve-devel] [PATCH container 1/1] api: create/store: allow adding CT " Michael Köppl
` (3 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: Michael Köppl @ 2025-10-06 15:52 UTC (permalink / raw)
To: pve-devel
Extend the creation and restore actions with a 'ha-managed' parameter
that, if enabled, will also add the VM as a new HA resource. The 'state'
parameter for this new resource will match the value of the 'start'
parameter used during creation of the VM, such that the resulting state
of the resource and VM both match the user's expectation (avoid
situation where user creates a VM, does not select 'Start after
creation', but the default 'started' state of the resource would start
the VM anyway).
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
src/PVE/API2/Qemu.pm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 7fced6c6..71bedc1e 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -1170,6 +1170,12 @@ __PACKAGE__->register_method({
default => 0,
description => "Start VM after it was created successfully.",
},
+ 'ha-managed' => {
+ optional => 1,
+ type => 'boolean',
+ default => 0,
+ description => "Add the VM as a HA resource after it was created.",
+ },
'import-working-storage' => get_standard_option(
'pve-storage-id',
{
@@ -1204,6 +1210,7 @@ __PACKAGE__->register_method({
my $force = extract_param($param, 'force');
my $pool = extract_param($param, 'pool');
my $start_after_create = extract_param($param, 'start');
+ my $ha_managed = extract_param($param, 'ha-managed');
my $storage = extract_param($param, 'storage');
my $unique = extract_param($param, 'unique');
my $live_restore = extract_param($param, 'live-restore');
@@ -1380,6 +1387,15 @@ __PACKAGE__->register_method({
eval { PVE::API2::Qemu->vm_start({ vmid => $vmid, node => $node }) };
warn $@ if $@;
}
+
+ if ($ha_managed) {
+ print "Add as HA resource\n";
+ my $state = $start_after_create ? 'started' : 'stopped';
+ eval {
+ PVE::API2::HA::Resources->create({ sid => "vm:$vmid", state => $state });
+ };
+ warn $@ if $@;
+ }
};
my $createfn = sub {
@@ -1463,6 +1479,15 @@ __PACKAGE__->register_method({
PVE::QemuConfig->lock_config_full($vmid, 1, $realcmd);
+ if ($ha_managed) {
+ print "Add as HA resource\n";
+ my $state = $start_after_create ? 'started' : 'stopped';
h
+ eval {
+ PVE::API2::HA::Resources->create({ sid => "vm:$vmid", state => $state });
+ };
+ warn $@ if $@;
+ }
+
if ($start_after_create && !$live_restore) {
print "Execute autostart\n";
eval { PVE::API2::Qemu->vm_start({ vmid => $vmid, node => $node }) };
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [pve-devel] [PATCH container 1/1] api: create/store: allow adding CT as HA resource after creation
2025-10-06 15:52 [pve-devel] [PATCH container/manager/qemu-server 0/5] add option to create HA resource upon guest create or restore Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation Michael Köppl
@ 2025-10-06 15:52 ` Michael Köppl
2025-10-06 17:22 ` [pve-devel] applied: " Thomas Lamprecht
2025-10-06 15:52 ` [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation Michael Köppl
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Michael Köppl @ 2025-10-06 15:52 UTC (permalink / raw)
To: pve-devel
Extend the creation and restore actions with a 'ha-managed' parameter
that, if enabled, will also add the CT as a new HA resource. The 'state'
parameter for this new resource will match the value of the 'start'
parameter used during creation of the CT, such that the resulting state
of the resource and CT both match the user's expectation (avoid
situation where user creates a CT, does not select 'Start after
creation', but the default 'started' state of the resource would start
the CT anyway).
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
src/PVE/API2/LXC.pm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 37b9d055..e53b388d 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -218,6 +218,12 @@ __PACKAGE__->register_method({
default => 0,
description => "Start the CT after its creation finished successfully.",
},
+ 'ha-managed' => {
+ optional => 1,
+ type => 'boolean',
+ default => 0,
+ description => "Add the CT as a HA resource after it was created.",
+ },
}),
},
returns => {
@@ -236,6 +242,7 @@ __PACKAGE__->register_method({
my $ignore_unpack_errors = extract_param($param, 'ignore-unpack-errors');
my $bwlimit = extract_param($param, 'bwlimit');
my $start_after_create = extract_param($param, 'start');
+ my $ha_managed = extract_param($param, 'ha-managed');
my $basecfg_fn = PVE::LXC::Config->config_file($vmid);
my $same_container_exists = -f $basecfg_fn;
@@ -616,6 +623,15 @@ __PACKAGE__->register_method({
} elsif ($start_after_create) {
PVE::API2::LXC::Status->vm_start({ vmid => $vmid, node => $node });
}
+
+ if ($ha_managed) {
+ print "Add as HA resource\n";
+ my $state = $start_after_create ? 'started' : 'stopped';
+ eval {
+ PVE::API2::HA::Resources->create({ sid => "ct:$vmid", state => $state });
+ };
+ warn $@ if $@;
+ }
};
return $rpcenv->fork_worker($workername, $vmid, $authuser, $realcmd);
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation
2025-10-06 15:52 [pve-devel] [PATCH container/manager/qemu-server 0/5] add option to create HA resource upon guest create or restore Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH container 1/1] api: create/store: allow adding CT " Michael Köppl
@ 2025-10-06 15:52 ` Michael Köppl
2025-10-06 17:29 ` Thomas Lamprecht
2025-10-06 15:52 ` [pve-devel] [PATCH manager 2/3] lxc: create: add checkbox for creating HA resource upon CT creation Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH manager 3/3] ui: restore: add checkbox for adding HA resource upon restore of guest Michael Köppl
4 siblings, 1 reply; 14+ messages in thread
From: Michael Köppl @ 2025-10-06 15:52 UTC (permalink / raw)
To: pve-devel
The new checkbox allows users to create a HA resource for the VM right
away. The 'state' of the HA resource will match the value of the "Start
after creation" checkbox.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
www/manager6/qemu/CreateWizard.js | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
index a10b9c0af..6ef70c366 100644
--- a/www/manager6/qemu/CreateWizard.js
+++ b/www/manager6/qemu/CreateWizard.js
@@ -255,11 +255,22 @@ Ext.define('PVE.qemu.CreateWizard', {
],
dockedItems: [
{
- xtype: 'proxmoxcheckbox',
- name: 'start',
+ xtype: 'container',
dock: 'bottom',
+ border: false,
margin: '5 0 0 0',
- boxLabel: gettext('Start after created'),
+ items: [
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'start',
+ boxLabel: gettext('Start after created'),
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'ha-managed',
+ boxLabel: gettext('Add as HA resource'),
+ },
+ ],
},
],
listeners: {
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [pve-devel] [PATCH manager 2/3] lxc: create: add checkbox for creating HA resource upon CT creation
2025-10-06 15:52 [pve-devel] [PATCH container/manager/qemu-server 0/5] add option to create HA resource upon guest create or restore Michael Köppl
` (2 preceding siblings ...)
2025-10-06 15:52 ` [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation Michael Köppl
@ 2025-10-06 15:52 ` Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH manager 3/3] ui: restore: add checkbox for adding HA resource upon restore of guest Michael Köppl
4 siblings, 0 replies; 14+ messages in thread
From: Michael Köppl @ 2025-10-06 15:52 UTC (permalink / raw)
To: pve-devel
The new checkbox allows users to create a HA resource for the CT right
away. The 'state' of the HA resource will match the value of the "Start
after creation" checkbox.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
www/manager6/lxc/CreateWizard.js | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index 0f6fcce8d..f08df2225 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -275,11 +275,22 @@ Ext.define('PVE.lxc.CreateWizard', {
],
dockedItems: [
{
- xtype: 'proxmoxcheckbox',
- name: 'start',
+ xtype: 'container',
dock: 'bottom',
+ border: false,
margin: '5 0 0 0',
- boxLabel: gettext('Start after created'),
+ items: [
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'start',
+ boxLabel: gettext('Start after created'),
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'ha-managed',
+ boxLabel: gettext('Add as HA resource'),
+ },
+ ],
},
],
listeners: {
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [pve-devel] [PATCH manager 3/3] ui: restore: add checkbox for adding HA resource upon restore of guest
2025-10-06 15:52 [pve-devel] [PATCH container/manager/qemu-server 0/5] add option to create HA resource upon guest create or restore Michael Köppl
` (3 preceding siblings ...)
2025-10-06 15:52 ` [pve-devel] [PATCH manager 2/3] lxc: create: add checkbox for creating HA resource upon CT creation Michael Köppl
@ 2025-10-06 15:52 ` Michael Köppl
4 siblings, 0 replies; 14+ messages in thread
From: Michael Köppl @ 2025-10-06 15:52 UTC (permalink / raw)
To: pve-devel
Matching the checkbox in the CreateWizard dialogs for VMs and CTs, add
the option to create a HA resource when restoring a guest.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
www/manager6/window/Restore.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
index 690116df6..e3155f52d 100644
--- a/www/manager6/window/Restore.js
+++ b/www/manager6/window/Restore.js
@@ -41,6 +41,9 @@ Ext.define('PVE.window.Restore', {
if (values.start && !values['live-restore']) {
params.start = 1;
}
+ if (values['ha-managed']) {
+ params['ha-managed'] = 1;
+ }
if (values['live-restore']) {
params['live-restore'] = 1;
}
@@ -240,6 +243,15 @@ Ext.define('PVE.window.Restore', {
labelWidth: 105,
checked: false,
},
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'ha-managed',
+ reference: 'ha-managed',
+ flex: 1,
+ fieldLabel: gettext('Add as HA resource'),
+ labelWidth: 120,
+ checked: false,
+ },
],
},
];
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* [pve-devel] applied: [PATCH container 1/1] api: create/store: allow adding CT as HA resource after creation
2025-10-06 15:52 ` [pve-devel] [PATCH container 1/1] api: create/store: allow adding CT " Michael Köppl
@ 2025-10-06 17:22 ` Thomas Lamprecht
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Lamprecht @ 2025-10-06 17:22 UTC (permalink / raw)
To: pve-devel, Michael Köppl
On Mon, 06 Oct 2025 17:52:30 +0200, Michael Köppl wrote:
> Extend the creation and restore actions with a 'ha-managed' parameter
> that, if enabled, will also add the CT as a new HA resource. The 'state'
> parameter for this new resource will match the value of the 'start'
> parameter used during creation of the CT, such that the resulting state
> of the resource and CT both match the user's expectation (avoid
> situation where user creates a CT, does not select 'Start after
> creation', but the default 'started' state of the resource would start
> the CT anyway).
>
> [...]
Applied, thanks!
btw. good idea with combining the existing start-after-creation to figure out
the initial HA request-state!
[1/1] api: create/store: allow adding CT as HA resource after creation
commit: 33696bd8a45f22b7a3844ea221a2733379876c36
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation
2025-10-06 15:52 ` [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation Michael Köppl
@ 2025-10-06 17:23 ` Thomas Lamprecht
2025-10-06 17:24 ` Thomas Lamprecht
1 sibling, 0 replies; 14+ messages in thread
From: Thomas Lamprecht @ 2025-10-06 17:23 UTC (permalink / raw)
To: Proxmox VE development discussion, Michael Köppl
Am 06.10.25 um 17:52 schrieb Michael Köppl:
> Extend the creation and restore actions with a 'ha-managed' parameter
> that, if enabled, will also add the VM as a new HA resource. The 'state'
> parameter for this new resource will match the value of the 'start'
> parameter used during creation of the VM, such that the resulting state
> of the resource and VM both match the user's expectation (avoid
> situation where user creates a VM, does not select 'Start after
> creation', but the default 'started' state of the resource would start
> the VM anyway).
>
> Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
> ---
> src/PVE/API2/Qemu.pm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
> index 7fced6c6..71bedc1e 100644
> --- a/src/PVE/API2/Qemu.pm
> +++ b/src/PVE/API2/Qemu.pm
> @@ -1170,6 +1170,12 @@ __PACKAGE__->register_method({
> default => 0,
> description => "Start VM after it was created successfully.",
> },
> + 'ha-managed' => {
> + optional => 1,
> + type => 'boolean',
> + default => 0,
> + description => "Add the VM as a HA resource after it was created.",
> + },
> 'import-working-storage' => get_standard_option(
> 'pve-storage-id',
> {
> @@ -1204,6 +1210,7 @@ __PACKAGE__->register_method({
> my $force = extract_param($param, 'force');
> my $pool = extract_param($param, 'pool');
> my $start_after_create = extract_param($param, 'start');
> + my $ha_managed = extract_param($param, 'ha-managed');
> my $storage = extract_param($param, 'storage');
> my $unique = extract_param($param, 'unique');
> my $live_restore = extract_param($param, 'live-restore');
> @@ -1380,6 +1387,15 @@ __PACKAGE__->register_method({
> eval { PVE::API2::Qemu->vm_start({ vmid => $vmid, node => $node }) };
> warn $@ if $@;
> }
> +
> + if ($ha_managed) {
> + print "Add as HA resource\n";
> + my $state = $start_after_create ? 'started' : 'stopped';
> + eval {
> + PVE::API2::HA::Resources->create({ sid => "vm:$vmid", state => $state });
> + };
> + warn $@ if $@;
> + }
> };
>
> my $createfn = sub {
> @@ -1463,6 +1479,15 @@ __PACKAGE__->register_method({
>
> PVE::QemuConfig->lock_config_full($vmid, 1, $realcmd);
>
> + if ($ha_managed) {
> + print "Add as HA resource\n";
> + my $state = $start_after_create ? 'started' : 'stopped';
> h
^- seems somebody edited the patch on send by mistake ;)
> + eval {
> + PVE::API2::HA::Resources->create({ sid => "vm:$vmid", state => $state });
> + };
> + warn $@ if $@;
> + }
> +
> if ($start_after_create && !$live_restore) {
> print "Execute autostart\n";
> eval { PVE::API2::Qemu->vm_start({ vmid => $vmid, node => $node }) };
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation
2025-10-06 15:52 ` [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation Michael Köppl
2025-10-06 17:23 ` Thomas Lamprecht
@ 2025-10-06 17:24 ` Thomas Lamprecht
1 sibling, 0 replies; 14+ messages in thread
From: Thomas Lamprecht @ 2025-10-06 17:24 UTC (permalink / raw)
To: pve-devel, Michael Köppl
On Mon, 06 Oct 2025 17:52:29 +0200, Michael Köppl wrote:
> Extend the creation and restore actions with a 'ha-managed' parameter
> that, if enabled, will also add the VM as a new HA resource. The 'state'
> parameter for this new resource will match the value of the 'start'
> parameter used during creation of the VM, such that the resulting state
> of the resource and VM both match the user's expectation (avoid
> situation where user creates a VM, does not select 'Start after
> creation', but the default 'started' state of the resource would start
> the VM anyway).
>
> [...]
Applied after unbreaking the patch by deleting the extra line that snuck in,
thanks!
[1/1] api: create/store: allow adding VM as HA resource after creation
commit: 14823177f52aa46533d697ac2d6171a9113ed954
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation
2025-10-06 15:52 ` [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation Michael Köppl
@ 2025-10-06 17:29 ` Thomas Lamprecht
2025-10-07 9:52 ` Michael Köppl
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Lamprecht @ 2025-10-06 17:29 UTC (permalink / raw)
To: Proxmox VE development discussion, Michael Köppl
Am 06.10.25 um 17:52 schrieb Michael Köppl:
> The new checkbox allows users to create a HA resource for the VM right
> away. The 'state' of the HA resource will match the value of the "Start
> after creation" checkbox.
The idea for the start-after-create is that it's only affecting
run state, but no config and is often decided last, that's why I
put that flag in the docked section of the wizard.
Adding to HA affects a config, not just runtime state, and it
probably is often decided upfront if a guest should be HA or
not; so that option *might* better fit into the general section,
would also avoid making the docked section to crowded.
And then it might be also nice to show "HA Managed: Yes" in the
summary grid of the confirmation step.
What do you think?
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation
2025-10-06 17:29 ` Thomas Lamprecht
@ 2025-10-07 9:52 ` Michael Köppl
2025-10-07 10:26 ` Thomas Lamprecht
0 siblings, 1 reply; 14+ messages in thread
From: Michael Köppl @ 2025-10-07 9:52 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox VE development discussion
On Mon Oct 6, 2025 at 7:29 PM CEST, Thomas Lamprecht wrote:
> Am 06.10.25 um 17:52 schrieb Michael Köppl:
>> The new checkbox allows users to create a HA resource for the VM right
>> away. The 'state' of the HA resource will match the value of the "Start
>> after creation" checkbox.
>
> The idea for the start-after-create is that it's only affecting
> run state, but no config and is often decided last, that's why I
> put that flag in the docked section of the wizard.
>
> Adding to HA affects a config, not just runtime state, and it
> probably is often decided upfront if a guest should be HA or
> not; so that option *might* better fit into the general section,
> would also avoid making the docked section to crowded.
>
> And then it might be also nice to show "HA Managed: Yes" in the
> summary grid of the confirmation step.
>
> What do you think?
Thanks for the feedback! I'm a bit conflicted regarding this one. The
reason I thought it might fit better into the Confirm section is that,
while it does affect *a* config, it does not affect the config of the
VM/CT (and I don't think it should). That's also why I thought
displaying the value of ha-managed in the summary grid might be a bit
misleading, since this value will not be in the VM's/CT's config. But
it might also be that my mental model of this dialog is too strict in
assuming that everything that comes before the Confirm step is strictly
related to the config of the guest?
I would of course be open to moving the checkbox, just wanted to provide
some rationale for why I put it there. If I moved it, I think it would
make sense to move it to the Advanced section of the General tab?
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation
2025-10-07 9:52 ` Michael Köppl
@ 2025-10-07 10:26 ` Thomas Lamprecht
2025-10-07 11:46 ` Michael Köppl
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Lamprecht @ 2025-10-07 10:26 UTC (permalink / raw)
To: Michael Köppl, Proxmox VE development discussion
Am 07.10.25 um 11:52 schrieb Michael Köppl:
> On Mon Oct 6, 2025 at 7:29 PM CEST, Thomas Lamprecht wrote:
>> Am 06.10.25 um 17:52 schrieb Michael Köppl:
>>> The new checkbox allows users to create a HA resource for the VM right
>>> away. The 'state' of the HA resource will match the value of the "Start
>>> after creation" checkbox.
>>
>> The idea for the start-after-create is that it's only affecting
>> run state, but no config and is often decided last, that's why I
>> put that flag in the docked section of the wizard.
>>
>> Adding to HA affects a config, not just runtime state, and it
>> probably is often decided upfront if a guest should be HA or
>> not; so that option *might* better fit into the general section,
>> would also avoid making the docked section to crowded.
>>
>> And then it might be also nice to show "HA Managed: Yes" in the
>> summary grid of the confirmation step.
>>
>> What do you think?
>
> Thanks for the feedback! I'm a bit conflicted regarding this one. The
> reason I thought it might fit better into the Confirm section is that,
> while it does affect *a* config, it does not affect the config of the
> VM/CT (and I don't think it should). That's also why I thought
> displaying the value of ha-managed in the summary grid might be a bit
> misleading, since this value will not be in the VM's/CT's config. But
> it might also be that my mental model of this dialog is too strict in
> assuming that everything that comes before the Confirm step is strictly
> related to the config of the guest?
While it might not end up in the guest config directly, for one we still
show the HA status in the guest summary panel and having HA enabled changes
start/stop/migrate/.. behavior, i.e. it's an essential part of the guest.
For another, there already is a pre-existing key that is similar, i.e. the
nodename. The node won't get into the config, but we allow selection for
it in the general settings page and we also show it in the summary for
the create configuration (which we do not name "config summary" or the
like), as it's also central part of the guest and can affect the guest
and the resources available to it, again unlike a single one time action
like "start after creation". VMID is also similar, as is the resource
pool, so I there already a few exceptions to much here as for that this
has to be strictly considered as "summary for what will be saved into
the guest config directly".
> I would of course be open to moving the checkbox, just wanted to provide
> some rationale for why I put it there. If I moved it, I think it would
> make sense to move it to the Advanced section of the General tab?
For now it could indeed live in the advanced section, but HA is central
enough that it also could be fine to add it to the standard section;
but no hard feelings here, especially as this is easier to change
without "disruption" of usage patterns from the users POV, as e.g. moving
it from advanced to the standard section would still keep the setting on
the same page in any case.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation
2025-10-07 10:26 ` Thomas Lamprecht
@ 2025-10-07 11:46 ` Michael Köppl
2025-10-07 12:42 ` Michael Köppl
0 siblings, 1 reply; 14+ messages in thread
From: Michael Köppl @ 2025-10-07 11:46 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox VE development discussion
On Tue Oct 7, 2025 at 12:26 PM CEST, Thomas Lamprecht wrote:
> Am 07.10.25 um 11:52 schrieb Michael Köppl:
>> On Mon Oct 6, 2025 at 7:29 PM CEST, Thomas Lamprecht wrote:
>>> Am 06.10.25 um 17:52 schrieb Michael Köppl:
>>>> The new checkbox allows users to create a HA resource for the VM right
>>>> away. The 'state' of the HA resource will match the value of the "Start
>>>> after creation" checkbox.
>>>
>>> The idea for the start-after-create is that it's only affecting
>>> run state, but no config and is often decided last, that's why I
>>> put that flag in the docked section of the wizard.
>>>
>>> Adding to HA affects a config, not just runtime state, and it
>>> probably is often decided upfront if a guest should be HA or
>>> not; so that option *might* better fit into the general section,
>>> would also avoid making the docked section to crowded.
>>>
>>> And then it might be also nice to show "HA Managed: Yes" in the
>>> summary grid of the confirmation step.
>>>
>>> What do you think?
>>
>> Thanks for the feedback! I'm a bit conflicted regarding this one. The
>> reason I thought it might fit better into the Confirm section is that,
>> while it does affect *a* config, it does not affect the config of the
>> VM/CT (and I don't think it should). That's also why I thought
>> displaying the value of ha-managed in the summary grid might be a bit
>> misleading, since this value will not be in the VM's/CT's config. But
>> it might also be that my mental model of this dialog is too strict in
>> assuming that everything that comes before the Confirm step is strictly
>> related to the config of the guest?
>
> While it might not end up in the guest config directly, for one we still
> show the HA status in the guest summary panel and having HA enabled changes
> start/stop/migrate/.. behavior, i.e. it's an essential part of the guest.
> For another, there already is a pre-existing key that is similar, i.e. the
> nodename. The node won't get into the config, but we allow selection for
> it in the general settings page and we also show it in the summary for
> the create configuration (which we do not name "config summary" or the
> like), as it's also central part of the guest and can affect the guest
> and the resources available to it, again unlike a single one time action
> like "start after creation". VMID is also similar, as is the resource
> pool, so I there already a few exceptions to much here as for that this
> has to be strictly considered as "summary for what will be saved into
> the guest config directly".
I understand, thanks for the detailed insight!
>
>> I would of course be open to moving the checkbox, just wanted to provide
>> some rationale for why I put it there. If I moved it, I think it would
>> make sense to move it to the Advanced section of the General tab?
>
> For now it could indeed live in the advanced section, but HA is central
> enough that it also could be fine to add it to the standard section;
> but no hard feelings here, especially as this is easier to change
> without "disruption" of usage patterns from the users POV, as e.g. moving
> it from advanced to the standard section would still keep the setting on
> the same page in any case.
Ack, I'll send a v2 with just the pve-manager patches. Thanks again for
the feedback!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation
2025-10-07 11:46 ` Michael Köppl
@ 2025-10-07 12:42 ` Michael Köppl
0 siblings, 0 replies; 14+ messages in thread
From: Michael Köppl @ 2025-10-07 12:42 UTC (permalink / raw)
To: Proxmox VE development discussion, Thomas Lamprecht; +Cc: pve-devel
On Tue Oct 7, 2025 at 1:46 PM CEST, Michael Köppl wrote:
> Ack, I'll send a v2 with just the pve-manager patches. Thanks again for
> the feedback!
Sent a v2 with the updated pve-manager patches:
https://lore.proxmox.com/pve-devel/20251007124131.145665-1-m.koeppl@proxmox.com
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-10-07 12:42 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-06 15:52 [pve-devel] [PATCH container/manager/qemu-server 0/5] add option to create HA resource upon guest create or restore Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH qemu-server 1/1] api: create/store: allow adding VM as HA resource after creation Michael Köppl
2025-10-06 17:23 ` Thomas Lamprecht
2025-10-06 17:24 ` Thomas Lamprecht
2025-10-06 15:52 ` [pve-devel] [PATCH container 1/1] api: create/store: allow adding CT " Michael Köppl
2025-10-06 17:22 ` [pve-devel] applied: " Thomas Lamprecht
2025-10-06 15:52 ` [pve-devel] [PATCH manager 1/3] qemu: create: add checkbox for creating HA resource upon VM creation Michael Köppl
2025-10-06 17:29 ` Thomas Lamprecht
2025-10-07 9:52 ` Michael Köppl
2025-10-07 10:26 ` Thomas Lamprecht
2025-10-07 11:46 ` Michael Köppl
2025-10-07 12:42 ` Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH manager 2/3] lxc: create: add checkbox for creating HA resource upon CT creation Michael Köppl
2025-10-06 15:52 ` [pve-devel] [PATCH manager 3/3] ui: restore: add checkbox for adding HA resource upon restore of guest Michael Köppl
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.