XEN on OpenSolaris (2) - 创建DomU硬盘镜像

Disk Space Requirements

If your planning on using VBD-based Solaris guest domains, you will need to allocate sufficient disk space at the time the dom0 system is installed. A full Solaris install (SUNWcxall) consumes approximately 4 Gb of disk space. The dom0 root partition must have at least 10 Gb of space allocated, while 20 Gb is preferable. Plan on reserving at least 5 Gb per client image, as well as 5 Gb for each guest prototype image. In addition you'll need space for the flar archive.

Solaris supports both file-backed and device-backed VBD images. File-backed images are files files containing the UFS filesystem image and are accessed by mounting the file using the loopback file driver lofi(7d). Device-backed images can be stored in a disk partition or a Solaris Volume Manager device. Solaris Volume Manager soft partitions are the recommended method for storing domU images for the flexibility and performance advantages they have over physical disk partitions and file-backed images.

The domU prototype and client images are by default stored under /export/xc. If your planning on using file-backed prototypes or domU images, you must have sufficient disk space allocated to /export/xc, either as part of the root partition or as a secondary mount point.

domU prototype images

Once you have installed Solaris as dom0, you will need to create a prototype image from which client domU images are created. A prototype image is a copy of a flash archived which has been modified to run as a Solaris domU. You will first create a flash archive image of the dom0 which is then processing by vbdcfg to produce the prototype.

# flar create -n {flarname} -x /sys.flar /sys.flar

Do not use the -S option: this will not work due to a known bug. It is recommended that the flash archive be created immediately after the system has been installed to minimize the number of changes to the dom0 configuration before a prototype is constructed. You can also reduce the size of the dom0 images by removing packages from the dom0 system which are not needed prior to creating the flash archive.

Prototype images are created by invoking vbdcfg with the subcommand 'mkproto' to create either file-backed or device-backed images.

Example: Creating SVM-backed prototype image
 $ metadb -a -f /dev/dsk/c1t1d0s5
$ metainit myproto -p /dev/dsk/c1t1d0s5 5g
$ vbdcfg mkproto -d /dev/md/dsk/myproto -a /sys.flar myproto
$ vbdcfg lsproto
/export/xc/proto domU images
myproto: phy:/dev/md/dsk/myproto 10485760 blks

Note: metadb only needs to be executed once for each device being to create SVM partitions.

Example: Creating file-backed prototype image
 $ vbdcfg mkproto -f -a /sys.flar fileproto
$ vbdcfg lsproto

/export/xc/proto domU images
fileproto: file:/export/xc/proto/fileproto/root.file 8346763 blks
myproto: phy:/dev/md/dsk/myproto 10485760 blks

Creating Solaris domU guest VBD images

domU images are configured using the mkdomU subcommand. The process involves copying the protototype image into a client-specific root and makes client-specific customizations.

Example: Creating device-backed domUs
 $ metainit mydomU -p /dev/dsk/c1t1d0s5 10485760b
$ vbdcfg mkdomU -d /dev/md/dsk/mydomU -e aa:04:03:35:a8:44 myproto mydomU
Example: Creating file-backed domUs
 $ vbdcfg mkdomU -f -e aa:04:03:35:a8:44 fileproto mydomU

Booting Solaris domU VBD images

vbdcfg creates the xm python script for booting the domU guest under /export/xc/xvm/{domU}/{domU}.py and /export/xc/xvm/{domU}/{domU}-64.py.

Example
$ pwd
/export/xc/xvm/mydomU
$ ls
platform root.dev mydomU-64.py mydomU.py vmnt
$ xm create -c mydomU.py
Using config file "mydomU.py".
Started domain mydomU
SunOS Release 5.11 Version matrix-build-2006-08-15 32-bit
Copyright 1983-2006 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
DEBUG enabled
Hostname: mydomU
NIS domain name is mpklab.sfbay.sun.com
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。
经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值