【制作镜像Win*】文件准备
mkdir /var/image-create
cd /var/image-create/
在物理机上:
wget http://10.254.3.75/images/libvirt/libvirt.xml
如果不通,试试route -n; route add -net 10.254.3.0/24 gw 10.254.99.254 dev eth3;
(另,10.254.3.75/images的虚机映射地址为10.133.28.75/images,若是在虚机上下载文件,使用:wget http://10.133.28.75/images/libvirt/libvirt.xml)
下载两个windows驱动:
wget http://10.254.3.75/images/virtio-win/virtio-win-0.1.96.iso
wget http://10.254.3.75/images/virtio-win/virtio-win-0.1.96_amd64.vfd
创建目标镜像文件:qemu-img create -f qcow2 /var/image-create/bcec-windows-2012-R2-standard-amd64-10G.qcow2 10G
配置libvirt.xml:
<domain type='kvm'>
<name>windows 2012</name> <!--虚拟机名称-->
<memory>16085760</memory> <!--最大内存,单位k-->
<vcpu>8</vcpu> <!--虚拟cpu个数-->
<os>
<type arch='x86_64' machine='pc'>hvm</type> <!--此处的machine在不通环境下可能需要设置-->
<boot dev='hd'/> <!--硬盘启动-->
<boot dev='cdrom'/> <!--光盘启动-->
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/image-create/bcec-windows-2012-R2-standard-amd64-10G.qcow2'/> <!--目的镜像路径-->
<target dev='vda' bus='virtio'/>
</disk> <disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/image-create/cn_windows_server_2012_r2_vl_x64_dvd_2979220.iso'/> <!--光盘镜像路径-->
<target dev='hda' bus='ide'/>
<readonly/>
</disk> <disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/image-create/virtio-win-0.1.96.iso'/>
<target dev='hdb' bus='ide'/>
<readonly/>
</disk>
<disk type='file' device='floppy'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/image-create/virtio-win-0.1.96_amd64.vfd'/>
<target dev='fda' bus='fdc'/>
</disk> <interface type='bridge'> <!--虚拟机网络连接方式-->
<source bridge='virbr0'/> <!--当前主机网桥的名称-->
<mac address='02:00:0a:78:41:14'/>
<model type='virtio'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<!--vnc方式登录,端口号自动分配,自动加1,可以通过virsh vncdisplay来查询-->
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
<listen type='address' address='0.0.0.0'/>
</graphics>
</devices>
</domain>
此时使用virsh create libvirt.xml,提示找不到/usr/bin/qemu-system-x86_64
可用which qemu-system-x86_64,得出路径/usr/bin/qemu-system-x86_64
再rpm -qf /usr/bin/qemu-system-x86_64,查看版本为:xxxx-xxx-xxx-xxxxx
和qemu-kvm-2.0.0-4.mira2.x86_64不一样,则yum qemu-kvm-2.0.0-4.mira2.x86_64覆盖安装即可。
使用Xmanager Enterprise,在Properties里设置如下:

安装tigervnc-1.1.0-5.el6_4.1.x86_64
virsh create libvirt.xml
vncviewer 127.0.0.1
在图形界面安装系统
【制作镜像Win*】文件准备的更多相关文章
- 【制作镜像Win*】特殊配置
下载disk.config: wget http://10.254.3.75/images/configdrive/disk.config 修改libvirt.xml,更换cdrom为disk.con ...
- 【制作镜像Win*】环境准备(设置yum源)
首先使用 yum repolist all 命令查看当前启用了哪些yum源. 镜像配置文件在/etc/yum.repos.d/目录下,ll会看到很多repo文件,每一个文件里面都配置了yum源: [b ...
- 【制作镜像Win*】系统配置
向livibirt.xml插入Line 6-13所示代码,即加入两个virtio-serial设备: <!--vnc方式登录,端口号自动分配,自动加1,可以通过virsh vncdisplay来 ...
- 【制作镜像Win*】系统安装
图形化安装系统,在询问“进行何种类型的安装?”时,选择“自定义(高级)” 下一步看不到硬盘,如图: 选择“加载驱动程序”,安装驱动. 将相应版本的netkvm.inf和viostor.inf装上. 继 ...
- 【制作镜像Win*】环境准备
1. 保证网络通 2. 保证系统为centos6.x/rhel 6.x 3. yum源正确,推荐使用utsc源,nailgun也ok 4.安装软件包 virsh list guestmount yum ...
- (转)Linux下用mkisofs制作光盘镜像ISO文件
我们都知道在windows下有winiso可以将光盘制作成光盘镜像ISO文件,在linux下一个命令就搞定了.那就是mkisofs.先看看mkisofs的help. rory@dev:~$ mkiso ...
- 制作镜像文件工具packer
openstack镜像制作要在openstack上创建虚拟机,必然要使用到虚拟机镜像. 对于普通用户,可以使用已经创建好的虚拟机镜像.一般是操作系统官方构建并提供的. 某些用户可以有自己独特的需求,需 ...
- 安装Win7或者XP系统用虚拟光驱加载Win7或者XP镜像 iso文件xp win7wim文件
安装Win7或者XP系统用虚拟光驱加载Win7或者XP镜像 iso文件xp win7wim文件 http://pcedu.pconline.com.cn/teach/xt/1201/2657834_8 ...
- 【制作镜像】BCEC制作镜像
如要制作的新镜像已存在标准版本镜像,即linux发行版本相同(此处指CentOS6.5 64位),可利用BCEC制作. 在BCEC创建centos6.5系统的可联外网的虚机,ssh到此虚机,用yum方 ...
随机推荐
- 微软 Build 2014开发者大会干货整理-1
微软 Build 2014开发者大会第二天的主题演讲主要包含两部分:Microsoft Azure的发展状况,以及 .NET和生态系统的发展介绍.第二天的重点整理也由此分为上下两部分.您可以在Chan ...
- POJ-1981 Circle and Points 单位圆覆盖
题目链接:http://poj.org/problem?id=1981 容易想到直接枚举两个点,然后确定一个圆来枚举,算法复杂度O(n^3). 这题还有O(n^2*lg n)的算法.将每个点扩展为单位 ...
- Shell脚本编程总结及速查手册
Shell是一种编程语言, 它像其它编程语言如: C, Java, Python等一样也有变量/函数/运算符/if语句/循环控制/… 但在开始之前, 我想先理清Shell语言与Shell之间的关系. ...
- js http 请求 多个相同参数名传值
最近在用js和api做对接的时候需要传参数类似于 rights=a1&rights=a2 因为有相同的参数名,试过很多方法都被覆盖了. 最后终于发现可以通过rights=[a1,a2]的方式, ...
- elasticsearch安装过程中的license问题解决办法
1.git clone git://github.com/mobz/elasticsearch-head.git 2.cd elasticsearch-head 3.npm install 出现下来问 ...
- bootstrap折叠修改hover
$('div.panel-collapse').on('shown.bs.collapse hidden.bs.collapse', function() { $(this).dequeue('col ...
- 计算json的和
var count=0; for(var i=0;i<data.length;i++){ count+=data[i].data; }
- SQL 获取 IDENTITY 三种方法 SCOPE_IDENTITY、IDENT_CURRENT 和 @@IDENTITY的区别
-------总结:用SCOPE_IDENTITY()函数靠谱 @@IDENTITY (Transact-SQL) 返回最后插入的标识值的系统函数. 备注 在一条 INSERT.SELECT INTO ...
- Double 类型运算时的精度问题
double 类型运算时的 计算的精度不高,常常会出现0.999999999999999这种情况,那么就须要用BigDecimal 它是java提供的用来高精度计算的工具类 以下是对这个类的一个包 ...
- Tsar 服务器系统和应用信息的采集报告工具
Tsar介绍 Tsar是淘宝的一个用来收集服务器系统和应用信息的采集报告工具,如收集服务器的系统信息(cpu,mem等),以及应用数据(nginx.swift等),收集到的数据存储在服务器磁盘上,可以 ...