I only know how to deploy LXC on Proxmox and have read and watched some stuff to understand LXD/LXC better.
As I understand it LXD is simply a way to deploy LXC (Correct me if I'm wrong). But fundamentally it is LXC.
From my understanding it should be possible to get the NextCloudPi image running under proxmox.
However, the image is packed as: NextCloudPi_LXD_10-08-21.tar.bz2
This can not be uploaded to proxmox.
Is there a way of getting the image up and running under Proxmox, if so, how? Is it packed wrongly?
aida@aida-desktop:~/Downloads$ bunzip2 -c < NextCloudPi_LXD_10-08-21.tar.bz2 | gzip -c > NextCloudPi_LXD_10-08-21.tar.gz
bunzip2: (stdin) is not a bzip2 file.
aida@aida-desktop:~/Downloads$ file NextCloudPi_LXD_10-08-21.tar.gz
NextCloudPi_LXD_10-08-21.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 0
I tried using 7-zip to uncompress from tar.bz2 and recompress into tar.gz. I was able to upload that into proxmox. When I tried to create the container using that file, I got many errors like this:
I finally have had some time to look into this more.
I was able to solve the issue with the file extension.
Thanks to this post I was able to use the advice given by @wbumiller and convert the LXD to tar.gz
Here is how I did it. (on Manjaro)
After downloading the NCP_LXD image:
Code:
~]$ cd /home/mnj/Downloads/
Downloads]$ ls -l
drwxr-xr-x 2 mnj mnj 4096 30. Nov 21:17 NextCloudPi_LXD_10-08-21
Downloads]$ mkdir temp-convrt
Downloads]$ cd temp-convrt/
temp-convrt]$ tar xpf /home/mnj/Downloads/NextCloudPi_LXD_10-08-21/NextCloudPi_LXD_10-08-21.tar.bz2
temp-convrt]$ ls -l
drwxr-xr-x 3 mnj mnj 4096 17. Dez 23:36 backup
temp-convrt]$ sudo tar cpzf /home/mnj/Downloads/ncp-lxd4proxmox.tar.gz -C backup/container/rootfs/ .
Note: You need to pack backup/container/rootfs/ . if you try to directly pack the backup/ or backup/container/ directory, you will get the following error when trying to install on Proxmox:
Logical volume "vm-285-disk-0" created.
Creating filesystem with 4194304 4k blocks and 1048576 inodes
Filesystem UUID: 6d5f201a-80c7-40ca-9de0-4554b2adf70c
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
extracting archive '/var/lib/vz/template/cache/ncp-lxd4proxmox.tar.gz'
Total bytes read: 1645465600 (1.6GiB, 119MiB/s)
Architecture detection failed: open '/bin/sh' failed: No such file or directory
Falling back to amd64.
Use `pct set VMID --arch ARCH` to change.
/etc/os-release file not found and autodetection failed, falling back to 'unmanaged'
TASK OK
It seems to me, Proxmox does not search the directory. But actually, I have no idea what the issue is.
Packed as .tar.gz the ncp-lxd template can now be uploaded
Logical volume "vm-286-disk-0" created.
Creating filesystem with 4194304 4k blocks and 1048576 inodes
Filesystem UUID: 58021b38-dfa6-46c2-a477-0803307ae5a6
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
extracting archive '/var/lib/vz/template/cache/ncp-lxd4proxmox.tar.gz'
Total bytes read: 1641226240 (1.6GiB, 107MiB/s)
Detected container architecture: amd64
Creating SSH host key 'ssh_host_dsa_key' - this may take some time ...
done: SHA256:/aI+KhRxxbpGFe4LLOiIQKaFUhF91Dl28IIt9KJGBdM root@ncp-lxd-rootfs
Creating SSH host key 'ssh_host_rsa_key' - this may take some time ...
done: SHA256:3TnPhwIbn8xyXJSbCt9SKUqk1iliNH4EGsgqai23dYA root@ncp-lxd-rootfs
Creating SSH host key 'ssh_host_ecdsa_key' - this may take some time ...
done: SHA256:ZtzuM49YTDFIcszCIF3JpTDlAnwk2LSFgSTmph0zgTg root@ncp-lxd-rootfs
Creating SSH host key 'ssh_host_ed25519_key' - this may take some time ...
done: SHA256:YUZUKhWUXBqxhA1bWBt2gSJsT0l384JKGv0/3ghWBfM root@ncp-lxd-rootfs
TASK OK
So far so good. It is possible to spin up the CT and access the >_Shell HOWEVER..
If I want to access the web interface of Nextcloud, I was first greeted with a promising: “Warning: Potential Security Risk Ahead”
But subsequently disappointed with a:
Forbidden
You don’t have permission to access this resource.
Judging from this error, some permission issue might have arisen when converting to tar.gz or LXD somehow works a bit different in this regard. Honestly, I'm utterly clueless.
One thing I'm unsure about is that in this post, where I have copied the steps for converting the file from, @wbumiller points out the following:
Code:
~/conversion-temp-dir # ls -ld rootfs
<make sure this shows a directory owned by root, not some unkown user>
Here is how it looks in the case of the NCP-LXD Template:
drwxr-xr-x 16 mnj mnj 4.0K 18. Dez 00:44 rootfs but this suggests to me that mnj is the owner and not root as it should be... but
permissions on Linux still give me a headache. Can someone tell me if this is correct?
I have raised this same issue in the Nextcloud Forum as well, but this might be a Proxmox issue.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.