Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LXD, OpenRC host and Ubuntu guest
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 551
Location: London,UK

PostPosted: Sun Dec 17, 2017 2:38 am    Post subject: LXD, OpenRC host and Ubuntu guest Reply with quote

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
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sun Dec 17, 2017 5:19 am    Post subject: Reply with quote

Not sure, personally I don't have any vm's running that would require the different system .

Have you checked this out, though it might help: https://forums.gentoo.org/viewtopic-t-1042340-start-0.html
Back to top
View user's profile Send private message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 551
Location: London,UK

PostPosted: Sun Dec 17, 2017 5:27 am    Post subject: Reply with quote

I dont have /sys/fs/cgroup/systemd on the host.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sun Dec 17, 2017 6:33 am    Post subject: Reply with quote

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
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 472
Location: Brisbane, Australia

PostPosted: Sun Dec 17, 2017 9:04 am    Post subject: Reply with quote

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
View user's profile Send private message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 551
Location: London,UK

PostPosted: Sun Dec 17, 2017 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 472
Location: Brisbane, Australia

PostPosted: Sun Dec 17, 2017 2:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 551
Location: London,UK

PostPosted: Sun Dec 17, 2017 5:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum