xjimmyshcn

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

【环境】

Dell R905服务器 (CPU 4路4核,内存32GB,硬盘1.8TB)

原操作系统为RHEL 5.2 i386,虚拟机使用xen,上面开了几台虚拟机。

【问题】

由于32位操作系统不能识别大内存(只认出14GB) ,因此将操作系统重新安装为CentOS 5.6 x86_64。

虚拟机镜像和配置文件在重装前备份到NFS服务器上,重装后又拷回。

但是启动虚拟机时,发现无法正常启动,虚拟机状态一直处于Running,VNC无法连接,ssh也无法连接,无法ping通虚拟机,虚拟机只能用Shutdown->Force off来关闭。
通过virt-manager以vnc连接虚拟机,出现提示:

console is not yet active for guest

【解决】

查看xen配置文件

[root@211-98-26-3 cacti_collector]# cat cacti_collector
name = "cacti_collector"
uuid = "3d7239be-c5b3-ef78-db6b-9381b26860bd"
maxmem = 2048
memory = 2048
vcpus = 2
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "c"
pae = 1
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-dm"      #此句应改成=> device_model = "/usr/lib64/xen/bin/qemu-dm" 
sdl = 0
vnc = 1
vncunused = 1
vnclisten = "127.0.0.1"
keymap = "en-us"
disk = [ "file:/bak/cacti_collector/hda.img,hda,w", ",hdc:cdrom,r", "file:/bak/cacti_collector/hdb.img,hdb,w", "file:/bak/cacti_collector/hdd.img,hdd,w" ]
vif = [ "mac=00:16:3e:6f:a4:8e,bridge=xenbr0,script=vif-bridge" ]
parallel = "none"
serial = "pty"

修改完保存配置文件,然后重启虚拟机,即可正常启动。

posted on 2011-06-14 15:04  xjimmyshcn  阅读(641)  评论(0编辑  收藏  举报