- 论坛徽章:
- 0
|
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 编辑 ] |
评分
-
查看全部评分
|