View previous topic :: View next topic |
Author |
Message |
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Sun Dec 17, 2017 2:38 am Post subject: LXD, OpenRC host and Ubuntu guest |
|
|
Hello,
I am trying to run Ubuntu Xenial on a OpenRC gentoo host. The vm starts fine but systemd in the guest doesnt work,
Code: |
$lxc launch images:ubuntu/xenial zmvm
$lxc list
+-----------+---------+----------------------+-----------------------------------------------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-----------+---------+----------------------+-----------------------------------------------+------------+-----------+
| zmvm | RUNNING | 10.188.40.103 (eth0) | fd42:b894:7823:884a:216:3eff:fe25:a786 (eth0) | PERSISTENT | 0 |
+-----------+---------+----------------------+-----------------------------------------------+------------+-----------+
$ lxc exec zmvm /bin/bash
root@zmvm:~# systemctl status
Failed to connect to bus: No such file or directory
|
I tried running lxcfs on the host but it crashes on startup
Code: |
# /etc/init.d/lxcfs status
* status: crashed
|
How do i get Ubuntu working?
Last edited by trumee on Tue Dec 19, 2017 4:01 pm; edited 1 time in total |
|
Back to top |
|
|
LIsLinuxIsSogood Veteran
Joined: 13 Feb 2016 Posts: 1179
|
|
Back to top |
|
|
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Sun Dec 17, 2017 5:27 am Post subject: |
|
|
I dont have /sys/fs/cgroup/systemd on the host. |
|
Back to top |
|
|
LIsLinuxIsSogood Veteran
Joined: 13 Feb 2016 Posts: 1179
|
Posted: Sun Dec 17, 2017 6:33 am Post subject: |
|
|
It is a cgroup, you would probably have to create yourself so that the vm client would look to the host and see it there. It doesn't exist by default, and I am not sure how this other forum user got it there to begin with, maybe posting a reply to the link asking him! Typically it is no good to necrobump in this way but you can because the information isn't already mentioned. |
|
Back to top |
|
|
C5ace Guru
Joined: 23 Dec 2013 Posts: 472 Location: Brisbane, Australia
|
Posted: Sun Dec 17, 2017 9:04 am Post subject: |
|
|
Install VirtualBox on your Gentoo host and Ubunto as a VirtualBox Guest.
Works fine for me. I run OpenSuse, Debian ans various Win$ versions at the same time as guests to simulated a mixed Samba network for testing. |
|
Back to top |
|
|
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Sun Dec 17, 2017 1:37 pm Post subject: |
|
|
C5ace wrote: | Install VirtualBox on your Gentoo host and Ubunto as a VirtualBox Guest.
Works fine for me. I run OpenSuse, Debian ans various Win$ versions at the same time as guests to simulated a mixed Samba network for testing. |
I am looking for something lean, not full blown like Virtualbox. |
|
Back to top |
|
|
C5ace Guru
Joined: 23 Dec 2013 Posts: 472 Location: Brisbane, Australia
|
Posted: Sun Dec 17, 2017 2:46 pm Post subject: |
|
|
trumee wrote: | C5ace wrote: | Install VirtualBox on your Gentoo host and Ubunto as a VirtualBox Guest.
Works fine for me. I run OpenSuse, Debian ans various Win$ versions at the same time as guests to simulated a mixed Samba network for testing. |
I am looking for something lean, not full blown like Virtualbox. |
VirtualBox memory requrements for running WinXP client are in my case about 250KB over head. Allocated RAM is 2GB and 128KB vor Video. Minimum for Gentoo Xfce is 250MB. Practical is 512KB plus 16KB for Video.
For alternatives read:
https://en.wikipedia.org/wiki/Virtual_machine
You may be able to run Ubunto in a Changed Root environment. |
|
Back to top |
|
|
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Sun Dec 17, 2017 5:34 pm Post subject: |
|
|
This fixed it:
On the host,
Code: |
# mkdir -p /sys/fs/cgroup/systemd
# mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd
|
or install libcgroup following follow and add cgconfig to runlevel.
In the container,
Code: |
# systemctl status
● zmvm
State: degraded
Jobs: 0 queued
Failed: 3 units
Since: Sun 2017-12-17 17:33:05 UTC; 1min 23s ago
CGroup: /
├─146 bash
├─162 systemctl status
├─163 pager
├─init.scope
│ └─1 /sbin/init
└─system.slice
├─console-getty.service
│ └─143 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 linux
├─cron.service
│ └─78 /usr/sbin/cron -f
├─systemd-udevd.service
│ └─18 /lib/systemd/systemd-udevd
├─rsyslog.service
│ └─79 /usr/sbin/rsyslogd -n
├─networking.service
│ └─121 /sbin/dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
└─systemd-journald.service
└─20 /lib/systemd/systemd-journald
|
|
|
Back to top |
|
|
|