since we allow to create a container without hostname
(we are using localhost by default then) and hostname
is marked optional in the JSONSchema of the config
we should be able to delete the hostname
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
next;
}
- if ($opt eq 'hostname' || $opt eq 'memory' || $opt eq 'rootfs') {
+ if ($opt eq 'memory' || $opt eq 'rootfs') {
die "unable to delete required option '$opt'\n";
+ } elsif ($opt eq 'hostname') {
+ delete $conf->{$opt};
} elsif ($opt eq 'swap') {
delete $conf->{$opt};
PVE::LXC::write_cgroup_value("memory", $vmid,