Giter Club home page Giter Club logo

proxmox_hassio_lxc's People

Contributors

whiskerz007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

proxmox_hassio_lxc's Issues

Container creation fail on storage local disabled

I have disable local storage and using other name convention for container/vm storage, and other for templates, isos, etc, maybe you can add a variable for the storage where the template of debian is downloaded.

Lines afected are 99 and 128
In my case i just modified them to get it working

99c99
< pveam download local $TEMPLATE >/dev/null ||
---
> pveam download hd-wh-lvm $TEMPLATE >/dev/null ||
128c128
< TEMPLATE_STRING="local:vztmpl/${TEMPLATE}"
---
> TEMPLATE_STRING="hd-wh-lvm:vztmpl/${TEMPLATE}"

And thanks for your effort creating these scripts ^^

Can't start after reboot

Hello,

The container installs fine with the script. But when i shutdown the container and want to start it again it does not start anymore. Can you help me please?

`root@straussie:~# systemctl status [email protected]
โ— [email protected] - PVE LXC Container: 100
Loaded: loaded (/lib/systemd/system/[email protected]; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-11-26 19:19:43 CET; 8min ago
Docs: man:lxc-start
man:lxc
man:pct
Process: 2354 ExecStart=/usr/bin/lxc-start -n 100 (code=exited, status=1/FAILURE)

Nov 26 19:19:42 straussie systemd[1]: Starting PVE LXC Container: 100...
Nov 26 19:19:43 straussie lxc-start[2354]: lxc-start: 100: lxccontainer.c: wait_on_daemonized_start: 865 No such file or directory - Failed to receive the container state
Nov 26 19:19:43 straussie lxc-start[2354]: lxc-start: 100: tools/lxc_start.c: main: 329 The container failed to start
Nov 26 19:19:43 straussie lxc-start[2354]: lxc-start: 100: tools/lxc_start.c: main: 332 To get more details, run the container in foreground mode
Nov 26 19:19:43 straussie lxc-start[2354]: lxc-start: 100: tools/lxc_start.c: main: 335 Additional information can be obtained by setting the --logfile and --logpriority
Nov 26 19:19:43 straussie systemd[1]: [email protected]: Control process exited, code=exited, status=1/FAILURE
Nov 26 19:19:43 straussie systemd[1]: [email protected]: Failed with result 'exit-code'.
Nov 26 19:19:43 straussie systemd[1]: Failed to start PVE LXC Container: 100.`

Script fails at Docker configuration step.

Hi there,

I've been trying to install using the script, but it is failing when it gets to the Docker configuration step.

root@overkill:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"
[INFO] Using 'ziso' for template storage.
[INFO] Using 'zimage' for container storage.
Updating LXC template list...
Creating LXC container...
[INFO] LXC container '100' was successfully created.
[WARNING] Some addons may not work due to ZFS not supporting 'fallocate'.
Starting LXC container...
Setting up container OS...
Updating container OS...
Installing prerequisites...
Installing Docker...
Configuring Docker...
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
[ERROR] 1@130 Unknown failure occured.

Any thoughts on what I can try?

Thank you!
-Pragma

how to update?

How do I update to the latest version? I can't seem to find instructions anywhere.

Thanks,

Fail in Network-Manager

I have installed it as the guide says but when I go to the supervised part it tells me the following.

You are running an unsupported installation
Below is a list of issues found with your installation, click on the links to learn how you can resolve the issues.

Network Manager

I have followed the steps that home assistant tells me to fix it but I have all the confs correctly, what can be happening?
sorry for my google translate.

Failed to create bus connection: No such file or directory

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

Broken Pipe

Hi,

I just tried to re-run the new script, and this is the error I have:

root@pve:~# root@pve:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"
-bash: root@pve:~#: command not found
root@pve:~# [INFO] Using 'local-lvm' for storage location.
-bash: [INFO]: command not found
root@pve:~# 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 100.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
Setting up container OS...
Updating container OS...
Installing prerequisites...
Installing Docker...
bash: line 184: curl: command not found
Configuring Docker...
lxc-attach: 100: attach.c: lxc_attach: 1136 No such file or directory - Failed to attach to mnt namespace of 17494
[ERROR] 1@190 Unknown failure occured.
unable to get PID for CT 100 (not running?)
trying to acquire lock...
 OK
