check if the given mpX already exists in the config. if it does, then
skip hotplugging and write the changes to [pve:pending] for the next
reboot of CT.
after rebooting the CT, the preexisting mpX will be added as unused and
the mpX will be mounted.
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
die "skip\n";
}
+ if (exists($conf->{$opt})) {
+ die "skip\n"; # don't try to hotplug over existing mp
+ }
+
$class->apply_pending_mountpoint($vmid, $conf, $opt, $storecfg, 1);
# apply_pending_mountpoint modifies the value if it creates a new disk
$value = $conf->{pending}->{$opt};