whiskerz007/proxmox_hassio_lxc

Failed to create bus connection: No such file or directory

martyp187 opened this issue · 31 comments

When running the script on Proxmox 6.0.-11
In the proxmox console as root..

Which storage location would you like to use? 3
[INFO] Using 'Old300gb' for storage location.
[INFO] Container ID is 109.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
Failed to create bus connection: No such file or directory
[ERROR] 1@145 Unknown failure occured.
Logical volume "vm-109-disk-0" successfully removed

It's not fixed in the latest commit, so not sure why it's closed without comment?

Github caching may be interfering with you getting the latest commit. Please run the following and verify the output is identical to line 139 in create_container.sh

cd $(mktemp -d)
wget -qL https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh
sed '139q;d' create_container.sh

If the output is not the same, wait a few minutes and try again. If the output is the same, try running the script again. Please let me know the results.

Similar problem:

`root@proxmox:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"

More than one storage locations detected.

  1. hdd-img
  2. local-lvm

Which storage location would you like to use? 1
[INFO] Using 'hdd-img' for storage location.
[INFO] Container ID is 101.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
Failed to create bus connection: No such file or directory
[ERROR] 1@145 Unknown failure occured.
root@proxmox:~# `

Tried the above test for lines 139 and the lines are identical.

The script runs ok if I select the 'local-lvm' location, the 'hdd-img' location is a 2tb set up as a directory with the content set as `disk image, Container' if that helps

What is the output from the following?

pvesh get /storage/hdd-img

key: value
content: rootdir,images
digest: 64e2ca5780a0cfea4be7b8efaac563f0c9288862
nodes: proxmox
path: /mnt/data/hdd-img
shared: 1
storage: hdd-img
type: dir

What is the output from the following?

ls /dev/tty{ACM,S,USB}* 2>/dev/null; ls $([ -d "/dev/bus" ] && find /dev/bus -type c) /dev/mem /dev/net/tun

/dev/ttyS0 /dev/ttyS14 /dev/ttyS2 /dev/ttyS25 /dev/ttyS30 /dev/ttyS8
/dev/ttyS1 /dev/ttyS15 /dev/ttyS20 /dev/ttyS26 /dev/ttyS31 /dev/ttyS9
/dev/ttyS10 /dev/ttyS16 /dev/ttyS21 /dev/ttyS27 /dev/ttyS4
/dev/ttyS11 /dev/ttyS17 /dev/ttyS22 /dev/ttyS28 /dev/ttyS5
/dev/ttyS12 /dev/ttyS18 /dev/ttyS23 /dev/ttyS29 /dev/ttyS6
/dev/ttyS13 /dev/ttyS19 /dev/ttyS24 /dev/ttyS3 /dev/ttyS7
/dev/bus/usb/001/001 /dev/bus/usb/001/003 /dev/bus/usb/002/001 /dev/net/tun
/dev/bus/usb/001/002 /dev/bus/usb/001/004 /dev/mem

BTW I am running Proxmox 6.0-11

I'm not able to reproduce your error. If you add Container to Content of local storage and run the script against local storage, do you get the same error?

Thank you for your time on this, I'll give that ago and come back, may be tomorrow now though.

I can add that the storage I am attempting to store the container on has "Container & Disk Image" set to on within settings.

root@pve:~# pvesh get /storage/Old300gb ┌──────────┬──────────────────────────────────────────┐ │ key │ value │ ╞══════════╪══════════════════════════════════════════╡ │ content │ rootdir,images │ ├──────────┼──────────────────────────────────────────┤ │ digest │ 9ab4ba2e85fe59483a05581fcfbc8ed2c78436ac │ ├──────────┼──────────────────────────────────────────┤ │ nodes │ pve │ ├──────────┼──────────────────────────────────────────┤ │ storage │ Old300gb │ ├──────────┼──────────────────────────────────────────┤ │ thinpool │ Old300gb │ ├──────────┼──────────────────────────────────────────┤ │ type │ lvmthin │ ├──────────┼──────────────────────────────────────────┤ │ vgname │ Old300gb │ └──────────┴──────────────────────────────────────────┘

root@pve:~# ls /dev/tty{ACM,S,USB}* 2>/dev/null; ls $([ -d "/dev/bus" ] && find /dev/bus -type c) /dev/mem /dev/net/tun /dev/ttyS0 /dev/ttyS14 /dev/ttyS2 /dev/ttyS25 /dev/ttyS30 /dev/ttyS8 /dev/ttyS1 /dev/ttyS15 /dev/ttyS20 /dev/ttyS26 /dev/ttyS31 /dev/ttyS9 /dev/ttyS10 /dev/ttyS16 /dev/ttyS21 /dev/ttyS27 /dev/ttyS4 /dev/ttyS11 /dev/ttyS17 /dev/ttyS22 /dev/ttyS28 /dev/ttyS5 /dev/ttyS12 /dev/ttyS18 /dev/ttyS23 /dev/ttyS29 /dev/ttyS6 /dev/ttyS13 /dev/ttyS19 /dev/ttyS24 /dev/ttyS3 /dev/ttyS7 /dev/bus/usb/001/001 /dev/bus/usb/002/001 /dev/bus/usb/006/001 /dev/mem /dev/bus/usb/001/003 /dev/bus/usb/003/001 /dev/bus/usb/007/001 /dev/net/tun /dev/bus/usb/001/004 /dev/bus/usb/003/002 /dev/bus/usb/008/001 /dev/bus/usb/001/005 /dev/bus/usb/004/001 /dev/bus/usb/009/001 /dev/bus/usb/001/006 /dev/bus/usb/005/001 /dev/bus/usb/010/001

Another thing you can try is disconnect all USB devices, then try running the script again.

I have added Container to Content of local storage and run the script, installing on local and all works.

I made sure the same settings and Content were in the hdd.img but the script still wouldn't install.

I have nothing on the drive this directory is on as its only just been added using this information https://nubcakes.net/index.php/2019/03/05/how-to-add-storage-to-proxmox/

If you feel it could be the way the drive was setup, I could delete the drive and set it up again using a different method.

I have my main hassio running on the SSD as a vm on the same nuc. This hdd is going to used for extra storage and running other containers.

If you've recently updated Proxmox and haven't rebooted, try to reboot Proxmox and try the script again.

I update regular and reboot, just recently updated to proxmox 6, its just strange the hdd doesn't want to work with the script

I am getting the same error tonight when I try to run the script, it worked fine last night (11-17-2019_

root@proxmox:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"
[INFO] Using 'local-lvm' for storage location.
[INFO] Container ID is 106.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to create bus connection: Host is down
[ERROR] 1@145 Unknown failure occured.
Logical volume "vm-106-disk-0" successfully removed

I have push a commit that should resolve this problem. Please report your experiences.

How would I go about installing hassio manually in a LXC container? to see if that works. I don't have any problem installing LXC containers.

@jdenver13 You can review the scripts to see how the installation process is executed. I've attempted to clearly comment each section.

I have push a commit that should resolve this problem. Please report your experiences.

This worked for me now. The container and install all completed fine.
Are there any downsides or reasons not to migrate my hassio VM into the container now?

@martyp187 The only limitation I'm currently aware of is not being able to pass through Bluetooth receivers. This is a limitation of LXC due to upstream decisions.

@martyp187 The only limitation I'm currently aware of is not being able to pass through Bluetooth receivers. This is a limitation of LXC due to upstream decisions.

Ok that's good to know. I actually find that is the same situation when using my full-fat VM too.

@whiskerz007 This issue seems be resolved for me on the current commit. I think we can close this issue.

I agree, have not had any issues for the past week.

@jeremeyi Have you tried installing hassio addons yet?
I'm having an issue (#5 ) where i can't seem to get certain hassio add-ons to run. They'll install but won't start successfully.

I have several add ons going, but to be fair they were restored from a snap shot I took form within hass.io when I had it running as a VM so not sure if that matters. The ones I have running are AppDaemon, Configurator, Google drive backup, Mosquitto broker, Node-Red, SSH server, Samba Share, TasmoAdmin, Tautulli, and Chrony. I did have issues with MariaDb and not being able to connect to the db which worked fine on the VM, but it appeared to start up ok. I was having issues with node-red not starting up but the most recent script seemed to clear that up.

@jeremeyi Interesting. Would you mind trying to install the nginx-proxy-manager add-on and see if that starts up for you? I also tried restoring a Hassio Snapshot but that didn't seem to help in my case for nginx-proxy-manager.

My original problem above ⬆️ seams to have been sorted now, thank you.

meichthys,
I installed the nginx-proxy-manager add-on and it seems to start up ok for me. I've never used it before and am not at all versed in using nginx so besides the default ports it has set up I did no configuration of the add-on. But it started and I was able to access the login page from the open web ui button so it seems to start up ok.

@jeremeyi Interesting. Thanks for testing that. There's no needed configuration for that add-on so it was working fine for you. That must mean my configuration is bad, or i should try a snapshot restore again.

Since no more problems have been presented concerning bus devices, I am closing this issue.