Monthly Archives: August 2018

Error: Package: kmod-kvdo vdo ( Requires: kernel dm_put_device)

Error: Package: kmod-kvdo-6.1.0.181-17.el7_5.x86_64 (updates)
Requires: kernel(dm_unregister_target) = 0x35ba4186
Installed: kernel-3.10.0-862.el7.x86_64 (@anaconda)
kernel(dm_unregister_target) = 0x62b8c739
Installed: vzkernel-3.10.0-862.9.1.vz7.63.3.x86_64 (@openvz-os)
kernel(dm_unregister_target) = 0x97f3d3e0
Available: kernel-debug-3.10.0-862.el7.x86_64 (base)
kernel(dm_unregister_target) = 0x9fea9142
Available: kernel-debug-3.10.0-862.2.3.el7.x86_64 (updates)
kernel(dm_unregister_target) = 0x9fea9142
Available: kernel-debug-3.10.0-862.3.2.el7.x86_64 (updates)
kernel(dm_unregister_target) = 0x9fea9142
Available: kernel-debug-3.10.0-862.3.3.el7.x86_64 (updates)
kernel(dm_unregister_target) = 0x9fea9142
Available: kernel-debug-3.10.0-862.6.3.el7.x86_64 (updates)
kernel(dm_unregister_target) = 0xe573fa0d
Available: kernel-debug-3.10.0-862.9.1.el7.x86_64 (updates)
kernel(dm_unregister_target) = 0xe573fa0d
Available: kernel-debug-3.10.0-862.11.6.el7.x86_64 (updates)
kernel(dm_unregister_target) = 0xe573fa0d
Available: vzkernel-debug-3.10.0-862.9.1.vz7.63.3.x86_64 (openvz-os)
kernel(dm_unregister_target) = 0x854b76de
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Fix:

yum --disablerepo=* --enablerepo=base install vdo kmod-kvdo

Kickstart install Centos 7 using virt-install


sudo qemu-img create -f qcow2 /var/lib/libvirt/images/centos7.qcow2 15G

sudo iptables -t nat -A POSTROUTING -j MASQUERADE
or
firewall-cmd --zone=external --add-masquerade --permanent
firewall-cmd --reload

This helps avoid errors like: dracut-initqueue[688]: Warning: unknown network kickstart URL: ...

mkdir kick && mkdir kick

vim centos7.cfg

#version=RHEL7
install

auth --enableshadow --passalgo=sha512
repo --name="EPEL" --baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64
eula --agreed
reboot
url --url="http://mirror.litnet.lt/centos/7/os/x86_64/"
firstboot --enable
ignoredisk --only-use=vda
keyboard --vckeymap=en --xlayouts='en'
lang en_US.UTF-8

network --bootproto=dhcp --device=enp0s3 --noipv6 --activate
network --hostname=centos7.test.local
rootpw mypassword
services --enabled=NetworkManager,sshd,chronyd
timezone Europe/Vilnius --isUtc --ntpservers=0.centos.pool.ntp.org,1.centos.pool.ntp.org,2.centos.pool.ntp.org,3.centos.pool.ntp.org
user --groups=wheel --homedir=/home/monit --name=monit --password=password --iscrypted --gecos="monit"
bootloader --location=mbr --boot-drive=vda
autopart --type=lvm
zerombr
clearpart --all --drives=vda
selinux --permissive

%packages
@base
@core
chrony
yum-cron
%end

python -m SimpleHTTPServer 1111
Serving HTTP on 0.0.0.0 port 1111 ...
or
python3 -m http.server 1111
Serving HTTP on 0.0.0.0 port 1111 (http://0.0.0.0:1111/) ...

sudo virt-install --connect=qemu:///system --network=bridge:virbr0 --extra-args="ks=http://192.168.0.101:1111/centos7.cfg console=tty0 console=ttyS0,115200" --name=centos7 --disk /var/lib/libvirt/images/centos7.qcow2,size=15,device=disk,bus=virtio,format=qcow2 --ram 1500 --vcpus=1 --check-cpu --accelerate --hvm --location=http://mirror.litnet.lt/centos/7/os/x86_64/ --nographics

CentOS Linux 7 (Core)
Kernel 3.10.0-862.el7.x86_64 on an x86_64

centos7 login:

union file systems overlay

mkdir -v lowerdir upperdir workdir overlay
sudo tree
.
├── lowerdir
├── overlay
├── upperdir
└── workdir

lowerdir layer (read only, base layer)
overlay layer (main view)
work layer (diff view, diff layer )

sudo mount -t overlay -o lowerdir=lowerdir,upperdir=upperdir,workdir=workdir overlay overlay

echo test > lowerdir/test

sudo tree
.
├── lowerdir
│   └── test
├── overlay
│   └── test
├── upperdir
└── workdir
└── work

echo 'some new data' >> overlay/test
sudo tree
.
├── lowerdir
│   └── test
├── overlay
│   └── test
├── upperdir
│   └── test
└── workdir
└── work

This is principe how docker is working.

postfix amavis centos


yum install amavisd-new clamav-scanner clamav-scanner-systemd
systemctl start clamd@amavisd amavisd spamassassin
systemctl enable clamd@amavisd amavisd spamassassin

vi /etc/postfix/main.cf
content_filter=smtp-amavis:[127.0.0.1]:10024

vi /etc/postfix/master.cf

smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000

service restart postfix

postfix enable rbl centos 7

vi /etc/postfix/main.cf

smtpd_helo_required = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
invalid_hostname_reject_code = 554
multi_recipient_bounce_reject_code = 554
non_fqdn_reject_code = 554
relay_domains_reject_code = 554
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 554
unknown_relay_recipient_reject_code = 554
unknown_sender_reject_code = 554
unknown_virtual_alias_reject_code = 554
unknown_virtual_mailbox_reject_code = 554
unverified_recipient_reject_code = 554
unverified_sender_reject_code = 554

smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
permit

postfix whitelist domains


vi /etc/postfix/whitelist_domains
google.com OK
gmail.com OK

postmap /etc/postfix/whitelist_domains

vi /etc/postfix/main.cf

smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
check_client_access hash:/etc/postfix/whitelist_domains,
reject_rbl_client dsn.rfc-ignorant.org,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client ix.dnsbl.manitu.net,
reject_rbl_client combined.rbl.msrbl.net,
reject_rbl_client rabl.nuclearelephant.com,
permit

service postfix restart

● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: active (running) since Tr 2018-08-29 18:32:05 CEST; 1s ago
Process: 10656 ExecStop=/usr/sbin/postfix stop (code=exited, status=0/SUCCESS)
Process: 10672 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
Process: 10669 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
Process: 10666 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
Main PID: 10748 (master)
CGroup: /system.slice/postfix.service
├─10748 /usr/libexec/postfix/master -w
├─10750 pickup -l -t unix -u
└─10751 qmgr -l -t unix -

Error in ioctl(CPT_TEST_VECAPS): Resource temporarily unavailable

OpenVZ is running…
Checking for CPT version compatibility
Checking for CPU flags compatibility
Error: CT is locked
Error in ioctl(CPT_TEST_VECAPS): Resource temporarily unavailable
Error: CPU capabilities check failed!
Error: Destination node CPU is not compatible
Error: Can’t continue live migration

Reboot not help:

vzctl restart CTID
Restarting container
Stopping container …
Child 441850 exited with status 7
Killing container …
Child 441851 exited with status 7
Unable to stop container

Fix:

vzctl chkpnt CTID --kill