1.[root@SN-test02 ~]# pvcreate /dev/sdb1 //提示有挂在文件系统后来找了许久原来是blk-availability服务的原因
Can't open /dev/sdb1 exclusively. Mounted filesystem?[root@SN-test02 ~]# /etc/rc.d/init.d/blk-availability stop //停止blk-availability服务问题解决
Stopping block device availability: Deactivating block devices: DM: deactivating part device 36848f690ec558f0018ed6562059a2c48p1 (dm-1) DM: deactivating mpath device 36848f690ec558f0018ed6562059a2c48 (dm-0) [ OK ] [root@SN-test02 ~]# pvcreate /dev/sdb1 //重新创建pv问题解决。 Physical volume "/dev/sdb1" successfully created 2.[root@SN-test02 ~]# virsh list //无缘无故用了sasl认证进不了virsh shell. Please enter your authentication name: Please enter your password: error: Failed to reconnect to the hypervisor error: no valid connection error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): generic failure: All-whitespace username.) [root@SN-test02 ~]# vi /etc/libvirt/libvirtd.conf //查看libvirtd.conf文件发现由于安装了vdsm软件底部添加了以下内容。## beginning of configuration section by vdsm-4.9.6
listen_addr="0.0.0.0" unix_sock_group="kvm" unix_sock_rw_perms="0770" auth_unix_rw="sasl"//井号掉重启service libvirtd restart就可以了。 save_p_w_picpath_format="lzop" log_outputs="1:file:/var/log/libvirtd.log" log_filters="1:libvirt 3:event 3:json 1:util 1:qemu" ca_file="/etc/pki/vdsm/certs/cacert.pem" cert_file="/etc/pki/vdsm/certs/vdsmcert.pem" key_file="/etc/pki/vdsm/keys/vdsmkey.pem" ## end of configuration section by vdsm-4.9.6 3.KVM虚拟机迁移: 迁移命令:virsh migrate –live<id or name> qemu+ssh://<dstip>/system tcp://<dstip>:49152迁移完之后,本地机器可能仍是定义状态,要执行virsh undefine <name>清除。
注意:/dev/zero是一个输入设备,用来初始化文件。
/dev/null是个无底洞,可以向它输出任何数据,它通吃并且不会撑着。