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) {
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 {