ssh远程执行virsh
source link: https://blog.landon.li/2021/12/20/ssh%E8%BF%9C%E7%A8%8B%E6%89%A7%E8%A1%8Cvirsh/?amp%3Butm_medium=rss&%3Butm_campaign=ssh%25e8%25bf%259c%25e7%25a8%258b%25e6%2589%25a7%25e8%25a1%258cvirsh
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Landon's Blog
通过 ssh 远程执行 virsh 命令出现问题,和登录节点手动执行的结果不一致。
怀疑是某些环境变量在不同的登录方式下不一致导致的。
登录到节点上,执行命令 virsh uri
可以看到返回值是 qemu:///system
而通过 ssh 远程执行此命令,返回值是 qemu:///session
两种方式执行 virsh 命令确实不一致
ssh host -t “bash -l -c ‘”virsh command”‘
ssh host “LIBVIRT_DEFAULT_URI=qemu:///system virsh command”
https://askubuntu.com/questions/1066230/cannot-execute-virsh-command-through-ssh-on-ubuntu-18-04
本文链接: https://blog.landon.li/2021/12/20/ssh%e8%bf%9c%e7%a8%8b%e6%89%a7%e8%a1%8cvirsh/
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议,转载请注明来源。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK