当前位置: 移动技术网 > 网络运营>服务器>虚拟主机 > XenServer使用ISO安装虚拟机系统的方法

XenServer使用ISO安装虚拟机系统的方法

2019年06月02日  | 移动技术网网络运营  | 我要评论

要在vm开始安装作业系统,虽然xenserver已包含多个范本,例如redhat as 4+5、centos、suse、oracle enterprise linux等等,在这些列表内的,安装时都不须额外下载原始安装光碟;若未在列表内,例如redhat as 3,就必须使用光碟方式安装。这里说明如何在新增vm时以iso档方式来安装所需的作业系统。

首先,登入console,执行以下指令,建立iso档型式的储存库(sr – storage repositories)

mkdir /boot-iso
xe sr-create name-label=boot-iso type=iso device-config:location=/boot-iso device-config:legacy_mode=true content-type=iso

上传那些iso档至主机的/boot-iso即可。
新增成功,在xencenter会出现一个项目

note:

1、如果不小心建立错误,或重复新增,想删除储存库时,就使用xencenter ui,直接选择detach …..就可以了。
2、上传iso档至主机后,xencenter无法同步显示,须在console执行xe-toolstack-restart指令后,xencenter才可以抓到。

下面的其它网友的补充:

citrix xenserver 是企业级面向云计算的虚拟平台,有 xenserver, essentials for xenserver, enterprise edition 和 platinum edition 三种版本,其中 xenserver 是免费的,和 vmware esxi 是同级别的竞争产品。xenserver 的安装过程和 vmware esxi 一样容易,安装完后界面如下。和 vmware esxi 类似,主要的操作和配置都可以在一个另外一台装有 xencenter 客户端的机器上完成(和 vmware vshpere client 一样)。

xenserver

和 vmware esxi 有点不同的是,xenserver 不能在 xencenter 客户端管理界面里直接导入 iso 后安装操作系统,需要先把这些 iso 预存到另一台机器上,然后用 nfs 的方式访问。所以我们先在其他的机器开设一个 iso 目录并收集一些 iso 文件,用 nfs 导出这个 iso 目录,然后在 xenserver 服务器上手动把这个目录挂上,这样才能在 xenserver 和 xencenter 管理界面里看到所有的 iso 文件,也就是说 xenserver 鼓励你把 iso 文件分开存储到另外一台单独服务器以方便管理,对下面的 nfs 操作不清楚的话可以参考 在 centos 上安装和配置 nfs 4.0:

# vi /etc/export
/home/vpsee/iso 172.16.240.164(rw,sync,no_root_squash) \
172.16.240.164(rw,sync,no_root_squash)

# /etc/init.d/portmap restart
# /etc/init.d/nfs restart

在 nfs 服务器上设置权限,允许 xenserver 服务器访问 nfs:

# vi /etc/hosts.deny
portmap:all

# vi /etc/hosts.allow
portmap:172.16.240.0/255.255.254.0

用 ssh 登录 xenserver 后挂在 nfs 服务器上的目录:

$ ssh root@172.16.240.164
root@172.16.240.164's password:

# xe-mount-iso-sr 172.16.240.10:/home/vpsee/iso

成功挂载后,在 xencenter 控制台上(目前 xencenter 只有 windows 版本)就可以看到所有的 iso 了:

剩下就好办了,有了 iso 就可以直接安装操作系统了,注意如果机器 cpu 不支持全虚拟(intel vt 或 amd svm)的话会导致安装失败、报错:

xenserver-imtxsji: hvm is required for this operation
invalid_source - unable to access a required file in the specified repository:
file:///timp/cdrom-repo-rz1yem/install.386/xen/vmlinuz.

如果是这样的话就只能通过网络(install from url)安装半虚拟系统了。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网