From 694c25df72fb6d1fc728d21fe857bca279b734d3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 1 Oct 2015 10:58:31 +0200 Subject: [PATCH] move nohotplug error to after disk-creation Added a reminder comment... --- src/PVE/LXC.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 1b27f34..bc71163 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1312,10 +1312,6 @@ sub update_pct_config { write_config($vmid, $conf) if $running; } - if ($running && scalar(@nohotplug)) { - die "unable to modify " . join(',', @nohotplug) . " while container is running\n"; - } - if (@deleted_volumes) { my $storage_cfg = PVE::Storage::config(); foreach my $volume (@deleted_volumes) { @@ -1327,6 +1323,11 @@ sub update_pct_config { my $storage_cfg = PVE::Storage::config(); create_disks($storage_cfg, $vmid, $conf, $conf); } + + # This should be the last thing we do here + if ($running && scalar(@nohotplug)) { + die "unable to modify " . join(',', @nohotplug) . " while container is running\n"; + } } sub has_dev_console { -- 2.39.2