broken pipe 
  Logical volume "vm-100-disk-0" successfully removed

Do you have any advice?

Many thanks

Error message "1@105 Unable to find a template when searching for 'debian-10'."

When I'm running bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)" I always get the same error message: "1@105 Unable to find a template when searching for 'debian-10'."
I already installed debian-11-standard and debian-12-standard template. But there is no debian-10-standard template available. My guess is, that debian 11 and 12 have everything debian 10 has and therefore the debian 10 template is not available anymore but still hidden in the code as a requirement to install the container. What should I do now? Any recommendations? I'm glad for any help!

Kindest regards,

Tipkla

grafik

Lxc only starts when commenting lxc.hook.pre-start after upgrading to proxmox 7

Hi, after upgrading to proxmox 7, the home assistant container would only start if I comment the lxc.hook.pre-start line in the config file for the container.

The full line is lxc.hook.pre-start: sh -ec 'for module in aufs overlay; do modinfo $module; $(lsmod | grep -Fq $module) || modprobe $module; done;'

home assistant seems to work fine with this line commented. Should I be ok running it this way?

using /dev/serial/by-id

I like to use the /dev/serial/by-id/usb_xxxxxx symbolic links in my Hassio config, but those doesn't seem to be working. After apt-get install usbutils I can see the symbolic links, but they don't work, however the original devices /dev/ttyUSBx where the symbolic links go do work fine.
I think something has to be changed in /etc/pve/lxc/100.conf for the line:

lxc.hook.autodev: bash -c 'for dev in $(ls /dev/tty{ACM,S,USB}* 2>/dev/null) $([ -d "/dev/bus" ] && find /dev/bus -type c) $([ -d "/dev/usb" ] && find /dev/usb -type c) /dev/mem /dev/net/tun; do mkdir -p $(dirname ${LXC_ROOTFS_MOUNT}${dev}); for link in $(udevadm info --query=property $dev | sed -n "s/DEVLINKS=//p"); do mkdir -p ${LXC_ROOTFS_MOUNT}$(dirname $link); cp -dR $link ${LXC_ROOTFS_MOUNT}${link}; done; cp -dR $dev ${LXC_ROOTFS_MOUNT}${dev}; done'

I think to replicate them in the lxc container, but I don't know exactly what.

installation failed

root@server:~# 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 100.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
Setting up container OS...
Updating container OS...
Installing prerequisites...
Installing Docker...
Customizing Docker...
Installing Home Assistant...
[ERROR:LXC] 2@63 Unknown failure occured.
[ERROR] 2@165 Unknown failure occured.
Logical volume "vm-100-disk-0" successfully removed

Can you help me?

Fails because vbr0 does not have DHCP configured on the network

root@prox:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"
[INFO] Using 'local' for template storage.
[INFO] Using 'OSs' for container storage.
Updating LXC template list...
Creating LXC container...
[INFO] LXC container '118' was successfully created.
[WARNING] Some addons may not work due to ZFS not supporting 'fallocate'.
Starting LXC container...
Setting up container OS...
Updating container OS...
W: Failed to fetch http://ftp.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'ftp.debian.org'
W: Failed to fetch http://ftp.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'ftp.debian.org'
W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease  Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Installing prerequisites...
[ERROR] 100@117 Unknown failure occured.

I think this is because lxc_create.sh uses vmbr0 but my vmbr0 network is not setup for dhcp.
-net0 name=eth0,bridge=vmbr0,ip=dhcp

great performance but slow boot time

I installed this LXC container a few days ago on my NUC.
All working perfectly.

Snapshots now take a split-second - big difference compared to my raspberry PI 3.
Thank you so much.

One thing I didn't expect: HA reboot still takes over a minute.
Is that normal?

Node-Red addon won't start

