[SOLVED] Imported CT doesn't start: Failed to mount "/dev/pts/8" onto "/dev/console"

greg

Renowned Member
Apr 6, 2011
137
2
83
Greetings
I'm trying to migrate an old Proxmox 3 VZ container to LXC.
The import process works as documented; however, when trying to start it, it does't work.
I tried to run it manually with `lxc-start` and got this error:


utils - utils.c:safe_mount:1187 - No such file or directory - Failed to mount "/dev/pts/8" onto "/dev/console"

Indeed the host only have 1 to 7 inside /dev/pts.

I spent the whole day searching the net but found no answer.

My host is a newly installed, up-to-date proxmox.

What's wrong? How can I correct it?

Thanks in advance

Regards
 
Last edited:
BTW I tried adding `unprivileged: 0` to the config file, it doesn't change.
 
Also, ALL old vz CTs show the same behavior when imported in the latest Proxmox.
 
what happens when you run

Code:
pct start CTID

and also with debug output maybe:
Code:
lxc-start -n ID -F -l DEBUG -o /tmp/lxc-ID.log

also maybe the output of:

Code:
pct config CTID
 
Code:
# pct start 198
Job for pve-container@198.service failed because the control process exited with error code.
See "systemctl status pve-container@198.service" and "journalctl -xe" for details.
command 'systemctl start pve-container@198' failed: exit code 1

Code:
# lxc-start -F -f /etc/pve/local/lxc/198.conf --name oc --logfile /tmp/lxc.log --logpriority TRACE
lxc-start: oc: utils.c: safe_mount: 1187 No such file or directory - Failed to mount "/dev/pts/8" onto "/dev/console"
                                                                                                                     lxc-start: oc: conf.c: lxc_setup_dev_console: 1793 Failed to mount "/dev/pts/8" on "/dev/console"
                                                                                                                                                                                                                      lxc-start: oc: conf.c: lxc_setup: 3679 Failed to setup console
   lxc-start: oc: start.c: do_start: 1279 Failed to setup container "oc"
                                                                        lxc-start: oc: sync.c: __sync_wait: 62 An error occurred in another process (expected sequence number 5)
                                                                                                                                                                                lxc-start: oc: start.c: __lxc_start: 1989 Failed to spawn container "oc"
                                                                                                                                                                                                                                                        lxc-start: oc: tools/lxc_start.c: main: 330 The container failed to start
lxc-start: oc: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options


/tmp/lxc.log ends with:

