From: Wolfgang Bumiller Date: Thu, 1 Oct 2015 08:58:31 +0000 (+0200) Subject: move nohotplug error to after disk-creation X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=694c25df72fb6d1fc728d21fe857bca279b734d3;hp=69202f719e1c437b9d8f079f64196a3ff4679ff3;p=pve-container.git move nohotplug error to after disk-creation Added a reminder comment... --- 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 {