nosada / mkosi-files Goto Github PK
View Code? Open in Web Editor NEWConfigs and files for creating basic Arch Linux container image on systemd-nspawn using mkosi
License: Do What The F*ck You Want To Public License
Configs and files for creating basic Arch Linux container image on systemd-nspawn using mkosi
License: Do What The F*ck You Want To Public License
We have guispawn folder but how to have nspawn container that completely support steam game (maybe lutris for ease management)?
I've read some interesting topic here but not fully try to run steam games via nspawn container.
Host OS: archlinux latest with linux-lts
sudo vi /etc/systemd/nspawn/buildspawn.nspawn:
[Exec]
PrivateUsers=true
NotifyReady=true
[Files]
# Bind=/ramdisk/scratch/:/scratch/
[Network]
# Private=yes
VirtualEthernet=no
when login to container I can be able to ping google.com, but when I try to do pacman -Syy to sync pacman db or try pacman -Sy fd for example, pacman failed with below error:
:: Synchronizing package databases...
error: failed to update core (no servers configured for repository)
error: failed to update extra (no servers configured for repository)
error: failed to update community (no servers configured for repository)
error: failed to synchronize all databases
I used latest and default configs in buildspawn folder.
Steps to produce:
git clone .../mkosi-files
cd mkosi-files
sudo ./update-nspawn-images buildspawn/
sudo systemd-nspawn -UM buildspawn
passwd
exit
# start to container
sudo machinectl start buildspawn
# will failed to start due to # Bind=/ramdisk/scratch/:/scratch/
# I have to comment out Bind=/ramdisk/scratch/:/scratch/ in /etc/systemd/nspawn/buildspawn.nspawn to make it work
# login to container
sudo machinectl login buildspawn
root
<password.
ip ad
ping google.com
# failed
on host I have ve-* interface, and inside container I have another interface without IP address, I would expect the non-lo interface should have and ip address assigned to it and I'll be able to ping google.com from container.
all setup are mostly default and I haven't changed anything.
I use archlinux latest lts-linux, systemd-networkd to manage my wifi connection via wpa_supplicant profile.
Just ask, I work with aws services, I find it very fast and convenient to use mkosi to generate image used to spin container.
Is there away to use same method for generate image that compatible to use to upload to aws ami and use to spin up aws ec2 instance?
I can think it will require bios/mbr instead of UEFI.
Basically I want to generate latest image of ubuntu 20.04 with some custom configs and packages and upload to ec2 ami to use for spinning up ec2 instance. (similar to packer
)
I wonder whether we can auto login root
or builder
user when issue login command of machinectl
?
containt → container?
I build buildspawn
with default as in your repo and try to get builder shell with:
sudo machinectl shell builder@buildspawn
Connected to machine buildspawn. Press ^] three times within 1s to exit session.
Connection to machine buildspawn terminated.
Did you face the same problem? I can't get builder
shell.
Hi, I just start guispawn and try out if audio on firefox works, but it doesn't work. I pretty much use the default configuration from repo.
aplay -l does not show any devices under nspawn container that shows list of devices on host.
I use pulseaudio under host and connect bluetooth speark via pulseaudio-bluetooth, I have two packages on hosts:
pulseaudio-alsa
pulseaudio-bluetooth
These packages also avail under container.
The mounting of /dev/snd rw from host should give container all access to hosts audio and does not need any special step afaikto have audio to work on container but somehow I still does not have sound .
How do you handle audio under nspawn?
steps:
git clone <repo>
cd <repo>
sudo ./update-nspawn-images guispawn
sudo: unable to execute /usr/sbin/bash: Permission denied
I got above error when try to build guispawn, do you have same error?
I'm trying to clone buildspawn
and modify it to build ubuntuspawn
container, but when install, Makefile
always try to install arch packages:
install: ${NSPAWN}
▒░machinectl import-raw ${CONTAINER}
▒░install -Dm644 -o root -g root \
▒░▒░${CONTAINER}.nspawn /etc/systemd/nspawn/${CONTAINER}.nspawn
How to build ubuntu container same as building buildspawn
?
I've copied my dotfile folder to mkosi.extra/
folder and move it under /root of container via
vi mkosi.postinst:
mv -f /dotfile /root/
I want to run a script named install.sh
under /root/dotfile
of container, I tried to make it in mkosi.postinst
but I didn't execute:
vi mkosi.postinst:
/root/dotfile/install.sh
howto execute a script under container before start it? (just setup all things we want)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.