Code:
lxc-start oc 20190611154129.720 TRACE    conf - conf.c:remount_all_slave:3399 - Remounted "/etc/pve" as MS_SLAVE
lxc-start oc 20190611154129.720 TRACE    conf - conf.c:remount_all_slave:3403 - Remounted all mount table entries as MS_SLAVE
lxc-start oc 20190611154129.720 TRACE    network - network.c:lxc_network_send_name_and_ifindex_to_parent:3139 - Sent network device names and ifindices to parent
lxc-start oc 20190611154129.720 INFO     conf - conf.c:mount_autodev:1144 - Preparing "/dev"
lxc-start oc 20190611154129.720 TRACE    conf - conf.c:mount_autodev:1168 - Mounted tmpfs on "/dev"
lxc-start oc 20190611154129.720 INFO     conf - conf.c:mount_autodev:1191 - Prepared "/dev"
lxc-start oc 20190611154129.720 INFO     conf - conf.c:lxc_fill_autodev:1235 - Populating "/dev"
lxc-start oc 20190611154129.720 DEBUG    conf - conf.c:lxc_fill_autodev:1250 - Created device node "/dev/full"
lxc-start oc 20190611154129.720 DEBUG    conf - conf.c:lxc_fill_autodev:1250 - Created device node "/dev/null"
lxc-start oc 20190611154129.720 DEBUG    conf - conf.c:lxc_fill_autodev:1250 - Created device node "/dev/random"
lxc-start oc 20190611154129.720 DEBUG    conf - conf.c:lxc_fill_autodev:1250 - Created device node "/dev/tty"
lxc-start oc 20190611154129.720 DEBUG    conf - conf.c:lxc_fill_autodev:1250 - Created device node "/dev/urandom"
lxc-start oc 20190611154129.720 DEBUG    conf - conf.c:lxc_fill_autodev:1250 - Created device node "/dev/zero"
lxc-start oc 20190611154129.720 INFO     conf - conf.c:lxc_fill_autodev:1312 - Populated "/dev"
lxc-start oc 20190611154129.720 ERROR    utils - utils.c:safe_mount:1187 - No such file or directory - Failed to mount "/dev/pts/8" onto "/dev/console"
lxc-start oc 20190611154129.720 ERROR    conf - conf.c:lxc_setup_dev_console:1793 - Failed to mount "/dev/pts/8" on "/dev/console"
lxc-start oc 20190611154129.720 ERROR    conf - conf.c:lxc_setup:3679 - Failed to setup console
lxc-start oc 20190611154129.720 ERROR    start - start.c:do_start:1279 - Failed to setup container "oc"
lxc-start oc 20190611154129.720 ERROR    sync - sync.c:__sync_wait:62 - An error occurred in another process (expected sequence number 5)
lxc-start oc 20190611154129.721 DEBUG    network - network.c:lxc_delete_network:3185 - Deleted network devices
lxc-start oc 20190611154129.721 TRACE    start - start.c:lxc_serve_state_clients:466 - Set container state to ABORTING
lxc-start oc 20190611154129.721 TRACE    start - start.c:lxc_serve_state_clients:469 - No state clients registered
lxc-start oc 20190611154129.721 ERROR    start - start.c:__lxc_start:1989 - Failed to spawn container "oc"
lxc-start oc 20190611154129.721 TRACE    start - start.c:lxc_serve_state_clients:466 - Set container state to STOPPING
lxc-start oc 20190611154129.721 TRACE    start - start.c:lxc_serve_state_clients:469 - No state clients registered
lxc-start oc 20190611154129.723 TRACE    start - start.c:lxc_fini:1017 - Closed command socket
lxc-start oc 20190611154129.723 TRACE    start - start.c:lxc_fini:1028 - Set container state to "STOPPED"
lxc-start oc 20190611154129.785 ERROR    lxc_start - tools/lxc_start.c:main:330 - The container failed to start
lxc-start oc 20190611154129.785 ERROR    lxc_start - tools/lxc_start.c:main:336 - Additional information can be obtained by setting the --logfile and --logpriority options
 
While chatting with a co-worker, we tried to remove the net devices, and the CTs started... if I add the net devices again, the same error happens...
 
OK I got it: the bridge device on the host wasn't created... the error message is completely misleading :(
 
glad your problem is solved
 
Thanks a lot for your help. Maybe it would be worth it to add it to the documentation because the error message is really unrelated and makes it very hard to find the error.
 
just to be clear,

is it the:
Code:
lxc-start oc 20190611154129.720 ERROR    utils - utils.c:safe_mount:1187 - No such file or directory - Failed to mount "/dev/pts/8" onto "/dev/console"
lxc-start oc 20190611154129.720 ERROR    conf - conf.c:lxc_setup_dev_console:1793 - Failed to mount "/dev/pts/8" on "/dev/console"

error popping up when the bridge wasn't created? i don't see any other errors related to network or anything.

does this disappear after configuring the bridge correctly?
 
Very good point.

Now a similar error appears:
Code:
utils - utils.c:safe_mount:1187 - No such file or directory - Failed to mount "/dev/pts/11" onto "/dev/console"

however the boot process goes on, so I assume it just happens that is it a non-blocking error happening just before the actual blocking error.

I'm not sure I can remove the bridge to see the actual difference in the log, but I will try.
 
BEWARE! all those 'failed to mount console' just means the ct didnt start. It's a generic report for ANY error that stops the container starting.

in my case it's:

Code:
lxc-start 913 20191002173623.626 DEBUG    conf - conf.c:run_buffer:326 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 913 lxc pre-start with output: unsupported debian version '10.1'

This is my vote for most unhelpful error message ever,
 
@mathx, please don't hijack unrelated threads. you have a completely different problem.

BEWARE! all those 'failed to mount console' just means the ct didnt start. It's a generic report for ANY error that stops the container starting.

