creating a lxc container from scratch

gimpbully

Member
Aug 7, 2015
21
0
21
So I have a tar of a chroot we use in our own provisioning system. Just a straight up tar of an OS that get pxe'd out. I'm trying to take that and use it as a template for an lxc container I'm building. When I run pct, I get:

[...]
Total bytes read: 1234728960 (1.2GiB, 107MiB/s)
Detected container architecture: amd64
unable to detect OS disribution


I've tried modifying the /etc/issue in the chroot from:
\S
Kernel \r on an \m

to:
Red Hat Enterprise Linux
Kernel 3.10.0-123.4.2.el7.x86_64 on an x86_64

to no avail. Is there any way to tell pct what distro I'm using? I'm sure this isn't exactly a supported operation, but I'm trying to wrap my head around the internals here. Obviously this is VE 4 Beta 1. command used:
pct create 101 rhel-7.x64.tar.gz -description rhel7 -disk 4 -hostname rhel7 -memory 512 -nameserver 8.8.8.8 -net0 hwaddr=52:4A:5E:26:58:D7,ip=192.168.1.3/16,gw=192.168.1.1,bridge=vmbr0 -storage rhea-proxmox -password blahblah
 
Scientific Linux release 7.1 (Nitrogen)I got a little further and messed with /usr/share/perl5/PVE/LXCSetup/Redhat.pm to allow for 7.1. I've got it starting and letting me log into the container with 'lxc-start -F --name 100', but I can't get anything going via the GUI (I can start it, the container starts, but I can't get anything at the console... It's almost like there's no entry point or something... I really don't know enough about lxc to debug further.
 
I actually got just a bit further. using lxc-start -F, I was able to wedge an ifcfg-eth0 onto the container and enable sshd, so I can confirm that starting via the gui does start the container and all networking works, but I'm still not getting any console.
 
I actually got just a bit further. using lxc-start -F, I was able to wedge an ifcfg-eth0 onto the container and enable sshd, so I can confirm that starting via the gui does start the container and all networking works, but I'm still not getting any console.
Hi,
only a shot in the dark, because I'm never tried LXC yet.

Perhaps the same reason like on OpenVZ? http://pve.proxmox.com/wiki/OpenVZ_Console


Udo
 

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!