Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
bab6ee6b
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bab6ee6b
编写于
5月 04, 2013
作者:
O
Osier Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Support bootindex for scsi host device
上级
486a86eb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
58 addition
and
0 deletion
+58
-0
src/qemu/qemu_command.c
src/qemu/qemu_command.c
+10
-0
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args
+9
-0
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.xml
+34
-0
tests/qemuxml2argvtest.c
tests/qemuxml2argvtest.c
+5
-0
未找到文件。
src/qemu/qemu_command.c
浏览文件 @
bab6ee6b
...
...
@@ -4827,6 +4827,9 @@ qemuBuildSCSIHostdevDevStr(virDomainDefPtr def,
virDomainDeviceAddressTypeToString
(
dev
->
info
->
type
),
dev
->
info
->
alias
,
dev
->
info
->
alias
);
if
(
dev
->
info
->
bootIndex
)
virBufferAsprintf
(
&
buf
,
",bootindex=%d"
,
dev
->
info
->
bootIndex
);
if
(
virBufferError
(
&
buf
))
{
virReportOOMError
();
goto
error
;
...
...
@@ -8082,6 +8085,13 @@ qemuBuildCommandLine(virConnectPtr conn,
"supported with this version of qemu"
));
goto
error
;
}
if
(
hostdev
->
source
.
subsys
.
type
==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI
&&
!
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX
))
{
virReportError
(
VIR_ERR_CONFIG_UNSUPPORTED
,
"%s"
,
_
(
"booting from assigned SCSI devices is not"
" supported with this version of qemu"
));
goto
error
;
}
}
}
...
...
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.args
0 → 100644
浏览文件 @
bab6ee6b
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor \
unix:/tmp/test-monitor,server,nowait -no-acpi \
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -usb \
-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-0 \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-drive file=/dev/sg0,if=none,id=drive-hostdev-scsi_host0-0-0-0 \
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,drive=drive-hostdev-scsi_host0-0-0-0,id=hostdev-scsi_host0-0-0-0,bootindex=1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-boot.xml
0 → 100644
浏览文件 @
bab6ee6b
<domain
type=
'qemu'
>
<name>
QEMUGuest2
</name>
<uuid>
c7a5fdbd-edaf-9466-926a-d65c16db1809
</uuid>
<memory
unit=
'KiB'
>
219100
</memory>
<currentMemory
unit=
'KiB'
>
219100
</currentMemory>
<vcpu
placement=
'static'
>
1
</vcpu>
<os>
<type
arch=
'i686'
machine=
'pc'
>
hvm
</type>
</os>
<clock
offset=
'utc'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/bin/qemu
</emulator>
<disk
type=
'block'
device=
'disk'
>
<source
dev=
'/dev/HostVG/QEMUGuest2'
/>
<target
dev=
'hda'
bus=
'ide'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'0'
unit=
'0'
/>
</disk>
<controller
type=
'scsi'
index=
'0'
model=
'virtio-scsi'
/>
<controller
type=
'usb'
index=
'0'
/>
<controller
type=
'ide'
index=
'0'
/>
<hostdev
mode=
'subsystem'
type=
'scsi'
managed=
'yes'
>
<source>
<adapter
name=
'scsi_host0'
/>
<address
bus=
'0'
target=
'0'
unit=
'0'
/>
</source>
<boot
order=
'1'
/>
<address
type=
'drive'
controller=
'0'
bus=
'0'
target=
'4'
unit=
'8'
/>
</hostdev>
<memballoon
model=
'virtio'
/>
</devices>
</domain>
tests/qemuxml2argvtest.c
浏览文件 @
bab6ee6b
...
...
@@ -989,6 +989,11 @@ mymain(void)
QEMU_CAPS_DEVICE
,
QEMU_CAPS_DRIVE
,
QEMU_CAPS_DRIVE_READONLY
,
QEMU_CAPS_VIRTIO_SCSI
,
QEMU_CAPS_VIRTIO_SCSI
,
QEMU_CAPS_DEVICE_SCSI_GENERIC
);
DO_TEST
(
"hostdev-scsi-virtio-scsi"
,
QEMU_CAPS_DRIVE
,
QEMU_CAPS_DEVICE
,
QEMU_CAPS_DRIVE
,
QEMU_CAPS_VIRTIO_SCSI
,
QEMU_CAPS_VIRTIO_SCSI
,
QEMU_CAPS_DEVICE_SCSI_GENERIC
,
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX
);
virObjectUnref
(
driver
.
config
);
virObjectUnref
(
driver
.
caps
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录