今天有傻逼莫名其妙断了我母鸡的电,然后40多台虚拟机全都不能启动,吓出一身冷汗.
报错为:
Thu Sep 30 14:54:04 2021 [Z0][VM][I]: New LCM state is BOOT_UNKNOWN
Thu Sep 30 14:54:04 2021 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/247/deployment.0
Thu Sep 30 14:54:04 2021 [Z0][VMM][I]: Command execution failed (exit code: 255): /var/lib/one/remotes/tm/qcow2/context /var/lib/one/vms/247/context.sh localhost:/var/lib/one//datastores/0/247/disk.1 247 0
Thu Sep 30 14:54:04 2021 [Z0][VMM][E]: Error creating directory /var/lib/one/datastores/0/247 at localhost: Permission denied, please try again.
Thu Sep 30 14:54:04 2021 [Z0][VMM][E]: Permission denied, please try again.
Thu Sep 30 14:54:04 2021 [Z0][VMM][E]: root@localhost: Permission denied (publickey,password).
Thu Sep 30 14:54:04 2021 [Z0][VMM][I]: Failed to execute transfer manager driver operation: tm_context.
Thu Sep 30 14:54:04 2021 [Z0][VMM][E]: Error deploying virtual machine: Error creating directory /var/lib/one/datastores/0/247 at localhost: Permission denied, please try again.
Thu Sep 30 14:54:04 2021 [Z0][VM][I]: New LCM state is UNKNOWN
这个opennebula我也不熟悉,只是在用而已。
经过几个小时的搜索,网上并没有和我一样的错误。
最后我还是回到log上研究,并分析opennebula的原理
opennebula front和node之间是通过key连接,而我的都是在一台物理机上面。
所以就是直连本机,但是和连其他机器是一模一样的。
最后发现的结果是front的key,并没有同步给node的root
最后的解决方式是:
cp -rf /var/lib/one/.ssh /root/
反向操作应该也可以
覆盖之前请记得备份