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*】文件准备的更多相关文章

  1. 【制作镜像Win*】特殊配置

    下载disk.config: wget http://10.254.3.75/images/configdrive/disk.config 修改libvirt.xml,更换cdrom为disk.con ...

  2. 【制作镜像Win*】环境准备(设置yum源)

    首先使用 yum repolist all 命令查看当前启用了哪些yum源. 镜像配置文件在/etc/yum.repos.d/目录下,ll会看到很多repo文件,每一个文件里面都配置了yum源: [b ...

  3. 【制作镜像Win*】系统配置

    向livibirt.xml插入Line 6-13所示代码,即加入两个virtio-serial设备: <!--vnc方式登录,端口号自动分配,自动加1,可以通过virsh vncdisplay来 ...

  4. 【制作镜像Win*】系统安装

    图形化安装系统,在询问“进行何种类型的安装?”时,选择“自定义(高级)” 下一步看不到硬盘,如图: 选择“加载驱动程序”,安装驱动. 将相应版本的netkvm.inf和viostor.inf装上. 继 ...

  5. 【制作镜像Win*】环境准备

    1. 保证网络通 2. 保证系统为centos6.x/rhel 6.x 3. yum源正确,推荐使用utsc源,nailgun也ok 4.安装软件包 virsh list guestmount yum ...

  6. (转)Linux下用mkisofs制作光盘镜像ISO文件

    我们都知道在windows下有winiso可以将光盘制作成光盘镜像ISO文件,在linux下一个命令就搞定了.那就是mkisofs.先看看mkisofs的help. rory@dev:~$ mkiso ...

  7. 制作镜像文件工具packer

    openstack镜像制作要在openstack上创建虚拟机,必然要使用到虚拟机镜像. 对于普通用户,可以使用已经创建好的虚拟机镜像.一般是操作系统官方构建并提供的. 某些用户可以有自己独特的需求,需 ...

  8. 安装Win7或者XP系统用虚拟光驱加载Win7或者XP镜像 iso文件xp win7wim文件

    安装Win7或者XP系统用虚拟光驱加载Win7或者XP镜像 iso文件xp win7wim文件 http://pcedu.pconline.com.cn/teach/xt/1201/2657834_8 ...

  9. 【制作镜像】BCEC制作镜像

    如要制作的新镜像已存在标准版本镜像,即linux发行版本相同(此处指CentOS6.5 64位),可利用BCEC制作. 在BCEC创建centos6.5系统的可联外网的虚机,ssh到此虚机,用yum方 ...

随机推荐

  1. HDOJ-ACM1012(JAVA)

    这道题很简单,主要是弄懂题意和注意输出: 输出的完整结果如下: n e - ----------- 0 1 1 2 2 2.5 3 2.666666667 4 2.708333333 5 2.7166 ...

  2. php升级到5.4

    这里使用 Webtatic EL6的YUM源来安装php5.4,我们首页安装Webtatic EL6 YUM源 rpm -Uvh http://repo.webtatic.com/yum/el6/la ...

  3. 关于Redis的常识(推荐)

    原文出处: https://github.com/springside/springside4/wiki/redis 版本:V3.0.3 2013-8-1 (@江南白衣版权所有,转载请保留出处) 1. ...

  4. mongodb的高级操作(聚合框架)

    group by 查询 不要用java驱动带的group by ,要用2.2版本后的aggregate聚合框架来搞,经过试验速度快一倍 参考 官网:http://docs.mongodb.org/ma ...

  5. poj 3984 迷宫问题【bfs+路径记录】

    迷宫问题 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10103   Accepted: 6005 Description ...

  6. 8-13-Exercise

    链接:夜间活动 昨天的比赛好郁闷.......倒不是因为题目......在快要比赛的时候突然所有的网站都进不去了.......改了半天的DNS & IP......比赛都比了1个多小时才进去. ...

  7. H5离线缓存机制-manifest

    简介:Manifest 其实就是web应用的一种缓存机制,主要用于现在webapp应用中,它是浏览器自己的一种机制,随着移动互联网时代的到来,网络可靠性降低,如果我们已经将需要的文件缓存下下来,一旦网 ...

  8. Git简介:

    Git中文文档 1.详解在Visual Studio中使用git版本系统(图文) 2.GitExtensions下载地址:http://gitextensions.codeplex.com/ 3.Gi ...

  9. jquery判断文本域长度

    <div id="result">您还可以输入100字</div> <textarea name="content" id=&qu ...

  10. Java异常处理的误区和经验总结

    本文着重介绍了 Java 异常选择和使用中的一些误区,希望各位读者能够熟练掌握异常处理的一些注意点和原则,注意总结和归纳.只有处理好了异常,才能提升开发人员的基本素养,提高系统的健壮性,提升用户体验, ...