I installed this on my proxmox 5.4-13 machine last night and started messing with it today and when I try to start the node-red addon it won't start and gives this in the system logs in hassio "Can't start addon_a0d7b954_nodered: 500 Server Error: Internal Server Error ("error gathering device information while adding custom device "/dev/mem": no such file or directory"). I was also having trouble with my Aeotec Z-Stick but figured it was just me not knowing how to pass it to a lxc.

Pretty excited to see you working on a lxc script for this! Been using your vm version for some time now thanks for the hard work!

Can the disk size/RAM amount be configurable?

I greatly appreciate your efforts in making this available. Thank you.

Can the disk size/RAM amount be configurable? I've forked the code and edited my version to hard-code a 16G disk rather than 4 but a config option would be nice.. (Maybe it canm be done after the fact in Proxmox, but I've only just figured out how to add a new physical disk so I'm not best placed to judge!)

Script not working and not maintained anymore?

I would like the idea running HomeAssistant OS from a LXC due t the shared hardware resources. Using Proxmox 8 I forked this repository and applied the suggested Pull Requests. It still fails at the docker configuration. Having a deeper look the homeassistant-supervisor install has changed a lot meanwhile. Some of the pathes given do not exist anymore. To get this script working again with Proxmox 8 and debian 12 templates may need much more investigations bejond my skills.

Hass.io Add-on installs fail

Tried the VSCode add-on and the SSH/Terminal add-on, and both installs failed.

Both give this error:

Can't install hassioaddons/ssh-amd64:6.4.1 -> 500 Server Error: Internal Server Error ("Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)").

Network setup is using static IP from Proxmox. Logging in through the console from the Proxmox UI I can ping 1.1.1.1 without problem from inside the container, so internet seems to be reachable.

Failure to conclude the HA instalation process on Proxmox 6.2-4

I'm using your script to install HA on 2 two Proxmox 6.2-4 different machines.

Both get stuck early after the "Preparing Home Assistant" landing page gets available:

core logs:

2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain search took 0.0 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.5 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setting up onboarding
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setting up zeroconf
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setting up mobile_app
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 0.0 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain onboarding took 0.1 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setting up frontend
2020-05-17 18:02:10 INFO (SyncWorker_18) [homeassistant.loader] Loaded notify from homeassistant.components.notify
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setting up notify
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.0 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setting up map
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.0 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setting up logbook
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain zeroconf took 0.1 seconds.
2020-05-17 18:02:10 INFO (SyncWorker_2) [homeassistant.loader] Loaded spotify from homeassistant.components.spotify
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.components.updater] Submitted analytics to Home Assistant servers. Information submitted includes {}
2020-05-17 18:02:10 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.8 seconds.
2020-05-17 18:02:10 INFO (SyncWorker_7) [homeassistant.loader] Loaded binary_sensor from homeassistant.components.binary_sensor
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setting up default_config
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setting up binary_sensor
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setup of domain binary_sensor took 0.0 seconds.
2020-05-17 18:02:11 INFO (SyncWorker_15) [homeassistant.loader] Loaded stream from homeassistant.components.stream
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.updater
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.updater entity: binary_sensor.updater
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setting up stream
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setup of domain stream took 0.0 seconds.
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.0 seconds.
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setting up hassio
2020-05-17 18:02:11 INFO (SyncWorker_16) [homeassistant.loader] Loaded google_translate from homeassistant.components.google_translate
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setting up tts
2020-05-17 18:02:11 INFO (SyncWorker_9) [homeassistant.components.tts] Create cache dir /config/tts
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2020-05-17 18:02:11 INFO (MainThread) [homeassistant.setup] Setup of domain hassio took 0.1 seconds.
2020-05-17 18:02:12 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 5.91s
2020-05-17 18:02:12 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2020-05-17 18:02:12 INFO (MainThread) [homeassistant.core] Timer:starting
2020-05-17 18:02:12 INFO (SyncWorker_11) [homeassistant.components.zeroconf] Starting Zeroconf broadcast

supervisor logs:

20-05-17 18:00:50 INFO (MainThread) [supervisor.discovery] Load 0 messages
20-05-17 18:00:50 INFO (MainThread) [supervisor.ingress] Load 0 ingress session
20-05-17 18:00:50 INFO (MainThread) [supervisor.secrets] Load Home Assistant secrets: 0
20-05-17 18:00:50 INFO (MainThread) [__main__] Run Supervisor
20-05-17 18:00:50 INFO (MainThread) [supervisor.api] Start API on 172.30.32.2
20-05-17 18:00:50 INFO (MainThread) [supervisor.addons] Phase 'initialize' start 0 add-ons
20-05-17 18:00:50 INFO (MainThread) [supervisor.addons] Phase 'system' start 0 add-ons
20-05-17 18:00:50 INFO (MainThread) [supervisor.addons] Phase 'services' start 0 add-ons
20-05-17 18:00:50 INFO (MainThread) [supervisor.core] Skip start of Home Assistant
20-05-17 18:00:50 INFO (MainThread) [supervisor.addons] Phase 'application' start 0 add-ons
20-05-17 18:00:50 INFO (MainThread) [supervisor.tasks] All core tasks are scheduled
20-05-17 18:00:50 INFO (MainThread) [supervisor.hwmon] Started Supervisor hardware monitor
20-05-17 18:00:50 INFO (MainThread) [supervisor.core] Supervisor is up and running
20-05-17 18:00:50 INFO (MainThread) [supervisor.homeassistant] Setup Home Assistant
20-05-17 18:00:50 INFO (MainThread) [supervisor.host.info] Update local host information
20-05-17 18:00:50 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
20-05-17 18:00:50 INFO (SyncWorker_8) [supervisor.docker.interface] Update image homeassistant/qemux86-64-homeassistant:landingpage to homeassistant/qemux86-64-homeassistant:0.109.6
20-05-17 18:00:50 INFO (SyncWorker_8) [supervisor.docker.interface] Pull image homeassistant/qemux86-64-homeassistant tag 0.109.6.
20-05-17 18:00:50 INFO (MainThread) [supervisor.host.services] Update service information
20-05-17 18:00:50 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
20-05-17 18:00:50 INFO (MainThread) [supervisor.host.network] Update local network DNS information
20-05-17 18:00:50 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
20-05-17 18:00:50 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-05-17 18:01:56 INFO (SyncWorker_8) [supervisor.docker.interface] Stop homeassistant application
20-05-17 18:02:01 INFO (SyncWorker_8) [supervisor.docker.interface] Clean homeassistant application
20-05-17 18:02:01 INFO (MainThread) [supervisor.homeassistant] Home Assistant docker now installed
20-05-17 18:02:01 INFO (MainThread) [supervisor.homeassistant] Start Home Assistant
20-05-17 18:02:01 INFO (MainThread) [supervisor.homeassistant] Update pulse/client.config: /data/tmp/homeassistant_pulse
20-05-17 18:02:01 INFO (SyncWorker_2) [supervisor.docker.homeassistant] Start homeassistant homeassistant/qemux86-64-homeassistant with version 0.109.6
20-05-17 18:02:16 INFO (MainThread) [supervisor.homeassistant] Detect a running Home Assistant instance
20-05-17 18:02:16 INFO (SyncWorker_18) [supervisor.docker.interface] Cleanup images: ['homeassistant/qemux86-64-homeassistant:landingpage']

Even after the 20 minutes period. No CPU, HDD or network activity for more than 15 minutes.

I'm using 1024 MB of RAM and 32 GB of storage for this container.

Any help, please?

ifelse: fatal: unable to exec /bin/cli.sh: No such file or directory

Debian GNU/Linux 10 hassio tty1

hassio login: root (automatic login)

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
ifelse: fatal: unable to exec /bin/cli.sh: No such file or directory
[cmd] /bin/cli.sh exited 127
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Debian GNU/Linux 10 hassio tty1

hassio login: root (automatic login)

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
ifelse: fatal: unable to exec /bin/cli.sh: No such file or directory
[cmd] /bin/cli.sh exited 127
[cont-finish.d] executin

