无法创建 VPS 虚拟器

无法创建 VPS 虚拟器

我已经在 CentOS 服务器上安装了 Virtualizor (KVM),并且正在尝试创建一个 VPS,
我已经为我的虚拟机添加了存储和 IP 池,
为了创建存储,我遵循了本指南
https://www.virtualizor.com/wiki/Add_New_Storage
当我尝试创建 VPS 时,它失败并显示以下日志

sh: /bin/chattr: Permission denied
Starting Task : 12
Syncing up with Slave
Creating VPS : 3
File descriptor 3 (socket:[147315]) leaked on lvcreate invocation. Parent         
PID 43360: /usr/local/emps/bin/php
File descriptor 4 (socket:[147332]) leaked on lvcreate invocation. Parent 
PID 43360: /usr/local/emps/bin/php
File descriptor 5 (socket:[164259]) leaked on lvcreate invocation. Parent 
PID 43360: /usr/local/emps/bin/php
selabel_open failed: No such file or directory
selabel_open failed: No such file or directory
WARNING: dos signature detected on /dev/vg1/vsv1003-doguu2eku8qqo2f6- 
d8m51fxht2j4olsu at offset 510. Wipe it? [y/n]: [n]
Aborted wiping of dos.
1 existing signature left on the device.
File descriptor 3 (socket:[147315]) leaked on lvdisplay invocation. Parent 
PID 43360: /usr/local/emps/bin/php
File descriptor 4 (socket:[147332]) leaked on lvdisplay invocation. Parent 
PID 43360: /usr/local/emps/bin/php
File descriptor 5 (socket:[164259]) leaked on lvdisplay invocation. Parent 
PID 43360: /usr/local/emps/bin/php
selabel_open failed: No such file or directory
selabel_open failed: No such file or directory
File descriptor 3 (socket:[147315]) leaked on lvresize invocation. Parent 
PID 43360: /usr/local/emps/bin/php
File descriptor 4 (socket:[147332]) leaked on lvresize invocation. Parent 
PID 43360: /usr/local/emps/bin/php
File descriptor 5 (socket:[164259]) leaked on lvresize invocation. Parent 
PID 43360: /usr/local/emps/bin/php
selabel_open failed: No such file or directory
selabel_open failed: No such file or directory
New size (25600 extents) matches existing size (25600 extents).
sfdisk: Warning: The partition table looks like it was made
for C/H/S=*/4/32 (instead of 13054/255/63).
For this listing I'll assume that geometry.

Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
sfdisk: Warning: The partition table looks like it was made
for C/H/S=*/4/32 (instead of 13054/255/63).
For this listing I'll assume that geometry.

Warning: partition 1 does not end at a cylinder boundary
Warning: partition 2 does not start at a cylinder boundary
Warning: partition 2 does not end at a cylinder boundary
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
BLKRRPART: Invalid argument
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
mkswap: /dev/mapper/vg1-vsv1003--doguu2eku8qqo2f6--d8m51fxht2j4olsu2: 
warning: wiping old swap signature.
device-mapper: remove ioctl on vg1-vsv1003--doguu2eku8qqo2f6-- 
d8m51fxht2j4olsu2  failed: Device or resource busy
e2fsck 1.42.9 (28-Dec-2013)
resize2fs 1.42.9 (28-Dec-2013)
setlocale: No such file or directory
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such 
file or directory
Creation Done
Setting Root / Admin Password
setlocale: No such file or directory
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such 
file or directory
Building DHCP
Redirecting to /bin/systemctl restart dhcpd.service
Starting VPS
setlocale: No such file or directory
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such 
file or directory
setlocale: No such file or directory
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such 
file or directory
setlocale: No such file or directory
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such 
file or directory
Fetching VPS Status
setlocale: No such file or directory
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such 
file or directory  

我还注意到 libvirtd 服务启动失败,并出现以下错误

Oct 17 09:12:40 master libvirtd[42928]: 2018-10-17 13:12:40.091+0000: 42944: 
info : hostname: master  
Oct 17 09:12:40 master libvirtd[42928]: 2018-10-17 13:12:40.091+0000: 42944: 
error : virSecuritySELinuxQEMUInitialize:634 : cannot open SELinux   
label_handle: No such file or directory   
Oct 17 09:12:40 master libvirtd[42928]: 2018-10-17 13:12:40.093+0000: 42944: 
error : qemuSecurityInit:447 : internal error: Failed to initialize security 
drivers   
Oct 17 09:12:40 master libvirtd[42928]: 2018-10-17 13:12:40.093+0000: 42944: 
error : virStateInitialize:775 : Initialization of QEMU state driver failed: 
internal error: Failed to initialize security drivers   
Oct 17 09:12:40 master libvirtd[42928]: 2018-10-17 13:12:40.093+0000: 42944: 
error : daemonRunStateInit:837 : Driver state initialization failed   

有人知道我的安装出了什么问题吗?

答案1

我环顾四周,问题实际上是 SElinux
我通过编辑禁用了 SElinux在/etc/selinux/配置文件并重新启动服务器,问题得以解决

相关内容