三 182010
Today,I clone a VM in the XenCenter.I want to log into the new VM to configure ip and so on,But I had forgotten the original VM's root password.So I can not log into the new one.
There are at least two kinds of way to reset the root password.One way is making the new VM boot from cdrom. I think it is too complicated to do that.The other way is editing grub's boot option and making the VM boot into single user mode.It's easy to do that.Follow this step:choose the new VM-->Shut down the new VM-->click the right mouse button-->Properties-->Startup Options-->OS Boot Parameters-->add single after utf8,the conten after edited is graphical utf8 single.Start the new VM again,it boot into single user mode,now we can change root password.
At last,shut down the VM,change OS Boot Parameters's content to graphical utf8,start the new VM.
Posted by admin
Tagged with: Linux, XenServer
十 272009
xenserver中的windows vm安装后可以通过xencenter设置从光驱启动,而linux vm则没有这样的选项,可以通过以下命令行解决:
xe vm-param-set uuid=546f896a-ebe6-8071-2c31-b9214dc1d1b5 HVM-boot-policy=BIOS\ order
xe vm-param-set uuid=546f896a-ebe6-8071-2c31-b9214dc1d1b5 HVM-boot-params:order="dc"
uuid为vm的uuid,order中的d表明光驱,c表明启动硬盘。这样设置完后通过xencenter中的虚机属性也可以设置启动顺序了。
http://home.vmsky.com/space-32409-do-blog-id-3408.html
Posted by admin
Tagged with: Linux, XenServer
十 142009
1.使用XenCenter工具,连接至Server,Tool-->License Manager-->选择要更新License的服务器,点击Activate....按钮.如果,此服务器可以直接连接到外网,将可以直接获取LIC文件安装,如果不能连接至外网,将会出现更新失败提示,并提示保存申请License文件.选择将申请文件保存.
2.访问:https://activate.vmd.citrix.com, upload申请文件.
3.填写相关信息,主要是MAIL地址,用来接收License 文件.提交.
4.打开邮箱下载License文件.
5.使用Winscp工具将License文件复制到XenServer的/etc/xensource/下,并重新命名为license.
6.重新启动XenServer.
7.License更新完成,可以正常使用.
关于Citrix公司的XenServer免费使用,个人理解,虽然为免费版本,但为了方便管理, 以及获取用户的相关信息,Citrix采用了Free License管理的模式,在到期后,用户只需要再次重复申请新的License文件并进行License安装即可.不会影响XenServer的正常使 用.但是,Citrix公司并未发表声明永久性提供免费使用,至少我没有找到.特别在正式的生产环境,还是建议大家购买正式的服务,以提供更高的性能以及安全的合法的保障.
转载自:http://hi.baidu.com/ts%B4%F3%D1%BC%C0%E6/blog/item/c58976fb885250809f514653%2Ehtml
Posted by admin
Tagged with: XenServer, 虚拟化
十 112009
XenServer的vm export与import,可以通过XenCenter来做,手头上又没有Windows的服务器,如果保存到本地,export和import都很麻烦
在网上查了些资料,可以通过命令来将vm export到服务器上,但XenServer主机上,可用空间有限,又无法访问XenServer用于存储虚拟机的空间
于是决定使用nfs,将另外一台Linux服务器A的空间mount过来,用于保存export出来的vm文件
A上的操作192.168.1.2
yum -y install nfs*
yum -y install portmap
mkdir /data/nfs
chmod 777 /data/nfs
允许192.168.1.0/24网段的计算机挂载/home/nfs
echo '/data/nfs 192.168.1.*(rw,root_squash)' >> /etc/exports
service portmap start
service nfs start
XenServer主机1上操作
mkdir /data/export
mount -t nfs 192.168.1.2:/data/nfs /data/export
开始导出
先把要导出的vm关掉,然后查看要导出vm的UUID
xe vm-list params=all
xe vm-export filename=/data/export/017-otrs.xva vm=09faa5ff-ceea-1234-e02e-97cae69878d5
XenServer主机2上操作
mkdir /data/export
mount -t nfs 192.168.1.2:/data/nfs /data/export
xe vm-import filename=/data/nfs/017-otrs.xva
等一下就可以了
我vm分了30G的空间,导出来的文件大概7G,应该也就是vm实际存储的文件大小吧
参考文章:http://tiri.li/schneller-xen-vm-import-auch-via-befehlszeile
Posted by admin
Tagged with: XenServer, 虚拟化