Ver 4.1 - LXC support for Fedora 22, Debian stretch/sid, Ubuntu 15.10

Robert Brighton

New Member
Dec 14, 2015
1
0
1
24
Hi

The release announcement for ver 4.1 says that support is available for "LXC: add support for Fedora 22 and Debian stretch/sid, Ubuntu 15.10". I have a new install of 4.1 which has been updated with aptitude and I have updated PVE with "pveam update". The PVE template list does not not show any of these distros in the list. What am I doing wrong / not understanding?

Thanks
 
Hi,

we added support in the sense that we can setup and control such containers but we did not upload templates to our download server (yet).
But yes, it's a bit misleading.

What you can do as a workaround for now is creating a fedora (or other) container with lxc-create:

Code:
lxc-create -t download -n temp
# here select the respective distro/version/arch

mkdir /var/lib/vz/private/temp/etc/vzdump

Now enter a fake CT config to /var/lib/vz/private/temp/etc/vzdump/pct.conf:
Code:
arch: amd64
cpulimit: 1
cpuunits: 1024
hostname: test-restore
memory: 512
ostype: fedora
rootfs: size=8G
swap: 512
(Adapt distro, architecture and other values if you want)

Now make a tar and restore, adapt the pct restore options as necessary.
Code:
tar cpzf lxc-fedora.tar.gz -C /var/lib/vz/private/temp/ .
pct restore 109 lxc-fedora.tar.gz --storage tom_nasi
lxc-destroy -n temp

This is one way, there may be others which are a bit easier/cleaner.
 
Hi,

i got this error, what make i wrong? I tried with Fedora 22, 23 and 24 but the error is the same.

pct restore 300 lxc-fedora.tar.gz --storage ZFS_TEST
vm 0 - unable to parse value of 'rootfs' - format error
volume: property is missing and it is not optional
rootfs configuration could not be recovered, please check and specify manually!

Thank you :)
 
Hi,

to fix the 'rootfs'-format error, you should change the contents of /var/lib/vz/private/temp/etc/vzdump/pct.conf to:
Code:
arch: amd64
cpulimit: 1
cpuunits: 1024
hostname: ferora-24
memory: 512
ostype: fedora
rootfs: local,size=8G
swap: 512

You will also need to update /usr/share/perl5/PVE/LXC/Setup/Fedora.pm if you want to use Fedora-23 or Fedora-24 (Assuming PVE 4.2):
Code:
--- /usr/share/perl5/PVE/LXC/Setup/Fedora.pm.orig   2016-08-05 13:15:46.000000000 +0200
+++ /usr/share/perl5/PVE/LXC/Setup/Fedora.pm   2016-09-01 11:34:01.331043722 +0200
@@ -16,7 +16,7 @@
  my $version;
  if ($release =~ m/release\s+(\d+(?:\.\d+)?)(\.\d+)?/) {
-   if ($1 >= 22 && $1 < 23) {
+   if ($1 >= 22 && $1 < 25) {
    $version = $1;
   }
  }

With best regards,
Tom.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!