it's not.

unsupported debian version '10.1'

you have to update proxmox packages, this has been fixed already :)
 
Not unrelated, a google search brought me exactly here to this thread.

I think you missed the part that i insinuated that I got the 'No such file or directory - Failed to mount "/dev/pts/8" onto "/dev/console"' error to start with from pct start and looking at systemctl status etc / journal logs.

Reading deeper into my errors by running lxc by hand I saw the version issue only later. But I absolutely got the 'dev/console' alert first.

People should be warned what it means, and it seems this error comes up in many situations that are seemingly unrelated causes except the container didnt start.
 
just to be clear,

is it the:
Code:
lxc-start oc 20190611154129.720 ERROR    utils - utils.c:safe_mount:1187 - No such file or directory - Failed to mount "/dev/pts/8" onto "/dev/console"
lxc-start oc 20190611154129.720 ERROR    conf - conf.c:lxc_setup_dev_console:1793 - Failed to mount "/dev/pts/8" on "/dev/console"

error popping up when the bridge wasn't created? i don't see any other errors related to network or anything.

does this disappear after configuring the bridge correctly?
I had the same exact problem.

My error exactly:
root@pve1:~# lxc-start -F -f /etc/pve/lxc/302.conf --name template-1804
lxc-start: template-1804: utils.c: safe_mount: 1212 No such file or directory - Failed to mount "/dev/pts/14" onto "/dev/console"
lxc-start: template-1804: conf.c: lxc_setup_dev_console: 1774 Failed to mount "/dev/pts/14" on "/dev/console"
lxc-start: template-1804: conf.c: lxc_setup: 3683 Failed to setup console
lxc-start: template-1804: start.c: do_start: 1338 Failed to setup container "template-1804"
lxc-start: template-1804: sync.c: __sync_wait: 62 An error occurred in another process (expected sequence number 5)
lxc-start: template-1804: start.c: lxc_abort: 1133 Function not implemented - Failed to send SIGKILL to 94196
lxc-start: template-1804: start.c: __lxc_start: 2080 Failed to spawn container "template-1804"
lxc-start: template-1804: tools/lxc_start.c: main: 329 The container failed to start
lxc-start: template-1804: tools/lxc_start.c: main: 335 Additional information can be obtained by setting the --logfile and --logpriority options

Turns out the container was configured with eth0 using vmbr1, which didn't exist and should be vmbr0 instead.
Upon changing the network setting, the container started up immediately with no errors. It appears the error message is very misleading.

# pveversion -v
proxmox-ve: 6.1-2 (running kernel: 5.3.18-2-pve)
pve-manager: 6.1-8 (running version: 6.1-8/806edfe1)
pve-kernel-helper: 6.1-8
pve-kernel-5.3: 6.1-6
pve-kernel-5.0: 6.0-11
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.3.18-2-pve: 5.3.18-2
pve-kernel-4.15: 5.3-3
pve-kernel-5.0.21-5-pve: 5.0.21-10
pve-kernel-4.15.18-12-pve: 4.15.18-35
ceph: 14.2.9-pve1
ceph-fuse: 14.2.9-pve1
corosync: 3.0.3-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.15-pve1
libpve-access-control: 6.0-6
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.0-17
libpve-guest-common-perl: 3.0-5
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-5
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 3.2.1-1
lxcfs: 4.0.1-pve1
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.1-3
pve-cluster: 6.1-4
pve-container: 3.0-23
pve-docs: 6.1-6
pve-edk2-firmware: 2.20200229-1
pve-firewall: 4.0-10
pve-firmware: 3.0-7
pve-ha-manager: 3.0-9
pve-i18n: 2.0-4
pve-qemu-kvm: 4.1.1-4
pve-xtermjs: 4.3.0-1
qemu-server: 6.1-7
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.3-pve1
 
Same error, different problem: somehow the host's /dev/pts got remounted ro, only when starting a CT did it popup til later I tried creating a new screen window 'read-only filesystem'. Chased it down to /dev/pts being ro, did a mount -o remount etc.

So there are many causes to this error message. Check your host's state too.
 

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!