sudo podman run --name=ubuntu-1 --privileged --mount type=bind,source=/home/user/some_files,target=/root -p 9080:80 -it ubuntu:18.04 /bin/bash
Category Archives: Virtualization
Package moby-containerd 1.3.7+azure-1.x86_64.rpm is not signed
curl https://packages.microsoft.com/config/rhel/7/prod.repo >/etc/yum.repos.d/microsoft-prod.repo
docker detach from running container
To detach the tty without exiting the shell, use the escape sequence Ctrl+P followed by Ctrl+Q. More details here.
Additional info from this source:
docker run -t -i → can be detached with ^P^Qand reattached with docker attach
docker run -i → cannot be detached with ^P^Q; will disrupt stdin
docker run → cannot be detached with ^P^Q; can SIGKILL client; can reattach with docker attach
SSD Health Status on VMware ESXi
/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot = 0 pd all show detail
vmware check smart
esxcli storage core device list
esxcli storage core device smart get -d disk_name
vmware get version cli
vmware -vl
Containerfile build
vim Containerfile
FROM fedora
RUN dnf -y update && dnf -y install httpd && dnf clean all
sudo podman build --tag httpd .
sudo podman run --rm localhost/httpd rpm -q httpd
httpd-2.4.43-5.fc32.x86_64
podman read logs
sudo podman run --name web1 -dt -p 80:80 docker.io/library/httpd httpd -D FOREGROUND
bf5a2456f8f7e878405097402fe3ed32eb6f9e7b677ac09df1cce841cd7bf527
links -dump http://localhost
It works!
sudo podman container logs -f web1
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.88.0.33. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.88.0.33. Set the 'ServerName' directive globally to suppress this message
[Mon Aug 17 20:32:18.221008 2020] [mpm_event:notice] [pid 1:tid 139846430241920] AH00489: Apache/2.4.46 (Unix) configured -- resuming normal operations
[Mon Aug 17 20:32:18.221243 2020] [core:notice] [pid 1:tid 139846430241920] AH00094: Command line: 'httpd -D FOREGROUND'
10.88.0.1 - - [17/Aug/2020:20:32:45 +0000] "GET / HTTP/1.1" 304 -
10.88.0.1 - - [17/Aug/2020:20:32:45 +0000] "GET / HTTP/1.1" 304 -
10.88.0.1 - - [17/Aug/2020:20:32:48 +0000] "GET / HTTP/1.1" 304 -
new pod using run
sudo podman run -dt --pod new:nginx -p 32597:80 quay.io/libpod/alpine_nginx:latest
add container to pod
sudo podman pod create
4d03c9f1ef5f8f944cb61d598084a1191802694e59e7438b36e1dfecdaa04fe3
sudo podman ps -a --pod
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES POD ID PODNAME
e14f13b36519 k8s.gcr.io/pause:3.2 About a minute ago Created 4d03c9f1ef5f-infra 4d03c9f1ef5f loving_northcutt
sudo podman run -dt --pod loving_northcutt docker.io/library/alpine:latest top
sudo podman ps -a --pod
269ea28c6217 docker.io/library/alpine:latest top 14 seconds ago Up 14 seconds ago strange_hertz 4d03c9f1ef5f loving_northcutt
e14f13b36519 k8s.gcr.io/pause:3.2 3 minutes ago Up 14 seconds ago 4d03c9f1ef5f-infra 4d03c9f1ef5f loving_northcutt
sudo podman pod ps
POD ID NAME STATUS CREATED # OF CONTAINERS INFRA ID
4d03c9f1ef5f loving_northcutt Running 6 minutes ago 2 e14f13b36519
2 containers, it like array for containers
Failed to register the CT: PRL_ERR_VZCTL_OPERATION_FAIL
Failed to register the CT: PRL_ERR_VZCTL_OPERATION_FAILED (Details: Creating OS template cache for centos-8-x86_64 template
Can’t open /proc/sys/kernel/virt_osrelease: No such file or directory
Error: /usr/share/vzyum/bin/yum failed, exitcode=1
VE_PRIVATE is not set
Creation of Container private area failed
Make sure you are using vz7 kernel:
uname -a | grep vz7
Linux CentOS-78-64-minimal 3.10.0-1127.8.2.vz7.151.14 #1 SMP Tue Jun 9 12:58:54 MSK 2020 x86_64 x86_64 x86_64 GNU/Linux
/var/run/sshd missing after reboot openvz
Missing privilege separation directory: /var/run/sshd error
If you are updating SSH, please make sure /usr/lib/tmpfiles.d/sshd.conf have: d /run/sshd 0755 root root
reverting cgroups v1
sudo sed -i '/^GRUB_CMDLINE_LINUX/ s/"$/ systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg (for EFI)
Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 0:42 for /etc/gshadow)
echo user.max_user_namespaces=15076 | sudo tee -a /etc/sysctl.conf
echo 'vit:100000:65536' | sudo tree -a /etc/subuid
echo 'vit:100000:65536' | sudo tee -a /etc/subgid
sudo reboot
sudo podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/ubuntu latest 1e4467b07108 2 weeks ago 76.3 MB
converting CentOS 7 to VZ7
centos install virtuozzo
yum install epel-release
wget https://download.openvz.org/virtuozzo/releases/openvz-7.0.14-136/x86_64/os/Packages/p/python-subprocess32-3.2.7-1.vz7.5.x86_64.rpm
wget https://download.openvz.org/virtuozzo/releases/openvz-7.0.14-136/x86_64/os/Packages/o/openvz-release-7.0.14-3.vz7.x86_64.rpm
yum localinstall openvz-release-7.0.14-3.vz7.x86_64.rpm python-subprocess32-3.2.7-1.vz7.5.x86_64.rpm
wget http://repo.virtuozzo.com/vzlinux/7/x86_64/os/Packages/r/readykernel-scan-0.11-1.vl7.noarch.rpm
wget http://repo.virtuozzo.com/vzlinux/7/x86_64/os/Packages/z/zstd-1.4.4-1.vl7.x86_64.rpm
wget http://repo.virtuozzo.com/vzlinux/7/x86_64/os/Packages/v/vzlinux-release-7-1.vl7.90.x86_64.rpm
mv /etc/yum.repos.d/CentOS-* /root/
rpm -e --nodeps --justdb json-c
yum erase jansson
wget http://repo.virtuozzo.com/vzlinux/7.8/x86_64/os/Packages/j/jansson-2.10-1.vl7.1.x86_64.rpm
wget http://repo.virtuozzo.com/vzlinux/7.8/x86_64/os/Packages/j/json-c-0.11-13.vl7.1.x86_64.rpm
yum localinstall jansson-2.10-1.vl7.1.x86_64.rpm
yum localinstall json-c-0.11-13.vl7.1.x86_64.rpm
yum install prlctl prl-disp-service vzkernel *ploop*
yum update
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : Virtuozzo (3.10.0-1127.18.2.el7.x86_64) 7.0.14
1 : Virtuozzo (3.10.0-1127.8.2.vz7.151.14) 7.0.14
2 : Virtuozzo (3.10.0-1127.8.2.el7.x86_64) 7.0.14
3 : Virtuozzo (0-rescue-9063ac396d784f4c997ceacdd0590c25) 7.0.14
grub2-set-default 1
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot
#OVZ templates
yum install *ez.noarch