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

OZ customize windows iamge的更多相关文章

  1. 黑科技抢先尝(续) - Windows terminal中WSL Linux 终端的极简美化指南

    目录 修改默认源,为apt-get安装提速 安装python 和 python pip 安装 zsh 安装powerline-font中的特定字体 安装powerline-shell 修改~目录下的配 ...

  2. 程序员的 Ubuntu 19.10 配置与优化指南

    原文地址:程序员的 Ubuntu 19.10 配置与优化指南 0x00 环境 CPU: Intel Core i9-9900k GPU: GeForce RTX 2070 SUPER RAM: DDR ...

  3. Windows远程连接Linux

    目录 xrdp方式 vnc方式 xrdp方式 ----------------------------------------------------------------------------- ...

  4. Android学习——windows下搭建Cygwin环境

    在上一篇博文<Android学习——windows下搭建NDK_r9环境>中,我们详细的讲解了在windows下进行Android NDK开发环境的配置,我们也讲到了在NDk r7以后,我 ...

  5. Android学习——windows下搭建NDK_r9环境

    1. NDK(Native Development Kit) 1.1 NDK简介 Android NDK是一套允许开发人员使用本地代码(如C/C++)进行Android APP功能开发的工具,通过这个 ...

  6. eclipse安装ADT后在windows菜单下找不到android SDK and AVD Manager

    eclipse安装ADT后在windows菜单下找不到android SDK and AVD Manager选项的解决办法 - zhjr1220的专栏 - 博客频道 - CSDN.NET  http: ...

  7. Windows Azure HandBook (2) Azure China提供的服务

    <Windows Azure Platform 系列文章目录> 对于传统的自建数据中心,从底层的Network,Storage,Servers,Virtualization,中间层的OS, ...

  8. 如何优雅地使用 Windows 10 ?

    身为一个伪电脑Geek,就算不懂电脑,也要把那些更不懂电脑的人给唬住. 1.入门级别: 当然就是让别人从视觉上感觉你的电脑不一般啦 第一步:桌面要干净,干净到什么程度呢,要像这样 当别人第一眼看到你的 ...

  9. Windows网络驱动、NDIS驱动(微端口驱动、中间层驱动、协议驱动)、TDI驱动(网络传输层过滤)、WFP(Windows Filtering Platform)

    catalog . 引言 . Windows 2000网络结构和OSI模型 . NDIS驱动 . NDIS微端口驱动编程实例 . NDIS中间层驱动编程实例 . NDIS协议层驱动编程实例 . TDI ...

随机推荐

  1. Uva 10806 来回最短路,不重复,MCMF

    题目链接:https://uva.onlinejudge.org/external/108/10806.pdf 题意:无向图,从1到n来回的最短路,不走重复路. 分析:可以考虑为1到n的流量为2时的最 ...

  2. Compass Card Sales(模拟)

    Compass Card Sales 时间限制: 3 Sec  内存限制: 128 MB提交: 35  解决: 13[提交] [状态] [讨论版] [命题人:admin] 题目描述 Katla has ...

  3. jQuery 遍历函数包括了用于筛选、查找和串联元素的方法。

    jQuery 参考手册 - 遍历 函数 描述 .add() 将元素添加到匹配元素的集合中. .andSelf() 把堆栈中之前的元素集添加到当前集合中. .children() 获得匹配元素集合中每个 ...

  4. 探索性数据分析EDA综述

    目录 1. 数据探索的步骤和准备 2. 缺失值处理 为什么需要处理缺失值 Why data has missing values? 缺失值处理的技术 3. 异常值检测和处理 What is an ou ...

  5. python_1_变量的使用

    print("hello word") name="Qi Zhiguang" print("My name is",name) name2= ...

  6. maven环境、本地仓储配置(下载安装)idea配置maven

    在第一步:下载maven 官网地址:http://maven.apache.org/download.cgi 下载后进行解压 解压成功 第二步:环境配置 我的电脑右键->属性->高级系统设 ...

  7. Git基础篇

    对于Git的一些基础了解,安装,里面的一些名词,这里就不做介绍了.主要记录怎么使用GIt. 本篇介绍: 配置个人信息        生成本地仓库并与远程库相连        添加SSH秘钥       ...

  8. lambda表达式的使用

    lambda表达式和可遍历的datatable结合使用,把表中某一列中的数据转成字符串,用“|”隔开,代码如下: obj = tableName.AsEnumerable();if(tableName ...

  9. java 集合 HashSet 实现随机双色球 HashSet addAll() 实现去重后合并 HashSet对象去重 复写 HashCode()方法和equals方法 ArrayList去重

    package com.swift.lianxi; import java.util.HashSet; import java.util.Random; /*训练知识点:HashSet 训练描述 双色 ...

  10. 关于Vue 兄弟组件通信

    最近项目中遇到希望在操作路由组件里面内容的时候可以影响共用组件Header组件(这个其实就是他的兄弟组件)的操作.  意思就是 router-view指向的router来影响Header组件的信息 首 ...