免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3394 | 回复: 1
打印 上一主题 下一主题

redhat kvm 在物理机上怎么通过命令行来启动或停止或。。。。。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-05-26 14:11 |只看该作者 |倒序浏览
redhat kvm 在物理机上怎么通过命令行来启动或停止或重启物理机虚拟机也会自动重启,而不是直接断电那种关闭????

论坛徽章:
0
2 [报告]
发表于 2010-05-27 15:44 |只看该作者
已经搞定

如果用的是xen下创建的虚拟机
root@lab auto]# ln -s /etc/xen/rhel54 /etc/xen/auto/rhel54
[root@lab auto]# ls -l
總計 4
lrwxrwxrwx 1 root root 15 4月 15 23:12 rhel54 -> /etc/xen/rhel54
[root@lab auto]# pwd
/etc/xen/auto
# 手工啟動 rhel54 的設定檔案
[root@lab xen]# /etc/init.d/xendomains restart
Shutting down Xen domains:Restoring Xen domains: rhel54.
Starting auto Xen domains: rhel54(skip)[root@lab xen]#
# 預設開機啟動 xendomains 服務
[root@lab xen]# chkconfig xendomains on


如果先用的内核是kvm

28.1. Automtically starting guests
This section covers how to make virtualized guests start automatically during the host system's boot phase.
This example uses virsh to set a guest, TestServer, to automatically start when the host boots.
# virsh autostart TestServer
Domain TestServer marked as autostarted
The guest now automatically starts with the host.
To stop a guest automatically booting use the --disable parameter
# virsh autostart --disable TestServer
Domain TestServer unmarked as autostarted
The guest no longer automatically starts with the host.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP