Glen Pitt-Pladdy :: BlogXenial LXC Container on Debian | |||
My mission was to have an Ubuntu Xenial container running on my Debian Jessie server to run server software which has to match the version on the clients (Mint/Ubuntu). That seems reasonable enough. PrepAssuming you've already got LXC running (eg. with Debian containers) on Jessie, you will need an updated debootstrap to be able to do Ubuntu Xenial containers. Fortunately Debian Backports provides updated packages and you will need debootstrap version 1.0.81~bpo8+1 or later for this to work. After updating that you should be able to run: # lxc-create -n thenewcontainer -t ubuntu -- -r xenial ... but FailThat works pretty well until late in the install it bails (fortunately tidying up after it's self) with an error like: ... This seems to be trying to install the lxcguest package, but that doesn't exist in recent versions of Ubuntu. FixAfter a lot of hunting around for what was trying to install this package, I eventually found /usr/share/lxc/templates/lxc-ubuntu on line 515 which seems to be for older versions of Ubuntu where this package existed. The easy way (but may break building older Ubuntu containers) is to simply comment out the line: # chroot $rootfs apt-get install --force-yes -y lxcguest
After that it all works. |
|||
Disclaimer: This is a load of random thoughts, ideas and other nonsense and is not intended to be taken seriously. I have no idea what I am doing with most of this so if you are stupid and naive enough to believe any of it, it is your own fault and you can live with the consequences. More importantly this blog may contain substances such as humor which have not yet been approved for human (or machine) consumption and could seriously damage your health if taken seriously. If you still feel the need to litigate (or whatever other legal nonsense people have dreamed up now), then please address all complaints and other stupidity to yourself as you clearly "don't get it".
Copyright Glen Pitt-Pladdy 2008-2023
|
Comments:
Thanks a lot for those notes, they helped a lot!
As I encounter another problem and my google search did not succeed perhaps you may help.
After a successful installation of ubuntu xenial as guest under debian jessie I am not able to login on the console using lxc-console. The remote access via ssh is working perfectly, and to be honest this is the most important, but it would be perfect if console access is working also.
So did you encounter a similar problem on your side?
Thanks for your feedback and please go on posting excellent stuff like the one above.
I can't say I've tried since from the host you can lxc-attach and that will execute the shell if you don't specify a command. If you want to use lxc-console, you may need to specify the tty as "0 for the console" as the man page says.