【制作镜像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方 ...
随机推荐
- Python安装、配置
1.Python简介:Python在Linux.windows.Mac os等操作系统下都有相应的版本,不管在什么操作系统下,它都能够正常工作.除非使用平台相关功能,或特定平台的程序库,否则可以跨平台 ...
- MTRR内存类型范围寄存器
1.MTRR的概念 内存类型范围寄存器(MTRRs,翻译过来真别扭,后面都以MTRR直接来说了)提供了一种机制,这种机制其实就是确定在系统内存中物理一段内存的类型.这个类型其实是正对CPU来说的,见图 ...
- linux设备驱动----利用mdev(udev)自动创建设备文件节点
1.mdev的使用方法和原理: mdev是busybox 自带的一个简化版的udev,适合于嵌入式的应用埸合.其具有使用简单的特点.它的作用,就是在系统启动和热插拔或动态加载驱动程序时,自动产生驱动程 ...
- 详细讲解Hadoop源码阅读工程(以hadoop-2.6.0-src.tar.gz和hadoop-2.6.0-cdh5.4.5-src.tar.gz为代表)
首先,说的是,本人到现在为止,已经玩过. 对于,这样的软件,博友,可以去看我博客的相关博文.在此,不一一赘述! Eclipse *版本 Eclipse *下载 Jd ...
- Qt5.0.2无法发布问题
先从bin目录里面找到所缺失的dll,如果出现 可以找到libEGL.dll然后复制过来就可以了.
- SGU107——987654321 problem
For given number N you must output amount of N-digit numbers, such, that last digits of their square ...
- Android Fragment 生命周期
启动的事件触发顺序 F Fragmeent A Activity onAttach(F) onAttachFragment(A) onCreate(F) onCreateView(F) onActiv ...
- JSF学习四 标签
commandButton:提交.重置或下压button button:用于公布GET请求的按钮
- Java凝视Override、Deprecated、SuppressWarnings具体解释
一.什么是凝视 说起凝视,得先提一提什么是元数据(metadata).所谓元数据就是数据的数据.也就是说,元数据是描写叙述数据的.就象数据表中的字段一样,每一个字段描写叙述了这个字段下的数据的 ...
- iOS之layout方法-layoutSubviews、layoutIfNeeded、setNeedsLayout
下面列举下iOS layout的相关方法: layoutSubviews layoutIfNeeded setNeedsLayout setNeedsDisplay drawRect sizeThat ...