On an older HA instance, I'm getting these cyclic errors. No CLI is available on the LXC. How can I fix this?

Installation fail with zfs storage

Hello,
when I install it with lvm it works fine, installing with zfs, I get following error:
Installing Docker...
Configuring Docker...
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
[ERROR] 1@192 Unknown failure occured.

[ERROR] 100@112 Unknown failure occured.

I just upgraded to Virtual Environment 6.4-13
But when I run the script I get [ERROR] 100@112 Unknown failure occured.

[INFO] Using 'local' for template storage.
[INFO] Using 'local-lvm' for container storage.
Updating LXC template list...
Creating LXC container...
[INFO] LXC container '104' was successfully created.
Starting LXC container...
Setting up container OS...
Updating container OS...
E: Repository 'http://security.debian.org buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
[ERROR] 100@112 Unknown failure occured.
  Logical volume "vm-104-disk-0" successfully removed```

HASSIO Command Line

Whiskerz007 this LXC version is way faster than the original VM version but how do you get the HASSIO Command Line now to do things like snapshots fixes, homeassistant check, etc? If the machine binds up for some reason this was area to fix all those issue.

mysql/mariadb dependent add-ons fail

I'm looking forward to using your lxc script - i've been using your proxmox vm script for a while now. Great work!

I noticed when running this lxc script that some add-ons don't work (specifically the nginxproxymanager). I believe it is failing because the lxc container doesn't have the right permissions for the install or setup of mysql (I could be wrong on this though) The add-on fails with the following log:

[23:19:22] INFO: Initializing database...
Installing MariaDB/MySQL system tables in '/data/mysql' ...
2019-11-25 23:19:23 0 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95
2019-11-25 23:19:23 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
2019-11-25 23:19:23 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2019-11-25 23:19:23 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-11-25 23:19:23 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-11-25 23:19:23 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2019-11-25 23:19:23 0 [ERROR] Aborting

I'd be interested to hear if anyone else had this same issue - i'm assuming others will since my proxmox is pretty much a clean, updated install, and the add-on was installed prior to any other hassio setup/configurations.

If there's any other information i can provide, please let me know.

PROXMOX HA

I am running a pair of proxmox servers and need to know what needs to be run on the 2nd host in order to migrate the container and have it work. I can not access the HA web ui when I migrate.

Getting an "Unknown failure occurred."

I feel this might be related to my setup.. Proxmox is hosting its own gateway as a vm. Proxmox does have internet and updates just fine.

root@Vanguard:~# 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 102. Updating LXC template list... Downloading LXC template... Creating LXC container... Starting LXC container... Setting up container OS... Updating container OS... W: Failed to fetch http://ftp.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'ftp.debian.org' W: Failed to fetch http://ftp.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'ftp.debian.org' W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org' W: Some index files failed to download. They have been ignored, or old ones used instead. Installing prerequisites... [ERROR:LXC] 100@39 Unknown failure occured. [ERROR] 100@163 Unknown failure occured. Logical volume "vm-102-disk-0" successfully removed

edit: not sure why I can't format the terminal output so sorry for that
image

Failed install ?

Tried this script - but after some minutes getting error:

root@Proxmox:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)" [INFO] Using 'local-zfs' for storage location. [INFO] Container ID is 101. Updating LXC template list... Downloading LXC template... download failed - Creating LXC container... [WARNING] Some addons may not work due to ZFS not supporting 'fallocate'. volume 'local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.gz' does not exist [ERROR] 2@129 Unknown failure occured.

'lxc' - could not get working...

Tryied few times - result the same...

P.S. What add-on's can not be installed...?

root@proxmox:~# ash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)" -bash: ash: command not found root@proxmox:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)" [INFO] Using 'local-zfs' for storage location. [INFO] Container ID is 105. Updating LXC template list... Downloading LXC template... Creating LXC container... [WARNING] Some addons may not work due to ZFS not supporting 'fallocate'. Starting LXC container... Setting up container OS... Updating container OS... Installing prerequisites... [ERROR:LXC] 100@34 Unknown failure occured. [ERROR] 100@155 Unknown failure occured. root@proxmox:~#

Getting An Error On Console of HA LXC

I am getting an error of "WARNING: Error loading config file: .dockercfg: $HOME is not defined" the top of the console when going into the command line part of the container. It just appeared a while back. It takes a while for the CLS to appear so you can use the command line tools for Home Assistant so it seems to be working. Just takes an unusually long amount of time to come up. It hangs at the attached screen for a good two mins or so.

Untitled2

Not sure if this has been an issue for anyone else but putting it out there. I was thinking of deleting the container and rebuilding it with a new one to see if that helps.

How to hook up the Wyze sensor bridge?

I want to use my Wyze sensors with HassIO with the HA-Wyzesense plugin. I plugged in the sensor bridge into my Proxmox machine and verified that the device is recognized by running lsusb on my Proxmox host.

Output of lsusb:

Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 1a86:e024 QinHeng Electronics 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Next, I ran this command outlined in the Readme to update the device hooks: bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/set_autodev_hook.sh)" -s 100

When I rebooted HassIO, I went into the shell and checked the /dev directory, but I couldn't find a hidraw0 device.

Did I miss a step somewhere?

command line doesn't work

There seems to be a problem with the command line
bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"
I'm running the newest proxmox 6.1-7 and when I put this command line into shell, nothing happens. Tried it several times already but nothing.

Script doesn work

Hello. I had previous version of proxmox and script was working excellent, now I reinstall all system with newest proxmox 7. 0 and cannot it get working. I dont even know where to look, pls help.

INFO] Using 'local' for template storage.
[INFO] Using 'local-lvm' for container storage.
Updating LXC template list...
Creating LXC container...
[INFO] LXC container '100' was successfully created.
Starting LXC container...
run_buffer: 316 Script exited with status 1
lxc_init: 816 Failed to run lxc.hook.pre-start for container "100"
__lxc_start: 2007 Failed to initialize container "100"
startup for container '100' failed
[ERROR] 255@100 Unknown failure occured.
Logical volume "vm-100-disk-0" successfully removed

Script not working

When I paste the bash script into the shell . I receive a window asking which disk to use however, it will not allow you to select a disk. I have tried windows with Putty and Mac with out success.

Proxmox 6.4.4 is update

Any advise would be appreciated.
Screenshot 2021-07-25 at 09 45 42

deCONZ and APC UPS Daemon addons

Hi,

I have problem with this two addons. In particular:

deCONZ from this repository https://home-assistant.io/addons won't install at all.
If i push the install buttont it becomes red.
The system log gives me the following error

19-12-05 23:41:30 INFO (SyncWorker_8) [hassio.docker.interface] Pull image homeassistant/amd64-addon-deconz tag 3.9. 19-12-05 23:41:31 ERROR (SyncWorker_8) [hassio.docker.interface] Can't install homeassistant/amd64-addon-deconz:3.9 -> 404 Client Error: Not Found ("manifest for homeassistant/amd64-addon-deconz:3.9 not found: manifest unknown: manifest unknown").

Whereas for APC UPS Daemon (from this repository https://github.com/korylprince/hassio-apcupsd) I can install it, but when i push start button it won't start.

For this one the system log gives me this error:

19-12-05 23:55:27 INFO (SyncWorker_7) [hassio.docker.interface] Clean addon_a722577e_apcupsd application 19-12-05 23:55:28 ERROR (SyncWorker_7) [hassio.docker] Can't start addon_a722577e_apcupsd: 500 Server Error: Internal Server Error ("error gathering device information while adding custom device "/dev/usb/": no such file or directory")
How can I pass the USB devices to the lxc?

Do you have any advice?

Add support for Wyzesense

From project: https://github.com/kevinvincent/ha-wyzesense

Need to pass through /dev/hidraw0

I modified lxc.hook.autodev to include it.

Here is the line from my LXC config file for the machine.
lxc.hook.autodev: bash -c 'for dev in $(ls /dev/tty{ACM,S,USB}* 2&gt;/dev/null) $([ -d "/dev/bus" ] && find /dev/bus -type c) $([ -d "/dev/usb" ] &amp;&amp; find /dev/usb -type c) /dev/hidraw0 /dev/mem /dev/net/tun; do mkdir -p $(dirname ${LXC_ROOTFS_MOUNT}${dev}); for link in $(udevadm info --query=property $dev | sed -n "s/DEVLINKS=//p"); do mkdir -p ${LXC_ROOTFS_MOUNT}$(dirname $link); cp -dR $link ${LXC_ROOTFS_MOUNT}${link}; done; cp -dR $dev ${LXC_ROOTFS_MOUNT}${dev}; done'

Awesome work BTW.

Failed to initialize Container

image

bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"
[INFO] Using 'BackupNAS' for template storage.
[INFO] Using 'LUN0' for container storage.
Upating LXC template list...
Downloading LXC template...
Creating LXC container...
[INFO] LXC container '104' was successfully created.
Starting LXC container...
run_buffer: 321 Script exited with status 1
lxc_init: 847 Failed to run lxc.hook.pre-start for container "104"
__lxc_start: 2008 Failed to initialize container "104"
startup for container '104' failed
[ERROR] 255@100 Unknown failure occured.
Logical volume "vm-104-disk-0" successfully removed

Can someone help?

Latest Proxmox:
proxmox-ve: 7.2-1 (running kernel: 5.15.35-3-pve)
pve-manager: 7.2-5 (running version: 7.2-5/12f1e639)
pve-kernel-5.15: 7.2-5
pve-kernel-helper: 7.2-5
pve-kernel-5.13: 7.1-9
pve-kernel-5.15.35-3-pve: 5.15.35-6
pve-kernel-5.15.35-2-pve: 5.15.35-5
pve-kernel-5.13.19-6-pve: 5.13.19-15
pve-kernel-5.13.19-2-pve: 5.13.19-4
ceph-fuse: 16.2.9-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve1
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.2-2
libpve-guest-common-perl: 4.1-2
libpve-http-server-perl: 4.1-2
libpve-storage-perl: 7.2-5
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.12-1
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.2.3-1
proxmox-backup-file-restore: 2.2.3-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.5.1
pve-cluster: 7.2-1
pve-container: 4.2-1
pve-docs: 7.2-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.4-2
pve-ha-manager: 3.3-4
pve-i18n: 2.7-2
pve-qemu-kvm: 6.2.0-10
pve-xtermjs: 4.16.0-1
qemu-server: 7.2-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.4-pve1

Home Assistant cli fails to restart.

The container installs fine, and I can get it set up, install/configure integrations as usual - but as soon as I restart to adjust network settings and resource allocation I get the following error image

Enhancement: Add the ability to configure some settings during install

Really like this.

It would be useful to be able to configure the hostname as part of the install rather than having to do it afterwards. Perhaps ask the user for the hostname with a default on RTN and a quiet mode that just uses defaults.

HOSTNAME=homeassistant

Personally, I always use a fixed IP, so the option for that to be requested during the install would be useful.

I realise these things can be changed, but if they can be done as part of the install, all the better.

Unable to install using the updated script - error configuring docker

Hi, as per the title. I found an updated version of the script (link in shell contents below) which allowed installation to get to configuring docker, then it errors out with 'unknown failure occured.

Any ideas/help? Have I done something wrong somewhere?

Thanks!

root@proxmox:~# bash -c "$(wget -qLO - https://raw.githubusercontent.com/whiskerz007/proxmox_hassio_lxc/c4ba4adc75c77bd192c60ad6daf3f57d5ff7f3cd/create_container.sh)" [INFO] Using 'local' for template storage. [INFO] Using 'local-lvm' for container storage. Updating LXC template list... Creating LXC container... [INFO] LXC container '101' was successfully created. Starting LXC container... Setting up container OS... Updating container OS... Installing prerequisites... Installing Docker... Configuring Docker... [ERROR] 8@130 Unknown failure occured. Logical volume "vm-101-disk-0" successfully removed root@proxmox:~#

Does this script install HA OS in an LXC container?

I used this script to install Home Assistant years ago and HA has been running rock solid for me ever since. Thank you @whiskerz007 for your work here. I know the script has been out of development for quite some time but it served me well all this time.

I have always assumed that I was running Home Assistant OS with this script. It says Home assistant OS on the system info screen, in the console and updates are made available for Home Assistant OS regularly.

I was at the Home Assistant discord server yesterday and tried to help someone. I mentioned that I was running HA OS in an LXC container. Immediately someone said "you can't run HA OS in an LXC container". At first I was sure that HA OS was what I had running in my LXC container but others began to join the convo jabbing at me as if I was some complete idiot. They insisted I was running HA Supervised and that was very bad, after all only idiots do that I guess

I've installed HA Supervised many years ago and don't recall the outcome being anywhere near what this script accomplishes. I've also installed the official HA OS image on a VM before and recall it being almost the same as what this script accomplishes only more resource intensive.

Will someone please enlighten me as to what flavor of home assistant the end result of this script is. Is it HA Supervised, HA OS, a hybrid? Pardon my if I've wasted your time trying to get answers that may not accomplish anything more than satisfying my curiosity, possibly make me feel like more or less of an idiot. Either way, thanks again

Proxmox 7 - Script does not work

Hello
New Proxmox 7 (7.0.11) installed. Still, the script doesn't work.

root@pve:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"
[INFO] Using 'local' for template storage.
[INFO] Using 'local-lvm' for container storage.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
[INFO] LXC container '100' was successfully created.
Starting LXC container...
run_buffer: 316 Script exited with status 1
lxc_init: 816 Failed to run lxc.hook.pre-start for container "100"
__lxc_start: 2007 Failed to initialize container "100"
startup for container '100' failed
[ERROR] 255@100 Unknown failure occured.
Logical volume "vm-100-disk-0" successfully removed

set up wyze

I followed the direction to create a new container and run set_autodev_hook.sh .

however can't see /dev/hidraw0.

i saw in the closed issues someone had a similar problem before, i tried his script but didn't work either.

Running ls -l /dev/hidraw0

From the container:
ls: cannot access '/dev/hidraw0': No such file or directory

From the Host:
crw------- 1 root root 240, 0 May 22 21:03 /dev/hidraw0

Failed to create bus connection: Host is down [ERROR] 1@145 Unknown failure occured.

Scenario:
I've deleted my previous hassio container (104) via the web gui. I have other pve's as 100, 101, 102, 103, 105

[INFO] Using 'toshiba' for storage location.
[INFO] Container ID is 104.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
WARNING: ext2 signature detected on /dev/toshiba/vm-104-disk-0 at offset 1080. Wipe it? [y/n]: [n]
  Aborted wiping of ext2.
  1 existing signature left on the device.
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-104-disk-0" successfully removed```

You are running an unsupported installation.

I have my Hassio LXC container on zfs proxmox local drive.

After update to the Home Assistant 0.114.4

Version 235
Latest version	235

There is this info:
You are running an unsupported installation. Learn more

Also I can see in log:

20-08-31 11:33:24 ERROR (MainThread) [supervisor.docker] Docker storage driver aufs is not supported!
20-08-31 11:33:24 ERROR (MainThread) [supervisor.docker] Docker logging driver json-file is not supported!
20-08-31 11:33:24 INFO (MainThread) [__main__] Setup Supervisor
20-08-31 11:33:24 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1
20-08-31 11:33:24 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1
20-08-31 11:33:24 WARNING (MainThread) [supervisor.dbus.rauc] Host has no rauc support. OTA updates have been disabled.
20-08-31 11:33:24 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.NetworkManager - /org/freedesktop/NetworkManager/DnsManager

Is it possible to do something with this information and log errors? Or I have to recreate lxc container? Is it possible because of zfs drive?

[WARNING] Some containers may not work properly due to ZFS not supporting 'fallocate'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.