Development Guide: build HVM IO domain on xVM

本文档详细介绍了如何使用xvm-3.3版本的hypervisor及基于onnv_121的domain0来构建HVMIO域。主要内容包括升级domain0、构建xvm-3.3软件包、配置GRUB启动菜单以及将PCI设备传递给HVM来宾等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

This document describes the instructions to build HVM IO domain. The hypervisor is based on xvm-3.3 and domain 0 based on onnv_121.

 

1. Upgrade domain 0

1) Install Nevada build 121 onto the system which supports Intel virtualization technology for direct IO. Make sure Intel vt-d is enabled in BIOS setting.

 

2) Build the BFU archive from onnv_121 with patches.

$ hg clone ssh://anon@hg.opensolaris.org/hg/onnv/onnv-gate

$ cd onnv-gate

$ hg update -C onnv_121

$ hg qinit

$ hg qimport pci-device-reservation

$ hg qpush

$ hg qimport xen-hcall-extension

$ hg qpush

 

Download closed binary archives from http://dlc.sun.com/osol/on/downloads/b121/. Unpatch the tar ball under onnv-gate.

 

$ bzcat on-closed-bins-nd.i386.tar.bz2 | tar xf -

$ bzcat on-closed-bins.i386.tar.bz2 | tar xf -

 

Setup env script and run nightly

 

$ cp usr/src/tools/env/opensolaris.sh ./

$ edit opensolaris.sh

$ nightly opensolaris.sh

 

3) BFU the system installed by step 1 with the archive built during step 2.

 

2. Build xvm-3.3 packages

1) Pull a xvm-3.3 code base under local directory

$ wget http://dlc.sun.com/osol/on/downloads/b121/xvm-src.tar.bz2

Or,

Pull it from ssh://anon@hg.opensolaris.org/hg/xen-gate/xvm-3.3+(sub-gates)

 

2) import the patch for xen.hg and qemu.hg

$ cd xen.hg

$ hg qpush -a

$ hg qimport python-pci-aug27

$ hg qpush

 

$ cd qemu.hg

$ hg qpush -a

$ hg qimport pci-passthrough-aug27

$ hg qpush

 

3) build the packages

$ export XVM_WS=`pwd`

$ ./sunos.hg/bin/build-all full

 

3. Upgrade xvm-3.3 packages

# svcadm disable xvm/domains xvm/console xvm/xend xvm/store xvm/virtd

# pkgrm SUNWlibvirt SUNWlibvirtr SUNWurlgrabber SUNWvdisk SUNWvirtinst SUNWxvmdomr SUNWxvmdomu SUNWxvmh SUNWxvmhvm SUNWxvmr SUNWxvmu

# pkgadd -d . SUNWlibvirt SUNWlibvirtr SUNWurlgrabber SUNWvdisk SUNWvirtinst SUNWxvmdomr SUNWxvmdomu SUNWxvmh SUNWxvmhvm SUNWxvmr SUNWxvmu

# svcadm enable xvm/domains xvm/console xvm/xend xvm/store xvm/virtd

# reboot

 

4. Enable xend to access pci device configure space

# svccfg -s xend setprop start/privileges = all

# svcadm refresh xend

# svcadm restart xend

 

5. Configure grub boot menu

# edit [/rpool]/boot/grub/menu.lst

 

title Solaris xVM

findroot (rootfs0,0,a)

kernel$ /boot/$ISADIR/xen.gz iommu=1

module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B pci-reserve="[1:0:0],[1:0:1],[3:0:0]"

module$ /platform/i86pc/$ISADIR/boot_archive

 

where, "iommu=1" enables the hypervisor to support Intel vt-d; "-B pci-reserve="[1:0:0],[1:0:1],[3:0:0]"" asks domain 0 to reserve pci devices for pass-through purpose.

 

6. pass through a pci device to HVM guest

1) below is a sample xm configure file for pci device pass-through

 

#### start of the configure file, pt-sample.py ####

import os, re

arch = os.uname()[4]

if re.search('64', arch):

arch_libdir = 'lib64'

else:

arch_libdir = 'lib'

 

kernel = "/usr/lib/xen/boot/hvmloader"

builder='hvm'

memory = 512

shadow_memory = 8

name = "r48"

vcpus=2

pci = [ '01:00.0' ]

disk = [ 'file:/export/home/allen/iodomain/images/ia32e_rhel4u8.img,hdc,w' ]

 

device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'

boot='c'

vnc=1

vnclisten="0.0.0.0"

vncconsole=1

vncpasswd=''

nographic=0

stdvga=0

serial='null'

 

on_poweroff = 'destroy'

on_reboot = 'restart'

on_crash = 'preserve'

 

#### end of the configure file, pt-sample.py ####

where, "pci = [ '01:00.0' ]" tells xm to pass through pci device with bdf [1,0,0] to the guest.

 

2) create the hvm guest domain

# xm create -c pt-sample.py

 

You will find the pass-through device, when you logon the domain.

 

一、综合实战—使用极轴追踪方式绘制信号灯 实战目标:利用对象捕捉追踪和极轴追踪功能创建信号灯图形 技术要点:结合两种追踪方式实现精确绘图,适用于工程制图中需要精确定位的场景 1. 切换至AutoCAD 操作步骤: 启动AutoCAD 2016软件 打开随书光盘中的素材文件 确认工作空间为"草图与注释"模式 2. 绘图设置 1)草图设置对话框 打开方式:通过"工具→绘图设置"菜单命令 功能定位:该对话框包含捕捉、追踪等核心绘图辅助功能设置 2)对象捕捉设置 关键配置: 启用对象捕捉(F3快捷键) 启用对象捕捉追踪(F11快捷键) 勾选端点、中心、圆心、象限点等常用捕捉模式 追踪原理:命令执行时悬停光标可显示追踪矢量,再次悬停可停止追踪 3)极轴追踪设置 参数设置: 启用极轴追踪功能 设置角度增量为45度 确认后退出对话框 3. 绘制信号灯 1)绘制圆形 执行命令:"绘图→圆→圆心、半径"命令 绘制过程: 使用对象捕捉追踪定位矩形中心作为圆心 输入半径值30并按Enter确认 通过象限点捕捉确保圆形位置准确 2)绘制直线 操作要点: 选择"绘图→直线"命令 捕捉矩形上边中点作为起点 捕捉圆的上象限点作为终点 按Enter结束当前直线命令 重复技巧: 按Enter可重复最近使用的直线命令 通过圆心捕捉和极轴追踪绘制放射状直线 最终形成完整的信号灯指示图案 3)完成绘制 验证要点: 检查所有直线是否准确连接圆心和象限点 确认极轴追踪的45度增量是否体现 保存绘图文件(快捷键Ctrl+S)
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值