【制作镜像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方 ...
随机推荐
- sed命令教程
转载自:http://coolshell.cn/articles/9104.htmlawk于1977年出生,今年36岁本命年,sed比awk大2-3岁,awk就像林妹妹,sed就是宝玉哥哥了.所以 林 ...
- 《征服c指针》学习笔记-----统计文本单词数目的程序word_count
1.程序的要求:对用户指定的英文文本文件(包括标准输入),将英文单词按照字母顺序输出到用户指定的文本文件中(包括标准输出),并且在各单词后面显示单词的出现次数. 2.模块设计: 主要分为:1.从输入流 ...
- springMVC学习笔记--初识springMVC
前一段时间由于项目的需要,接触了springMVC(这里主要是讲3.1版,以下内容也是围绕这个版本展开),发觉其MVC模式真的很强大,也简单易用,完全是基于注解实现其优雅的路径配置的.想想以前接手的项 ...
- Ⅷ.spring的点点滴滴--抽象对象和子对象
承接上文 抽象对象和子对象 .net篇(环境为vs2012+Spring.Core.dll v1.31) public class parent { public string Name { get; ...
- (二)在.net中如何使用Memcached
Step1:第一步当然是下载Memcached for c# API,
- 在java中高效的计数器
在编程中,经常会用到HashMap作为计数器,本文简单介绍三种实现方式 第一种,最直观的计数器. public void naiveCounter(String sArr[]) { HashMap&l ...
- JDK之jstat的用法
http://www.51testing.com/html/92/77492-203728.html jstat的用法 用以判断JVM是否存在内存问题呢?如何判断JVM垃圾回收是否正常?一般的top指 ...
- JavaWeb文件的上传与下载(1)
经常用到的上传: 头像上传,资料分享等 文件上传的步骤 1.指定表单类型为文件上传表单 enctype="multipart/form-data" 2.表单提交方式必须为:post ...
- 一个tomcat究竟能接受多少并发
maxThreads 对tomcat来说,每一个进来的请求(request)都需要一个线程,直到该请求结束.如果同时进来的请求多于当前可用的请求处理线程数,额外的线程就会被创建,直到到达配置的最大线程 ...
- 用HiveDB横向切分MySQL数据库
HiveDB是一个用来横向切分mysql数据库的开源框架,构建一个高性能和可扩展的基于mysql的系统需要大量的系统设计经验和良好的代码的实现,一个比较好的策略是将你的数据横向切分在多个server上 ...