}
my $conf = {};
-
+ my $ovs;
+
if ($restore) {
- $conf = PVE::LXCCreate::recover_config($archive);
+ ($conf, $ovs) = PVE::LXCCreate::recover_config($archive);
PVE::LXC::lxc_config_change_vmid($conf, $vmid);
}
PVE::Cluster::check_cfs_quorum();
$param->{disk} = $conf->{'pve.disksize'} if !$param->{disk} && $restore;
-
+ if($ovs) {
+ print "###########################################################\n";
+ print "Converting OpenVZ configuration to LXC.\n";
+ print "Please check the configuration and reconfigure the network.\n";
+ print "###########################################################\n";
+ }
PVE::LXCCreate::create_rootfs($storage_cfg, $storage, $param->{disk}, $vmid, $conf,
$archive, $password, $restore);
};
my $conf_file = tar_archive_search_conf($archive);
+ my $ovs;
my $raw = '';
my $out = sub {
my $output = shift;
delete $conf->{snapshots};
} elsif ($conf_file =~ m/vps\.conf/) {
-
+ $ovs = 1;
$conf = PVE::VZDump::ConvertOVZ::convert_ovz($raw);
} else {
die "internal error";
}
- return $conf;
+ return $conf, $ovs;
}
sub restore_and_configure {
sub convert_ovz {
my ($raw) = @_;
- print "###########################################################\n";
- print "Converting OpenVZ configuration to LXC.\n";
- print "Please check the configuration and reconfigure the network.\n";
- print "###########################################################\n";
-
my $conf = {};
my $ovz_conf = &$parse_ovz_config($raw);