architecture and os type are not being set for LXC

kkasberg

Active Member
Oct 7, 2015
6
0
41
When I install an LXC container I am getting the following error when trying to start it.

Code:
[COLOR=#000000][FONT=tahoma]TASK ERROR: missing 'arch' - internal error at /usr/share/perl5/PVE/LXC.pm line 1029.[/FONT][/COLOR]

For some reason it looks like the arch type is not getting assigned as well as the OS Type.
 
Did you restore that LXC container from an OpenVZ one? That leads sometimes to problems where the correct type can not be detected.
Or whats the template you are using?

You can edit the container config file in /etc/pve/nodes/<nodename>/lxc/<VMID>.conf ( /etc/pve/lxc is a symlink to the local lxc directory, so you can use this one also).
Add (or edit if already there) a
arch: amd64 or i386
ostype: archlinux or centos or debian or ubuntu

line, and your should be good to go.
 
I am now getting the following error. I restored the storage location after a proxmox re-install, but I deleted the templates, and re-downloaded them.

lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 346 To get more details, run the container in foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
TASK OK

my config:

cpulimit: 1
cpuunits: 1024
hostname: host-monitor
arch: amd64
ostype: ubuntu
memory: 768
net0: bridge=vmbr2,hwaddr=aa:3f:b5:53:3a:16,name=eth0,type=veth
rootfs: zfs:subvol-100-disk-1,size=10G
swap: 512
 
Gentlemen,

I don't want to hijack this thread but, I believe I'm having the exact same issue the OP is experiencing. As the OP hasn't responded I'll provide the results of dietmar's request from my system.


root@vm1:/etc/pve/nodes/vm1/lxc# cat 1004.conf
arch: amd64
cpulimit: 4
cpuunits: 1024
hostname: baruwa
memory: 8192
net0: bridge=vmbr0,gw=x.x.x.x,hwaddr=36:34:65:32:63:30,ip=x.x.x.x/26,name=eth0,type=veth
ostype: centos
rootfs: vm-store:1004/vm-1004-disk-1.raw,size=64G
swap: 4096

root@vm1:/etc/pve/nodes/vm1/lxc# lxc-start -n 1004 -F
unable to detect OS disribution
lxc-start: conf.c: run_buffer: 336 Script exited with status 2
lxc-start: conf.c: lxc_setup: 3827 failed to run mount hooks for container '1004'.
lxc-start: start.c: do_start: 702 failed to setup the container
lxc-start: sync.c: __sync_wait: 51 invalid sequence number 1. expected 2
lxc-start: start.c: __lxc_start: 1172 failed to spawn '1004'
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.
 
root@vm1:/mnt/test/etc# cat redhat-release
CentOS release 6.7 (Final)

I received this as well, and it's super easy to miss the fact that the file is txz and not tgz. If you're going to supply default containers with txz, then you should either make xz-utils a dependency or make it really hard to miss the error that the tool to extract xz is not installed.

This may not be your problem though, it _was_ mine after downloading the template for centos 6.
 
Faye,

Thank you for your input. I'm sure it will be helpful to others.

For my situation, however, it isn't the same problem. My scenario comes from an openVZ container that had been imported to LXC.

Regards,
Chris Wathan
 
Is there any news/fix for this issue yet? The most recent updates have not resolved the problem. This is sort of a big deal for anyone that is attempting to upgrade live systems to Proxmox 4.
 
Is there any news/fix for this issue yet? The most recent updates have not resolved the problem. This is sort of a big deal for anyone that is attempting to upgrade live systems to Proxmox 4.

You already installed xz-utils?
 

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!