[pve-devel] [PATCH v2 container 3/6] split up create_rootfs and restore_and_configure
Dietmar Maurer
dietmar at proxmox.com
Wed Jun 1 07:40:44 CEST 2016
comments inline
> +sub write_config_file {
this name is confusing, because this sub has a big side
effect (destroy old container volumes).
> + my ($storage_cfg, $vmid, $conf, $restore) = @_;
>
> my $config_fn = PVE::LXC::Config->config_file($vmid);
> if (-f $config_fn) {
> @@ -200,21 +191,11 @@ sub create_rootfs {
>
> my $old_conf = PVE::LXC::Config->load_config($vmid);
>
> - # destroy old container volume
> + # destroy old container volumes
> PVE::LXC::destroy_lxc_container($storage_cfg, $vmid, $old_conf);
Can we avoid to delete the container config file, and instead write an empty
one?
> }
>
> PVE::LXC::Config->write_config($vmid, $conf);
More information about the pve-devel
mailing list