VBoxManage list bridgedifs
Category Archives: Virtualization
virtualbox: kernel driver not installed (rc=-1908) fedora
sudo dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
sudo dnf install VirtualBox-4.3
sudo /etc/init.d/vboxdrv setup
virtualbox: Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
sudo dnf install kernel-devel-$(uname -r)
FATA[0025] Error: failed to start one or more containers
Error response from daemon: Cannot start container NAME: [8] System error: Unit docker-3c5b6a35d06f15382c108fb195b5c3b468ff38dac1b1e5fb7b883642988ddbad.scope already exists.
sudo docker stop docker-3c5b6a35d06f15382c108fb195b5c3b468ff38dac1b1e5fb7b883642988ddbad.scop
FATA[0001] Repository does not exist: docker.io/username
docker push vitasis/apache
FATA[0002] Repository does not exist: docker.io/vitasis/apache
Fix:
docker tag 9b76a117f34a vitasis/apache
docker push vitasis/apache
9b76a117f34a: Image successfully pushed
install etcd from source
Etcd don’t have instructions howto install, so there you go:
git clone https://github.com/coreos/etcd
cd etcd
./build
go get github.com/mattn/goreman
goreman start
$GOPATH not set
export GOPATH="$HOME/go"
docker stop all containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
systemd[190]: Failed at step NAMESPACE spawning /usr/libexec/mariadb-prepare-db-dir: Operation not permitted
sed -i s/PrivateTmp=True/PrivateTmp=False/ /lib/systemd/system/mariadb.service
systemctl daemon-reload
systemctl start mariadb
systemd[34]: Failed at step NAMESPACE spawning /usr/sbin/httpd: Operation not permitted
Process: 64 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=226/NAMESPACE)
If you have problems start centos 7 on docker running ssytemd without privileged containers rights:
sed -i s/PrivateTmp=True/PrivateTmp=False/ /lib/systemd/system/httpd.service
systemctl daemon-reload
and; systemctl start httpd
docker rename image
docker tag server:latest myname/server:latest
linux kvm check ksm usage
grep -H ” /sys/kernel/mm/ksm/pages_*
docker container resource usage
sudo docker stats 8ba0fad4e9a6
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
8ba0fad4e9a6 0.00% 15.75 MiB/3.726 GiB 0.41% 956 B/870 B
docker centos 7.1 systemd
cat Dockerfile
FROM docker.io/centos
MAINTAINER vitasis
ENV container docker
RUN yum clean all; yum -y install hostname tar git; yum -y update; yum clean all
# https://bugzilla.redhat.com/show_bug.cgi?id=1118740
RUN yum -y swap -- remove systemd-libs -- install systemd systemd-libs; yum clean all; \
#RUN yum -y install systemd systemd-libs; yum clean all; \
(cd /lib/systemd/system/sysinit.target.wants/ && for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]
sudo docker build --rm=true -t vitasis/centos7-systemd .
sudo docker run --name test --privileged -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro vitasis/centos7-systemd
sudo docker ps | grep test
sudo docker exec -i -t 63f43c4ccbba bash
Detected virtualization 'other'.
Welcome to CentOS Linux 7 (Core)!
Set hostname to <79251a373052>.
Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[ OK ] Reached target Paths.
[ OK ] Listening on Journal Socket.
[ OK ] Listening on Delayed Shutdown Socket.
[ OK ] Reached target Swap.
[ OK ] Created slice Root Slice.
[ OK ] Created slice System Slice.
[ OK ] Reached target Slices.
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
Starting Journal Service...
[ OK ] Started Journal Service.
[ OK ] Started Create Volatile Files and Directories.
[ OK ] Reached target System Initialization.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Timers.
[ OK ] Reached target Basic System.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
If you want to deatech form docker session, you need to use a daemon:
sudo docker run --name test --cap-add SYS_ADMIN -d -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro vitasis/centos7-systemd
privileged or SYS_ADMIN is needed, because of using mount with selinux or apparmor.
decking create docker cluster simple
Decking json example:
vi decking.json
{
"containers": {
"centos7a": "milcom/centos7-systemd",
"centos7b": "milcom/centos7-systemd"
},
"clusters": {
"main": ["centos7a", "centos7b"]
}
}
And lets build:
sudo decking create main
centos7a ...
centos7b ...
centos7a creating...
centos7b ...
centos7a creating... ✔
centos7b ...
centos7a creating... ✔
centos7b creating...
centos7a creating... ✔
centos7b creating... ✔
sudo decking start main
centos7a ...
centos7b ...
centos7a starting...
centos7b ...
centos7a starting... ✔
centos7b ...
centos7a starting... ✔
centos7b starting...
centos7a starting... ✔
centos7b starting... ✔
sudo decking status main
centos7a ...
centos7b ...
centos7a ...
centos7b running 172.17.0.2
centos7a running 172.17.0.1
centos7b running 172.17.0.2
Lets check if its really running:
c4175064768b milcom/centos7-systemd:latest “/usr/sbin/init” 3 minutes ago Up About a minute centos7b
b4b1766eb4d8 milcom/centos7-systemd:latest “/usr/sbin/init” 3 minutes ago Up About a minute centos7a
I guess its better than FIG.
Next step use ansible to manage these VM, its quit fast.