免费注册 查看新帖 |

Chinaunix

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

xen PV guest domain 笔记 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-23 15:14 |只看该作者 |倒序浏览
This doc is only for the persons who has basic concept of Solaris xen PV domain, and will be helpful as a memorandum。
*Setup guest domain
-------------------------------------------------------------------------------------------------------------
create a file (or a disk slice, zvol) as the root disk

        #mkfile -n 5g /path/domain.root
        #chmod -R 777 /path/domain.root     #if don't want to open all the access, leave it to virt-install to create the root file, not create root file by mkfile

use virt-install to install domain, answer several question
        domain name
        ram - 768
        disk - path
        install image /net/abc.prc/ftp/pub/CDimages/nv/90/x86/solarisdvd.iso

       
setup the boot flags, add the entry to /boot/grub/menu.lst and change the "default $" accordingly

        Example
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris xVM
findroot (rootfs0,0,a)
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/uni
x
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------

title Solaris xVM 32-bit
findroot (rootfs0,0,a)
kernel$ /boot/xen.gz
module$ /platform/i86xpv/kernel/unix /platform/i86xpv/kernel/unix
module$ /platform/i86pc/boot_archive



*Admin guest domain(CLI access)
--------------------------------------------------------------------------------------------------------------
There are 2 ways to admin guest domain xm/virsh from domain0, we may select one of them.

By default, the guest domain will have an IF avaiable xnf0, you need to setup the IP so

you can access the guest domain through network

        #ifconfig xnf0 plumb
        #ifconfig xnf0 10.13.49.52/24 up

If you want the config keep through reboot, you need to setup the network config files.


        #xm list                                                                #show the domain info

        #xm start domain_name                        #if the domain is not start, use it

        #xm console domain_name                        #console access to guest domain,  ctrl+] to escape console

        #virsh dumpxml domain_name > /dommain_name.xml      #save the domain info to a file

        #virsh destory domain_name    #destory the guest domain
       
        #virsh undefine                                        #clean the info for guest domain

        #virsh create /domain_name.xml        #create the domain based on the xml file

For test purpose, after you config a domain, you'd better first dumpxml the domain to a file

in case if the domain crashed in the test, you can easy to recreate it by the xml file.

While testing, you may need to check the xen log for detail information

        /var/log/xen/xend.log
        /var/log/xen/xpvd.log

[ 本帖最后由 x3y4z5 于 2008-10-8 16:53 编辑 ]

评分

参与人数 1可用积分 +5 收起 理由
yuhuohu + 5 我很赞同

查看全部评分

论坛徽章:
0
2 [报告]
发表于 2008-09-23 23:13 |只看该作者
welcome to back. friend

although i don't understand and use xen. i still think this is a good valuable article。

thanks for your experience

up.up~go~go~

[ 本帖最后由 yuhuohu 于 2008-9-24 11:37 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP