[pve-devel] [PATCH pve-container] detect ostype when restoring OpenVZ containers

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Aug 24 14:05:53 CEST 2015


Fixes #692
---
 src/PVE/LXC/Create.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index 9cb52e3..5414883 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -160,6 +160,8 @@ sub restore_and_configure {
 	    print "Please check the configuration and reconfigure the network.\n";
 	    print "###########################################################\n";
 
+	    my $lxc_setup = PVE::LXC::Setup->new($conf, $rootdir); # detect OS
+	    $conf->{ostype} = $lxc_setup->{conf}->{ostype};
 	    my $raw = PVE::Tools::file_get_contents($ovz_cfg_fn);
 	    my $oldconf = PVE::VZDump::ConvertOVZ::convert_ovz($raw);
 	    foreach my $key (keys %$oldconf) {
-- 
2.1.4





More information about the pve-devel mailing list