1、之前通过修改auto文件和windows.py文件可实现自动安装OS,但是disk bus只能以IDE模式启动,进入系统自动下载运行bat文件,安装cloudbase-init和qga,及清理日志等操作

2、winodws2008.tdl无法定义file注入系统

3、通过Oz官方社区了解到,之前有人奉献过部分代码但是未合并,按照官方社区修改代码,测试报错

参考链接:https://github.com/clalancette/oz/pull/54/commits

4、找到Oz的windows的branch,代码比较老,2011年的。在物理机上搭建virtualenv测试,缺少各种包的依赖。

按照提示按照各种依赖包,再进行测试报console port和key的问题,修改windows.py和Guest.py部分代码,修改disk bus在hd模式下为virtio启动。

现在能够跑起来,但是卡在应答文件这块。修改windows2008.atuo也无济于事。

附上安装输出的日志

(oz-w2k8)[root@10e131e69e14 oz-win2k8customize]# oz-install -p -u -d3  win2008.tdl
libvirt bridge name is virbr0, host_bridge_ip is 192.168.122.1
Name: Windows-gushiren-2, UUID: 717e7faa-5e5a-4ffa-b886-c4bfbf6771fd
MAC: 52:54:00:98:d0:80, distro: Windows
update: 2008, arch: x86_64, diskimage: /data/nvme0n1/oz/images/Windows-gushiren-2.dsk
nicmodel: rtl8139, clockoffset: localtime
mousetype: usb, disk_bus: virtio, disk_dev: hda
icicletmp: /var/lib/oz/icicletmp/Windows-gushiren-2, listen_port: 14028
Original ISO path: /var/lib/oz/isos/Windows2008x86_64-iso.iso
Modified ISO cache: /var/lib/oz/isos/Windows2008x86_64-iso-oz.iso
Output ISO path: /data/nvme0n1/oz/images/Windows-gushiren-2-iso-oz.iso
ISO content path: /var/lib/oz/isocontent/Windows-gushiren-2-iso
Cleaning up guest named Windows-gushiren-2
Generating install media
Fetching the original media
Original install media available, using cached version
Copying ISO contents for modification
Setting up guestfs handle for Windows-gushiren-2
Adding ISO image /var/lib/oz/isos/Windows2008x86_64-iso.iso
Launching guestfs
Mounting ISO
Checking if there is enough space on the filesystem
Extracting ISO contents
Modifying ISO
/data/nvme0n1/oz-w2k8/lib/python2.7/site-packages/oz/Guest.py:969: RuntimeWarning: overflow encountered in ushort_scalars
s = numpy.uint16(numpy.uint16(s) + numpy.uint16(w))
Generating new ISO
Cleaning up old ISO data
Generating 10GB diskimage for Windows-gushiren-2
Running install for Windows-gushiren-2
Generate XML for guest Windows-gushiren-2 with bootdev cdrom
Generated XML:
<?xml version="1.0"?>
<domain type="kvm">
<name>Windows-gushiren-2</name>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<uuid>717e7faa-5e5a-4ffa-b886-c4bfbf6771fd</uuid>
<clock offset="localtime"/>
<vcpu>1</vcpu>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<os>
<type>hvm</type>
<boot dev="cdrom"/>
</os>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<graphics port="-1" type="vnc" listen="0.0.0.0"/>
<interface type="bridge">
<source bridge="virbr0"/>
<mac address="52:54:00:98:d0:80"/>
<model type="virtio"/>
</interface>
<input type="tablet" bus="usb"/>
<console type="pty">
<target port="0"/>
</console>
<disk device="disk" type="file">
<target dev="hda" bus="virtio"/>
<source file="/data/nvme0n1/oz/images/Windows-gushiren-2.dsk"/>
</disk>
<disk type="file" device="cdrom">
<source file="/data/nvme0n1/oz/images/Windows-gushiren-2-iso-oz.iso"/>
<target dev="hdc"/>
</disk>
</devices>
</domain> Waiting for Windows-gushiren-2 to finish installing, 6000/6000
Waiting for Windows-gushiren-2 to finish installing, 5990/6000
Waiting for Windows-gushiren-2 to finish installing, 5980/6000
Waiting for Windows-gushiren-2 to finish installing, 5970/6000
Waiting for Windows-gushiren-2 to finish installing, 5960/6000
Waiting for Windows-gushiren-2 to finish installing, 5950/6000
Waiting for Windows-gushiren-2 to finish installing, 5940/6000
^CCleaning up guest named Windows-gushiren-2
Cleaning up after install
Removing modified ISO
^CTraceback (most recent call last):
File "/data/nvme0n1/oz-w2k8/bin/oz-install", line 140, in <module>
guest.cleanup_install();
File "/data/nvme0n1/oz-w2k8/lib/python2.7/site-packages/oz/Guest.py", line 1084, in cleanup_install
os.unlink(self.output_iso)
KeyboardInterrupt

https://github.com/clalancette/oz/tree/win2k8customize

最新文章

  1. 浅谈HTTPS和SSL/TLS协议的背景和基础
  2. java内存模型-final
  3. 2015弱校联盟(1) - C. Censor
  4. html里文本编辑器如何制作呢?
  5. Understanding CMS GC Logs--转载
  6. linux下关于gz和bz2压缩格式的常用操作技巧
  7. expect实现ssh自动登录
  8. poj 1068 Parencodings 模拟
  9. Java 面试知识点解析(一)——基础知识篇
  10. symfony generate bundle autoload failed的解决办法
  11. kafka_2.11-2.0.0_安装部署
  12. SkylineGlobe6.5版本,在矿山、石油、天然气等能源行业的最新应用DEMO演示
  13. android-------- 常用且应该学习的框架
  14. ios之申请后台延时执行和做一个假后台的方法
  15. .NET中使用FastReport实现打印功能
  16. 获取linux工具命令源码
  17. centos7: vsftpd安装及启动
  18. unix架构
  19. Delphi 动态与静态调用DLL(最好的资料)
  20. iconv()错误

热门文章

  1. flex布局-常用布局
  2. node.js启动调试方式
  3. Java学习过程中的收获
  4. FAT32中文版分析+补充(1)
  5. hdu_3501_Calculation 2
  6. MySQL跟踪SQL&amp;慢查询分析工具
  7. ARM S3C2440 时钟初始化流程
  8. 干货!一篇文章集合所有Linux基础命令,适合所有菜鸟学习和老手回顾!
  9. kali安装ssh服务
  10. html ajax请求 php 下拉 加载更多数据 (也可点击按钮加载更多)