你好,游客 登录 注册 搜索
背景:
阅读新闻

Debian系统安装Xen并创建Win2003虚拟机

[日期:2014-11-06] 来源:Linux社区  作者:jungege [字体: ]

由于生产环境需要一台Win2003服务器,以创建虚拟机的方式来实现!

环境:Debian 7.0 (wheezy)

Xen 4.1

1、安装xen-linux-system

# apt-get install  xen-linux-system

默认会安装

libxen-4.1
libxenstore3.0
xen-hypervisor-4.1-amd64
xen-linux-system-3.2.0-4-amd64
xen-linux-system-amd64
xen-system-amd64
xen-tools
xen-utils-4.1
xen-utils-common
xenstore-utils

2、更改启动项

# ls -ll /etc/grub.d  可以查看到目前所有的内核文件

#vi /boot/grub/grub.cfg --------该文件就是启动文件,可以设置先后顺序,仔细看!

set default="2"

默认以xen内核启动

3、更改xen配置文件

# cd /etc/xen
# cp  xend-config.sxp  xend(vif-script vif-bridge)-config.sxp.bak
# vi xend-config.sxp
(xend-http-server yes)
(xend-port            8000)
(network-script 'network-bridge antispoof=yes')
(vif-script vif-bridge)
(vnc-listen '0.0.0.0')
# /etc/init.d/xen restart    重启xen服务

4、创建桥设备

#apt-get install bridge-utils
#vi /etc/network/interfaces
auto xenbr0
iface xenbr0 inet static
address 192.168.1.79
netmask 255.255.252.0
gateway 192.168.1.1
bridge_ports eth0

5、安装virt-manager

# apt-get install virt-manager

6、重启机器,接下来默认进入xen内核

#reboot

7、查看桥接设备、查看xen是否启动

# ifconfig
xenbr0    Link encap:Ethernet  HWaddr c8:1f:66:c1:02:5c
inet addr:192.168.1.79  Bcast:192.168.3.255  Mask:255.255.252.0
inet6 addr: fe80::ca1f:66ff:fec1:25c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:1970279 errors:0 dropped:2946 overruns:0 frame:0
TX packets:825922 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1566797448 (1.4 GiB)  TX bytes:264689003 (252.4 MiB)
# xm list
Name                                        ID  Mem VCPUs      State  Time(s)
Domain-0                                    0 15073    8    r-----  26533.3
一切正常,接下来安装guest虚拟机

8、vnc连接到服务器 (要想使用virt-manager一定需要连接到vnc上,需要用到桌面环境)

###关于vnc的配置此处不再详述

9、使用virt-manager 来安装虚拟机和windows2003系统

先将windows2003 镜像上传到linux服务器

# rz

开始创建虚拟机

# virt-manager

Debian系统安装xen并创建Win2003虚拟机

XenServer VM物理CPU使用策略  http://www.linuxidc.com/Linux/2013-08/88698.htm

CloudStack编译环境XenServer启动系统虚拟机失败 http://www.linuxidc.com/Linux/2013-08/88694.htm

禁止CloudStack删除XenServer原有虚拟机 http://www.linuxidc.com/Linux/2013-08/88693.htm

XenServer中设置Linux VM从光驱引导 http://www.linuxidc.com/Linux/2013-07/87699.htm

开启并配置Citrix XenServer的SNMP服务 http://www.linuxidc.com/Linux/2013-01/78487.htm

重置XenServer本地磁盘LVM为EXT3格式 http://www.linuxidc.com/Linux/2013-11/92282.htm

在 Debian 上安装和配置 Xen  http://www.linuxidc.com/Linux/2010-04/25351.htm

本文永久更新链接地址http://www.linuxidc.com/Linux/2014-11/109072.htm

linux
相关资讯       Debian安装Xen 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款