- 论坛徽章:
- 0
|
This doc is only for the persons who has basic concept of Solaris xen PV domain, and will be helpful as a memorandum。\r\n*Setup guest domain\r\n-------------------------------------------------------------------------------------------------------------\r\ncreate a file (or a disk slice, zvol) as the root disk\r\n\r\n #mkfile -n 5g /path/domain.root\r\n #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\r\n\r\nuse virt-install to install domain, answer several question\r\n domain name\r\n ram - 768\r\n disk - path\r\n install image /net/abc.prc/ftp/pub/CDimages/nv/90/x86/solarisdvd.iso\r\n\r\n \r\nsetup the boot flags, add the entry to /boot/grub/menu.lst and change the \"default $\" accordingly\r\n\r\n Example \r\n#---------- ADDED BY BOOTADM - DO NOT EDIT ----------\r\ntitle Solaris xVM\r\nfindroot (rootfs0,0,a)\r\nkernel$ /boot/$ISADIR/xen.gz\r\nmodule$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/uni\r\nx\r\nmodule$ /platform/i86pc/$ISADIR/boot_archive\r\n#---------------------END BOOTADM--------------------\r\n\r\ntitle Solaris xVM 32-bit\r\nfindroot (rootfs0,0,a)\r\nkernel$ /boot/xen.gz\r\nmodule$ /platform/i86xpv/kernel/unix /platform/i86xpv/kernel/unix\r\nmodule$ /platform/i86pc/boot_archive\r\n\r\n\r\n\r\n*Admin guest domain(CLI access)\r\n--------------------------------------------------------------------------------------------------------------\r\nThere are 2 ways to admin guest domain xm/virsh from domain0, we may select one of them.\r\n\r\nBy default, the guest domain will have an IF avaiable xnf0, you need to setup the IP so\r\n\r\nyou can access the guest domain through network\r\n\r\n #ifconfig xnf0 plumb\r\n #ifconfig xnf0 10.13.49.52/24 up\r\n\r\nIf you want the config keep through reboot, you need to setup the network config files.\r\n\r\n\r\n #xm list #show the domain info\r\n\r\n #xm start domain_name #if the domain is not start, use it\r\n\r\n #xm console domain_name #console access to guest domain, ctrl+] to escape console\r\n\r\n #virsh dumpxml domain_name > /dommain_name.xml #save the domain info to a file\r\n\r\n #virsh destory domain_name #destory the guest domain\r\n \r\n #virsh undefine #clean the info for guest domain\r\n\r\n #virsh create /domain_name.xml #create the domain based on the xml file\r\n\r\nFor test purpose, after you config a domain, you\'d better first dumpxml the domain to a file\r\n\r\nin case if the domain crashed in the test, you can easy to recreate it by the xml file.\r\n\r\nWhile testing, you may need to check the xen log for detail information\r\n\r\n /var/log/xen/xend.log\r\n /var/log/xen/xpvd.log\n\n[ 本帖最后由 x3y4z5 于 2008-10-8 16:53 编辑 ] |
|