Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5296
  • 博文数量: 1
  • 博客积分: 20
  • 博客等级: 民兵
  • 技术积分: 15
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-12 22:13
文章分类
文章存档

2011年(1)

我的朋友
最近访客

分类: 虚拟化

2011-12-08 12:40:30

这个问题找了好半天,因为XCP现在使用XenCenter不能正常申请License,最后在Ronny L.Bull的博客上找到了解决方法 

原文如下:

If you do a clean install of XCP 1.0 or XCP 1.1 Beta you will find that after 30 days and a reboot none of your virtual machines will boot. If you are using XenCenter to manage your server you will see a notification that your license has expired. This is a bug in the current releases of XCP, and should be fixed in future releases. To fix the issue with a quick hack do the following:

Stop the XAPI service

/etc/init.d/xapi stop

Edit the file /var/xapi/state.db and search for 'expiry'. The field should look something like this:

('expiry' '20110810T00:00:00Z')

Change it so that it reads 30 days or more into the future.

('expiry' '20110910T00:00:00Z')

Restart the XAPI service

/etc/init.d/xapi start

You should be able to start all of your virtual machines again. You will need to perform this task again in 30 days until this check is removed from later releases of XCP.

Here is a small script that can be setup in cron to automate the task.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
 
#Script to fix XCP 30 License expire issue
#Script increases the month value by 1
#By: Ronny L. Bull & Alex Stuart
#Version: 1.0
#Date: 8-9-2011
 
FUTURE=`date --date="next Month" '+%Y%m%d'`
 
#stop xapi service
/etc/init.d/xapi stop
 
#Replace the expiry entry
sed -i "s/\(expiry.\{3\}\)[0-9]\{8\}/\1$FUTURE/" /var/xapi/state.db
 
#start xapi service
/etc/init.d/xapi start

阅读(1012) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:没有了

给主人留下些什么吧!~~