-
xe-toolstack-
restart
Restarts the XAPI-tools
df
–
h
Shows the amount of free disk space
xsconsole
Starts the text based menu console
fdisk
–
l
List the disk
partitions
xentop
Lists top Xen processes
iostat -d 2 6
Shows Storage trafic stats (6 reports,
2sec a part)
top
Lists top processes in Dom0
netstat
–
s
Shows networking statistics
xen-bugtool --yes
Builds a status report when Xapi is
down
mpstat 2
Shows processor statistics in Dom0
(every 2 sec)
less /var/log/dmesg
Displays Boot Messages from
Linux
vmstat 2
Show virtual memory in Dom0 (every 2
sec)
tail /var/log/
Look at xapi messages as they happen
list_domains
Lists all VMs
that are running (on this server)
Some good
logfiles (for troubleshooting)
/var/log/messages
L
ogs for the system (the
host)
/var/log/xensource
XenServer only logs (XAPI)
/var/log/xha
Logs
regarding High Availability
/var/log/audit
K
inda what it sounds like...
?
Audit logs.
/etc/xensource-inventory
I
nfo about the server
(version, build, hypvervisor, when the
server was installe...)
/var/log/dmesg
Boot messages from Linux
Service xapi
restart
xe-
toolstack-
restart
退出命令模式进入菜单驱动文本
xsconsole
cd -list
列出主机或池上的
CS
或
ISO <
/p>
灾难恢复
(DR)
命令:
drtask-creat
创建灾难恢复任务
p>
处理消息命令
message-/create/destroy/
list
网络命令
network-/create/destroy/list
修改网络交换模式:需要重新启动
xe-switch-network-backend bridge
池命令:
pool-designate-new-
master
指示指定的成员主机称为现有池的主服务器。
pool-dump-database
下载整个池数据库的副本并将其转储到客户端上的文件。
pool-eject
指示指定的
x
en
主机退出现有池
;
pool-
emergency-transition-to-master
指示成员主机称为
池主服务器,
紧在在主机转换到紧急
模式才能使用
;
pool-ha-enable
对资源池启用高可用性同时使用指定的
SR
UUID
作为中央检测信号存储库
;
pool-ha-disabel
对资源池禁用高可用性功能
;
pool-join
指示
xen
p>
主机加入现有池
;
pool-
recover-slaves
指示池主服务器尝试重置当前以紧急模式运行的所有成
员服务器地址
,
通常在使用
pool-
emergency-transition-to-master
将其中的一个成员设
置为新主服务器后使
用此命令
;
#xe
pool-emergency-reset-
master
创建
master-address=
ADDRESS
of
the
new
master>
重新指定
master
主服务器
pool-
restore-database
向池上传数据库备份
(<
/p>
使用
pool-dump-database
),
接受上传后,
主服务器将
自行启动并使用新数据库
;
pool-sync-
database
强制池数据库在资源池中的所有主机上进行同步,在正常操作中数据
库
会定期自动复制,主要用于执行一系列重要
CLI
操作后快速渎职更改
;
存储管理命令:
SR
命令:
sr-create
在磁盘上创建一个
SR,
将其引入数据库然后创建一个该
SR
< br>连接到
xen
主机的
PBD
p>
,
如果将
shared
设置为
true
,则为池中所有的
xen
主机创建
pbd,
反之仅为指定
host-uuid
的
xen
主机创建
PBD;
sr-destroy <
/p>
销毁
xen
主机上指定的
SR;
sr-disable-database-replication
禁用以指定
SR
为目标的
xapi
数据库复制
;
sr-forget
xapi
代理忽
略了
xen
主机上某个指定的
SR
p>
,这意味这
SR
被分离,无法访问其上
p>
的
VDI
,但该
S
R
在原介质中保持原样
;
任务命令
:
task-list
列出当前任务的列表
;
task-
cancel
指示取消指定的任务并返回
;
用户命令:
user-password-change
更改用户密码
VBD
命令
:
vbd-list
列出系统中所有的
VBD
对象
;
vbd-create
在
VM
上新建
VBD
,如果
type
为
Disk
,则必须指定
vdi-uuid
,对于磁盘模式可
以为
RO
或
RW
;如果
type
为
CD
,则可选择是否指定
vdi-uuid
,如果不指定
VDI
,将为
CD
创建空
VBD
,对于
CD
,模式必须为
R
O
;
vbd-desttoy
p>
销毁指定的
VBD
,如果
< br>VBD
将其
other-config:owner
p>
参数设置为
true
,则其关
联的
VDI
也江被销毁
;
list_domains
Xe vm-disk-list
vm=test(name-lable)
Xe vbd-list vdi-
uuid=
Xe vdi-param-set uuid=*******
name-label=name
vbd-ehect <
/p>
从
VBD
代表的驱动其中删除介质
;
.....
VDI
命令:
vdi-list
列出当前所有的
V
DI
对象
;
vdi-clone <
/p>
创建指定
VDI
的新可写副本
;
vdi-copy
将
VDI
复制到指定的
SR
;
vdi-create
创建
VDI
;
vdi-destroy
销毁指定的
VDI
;
VIF
命令
用于
VIF
(虚拟网络接口)的命令
vif-list
用于列出所有
VI
F
对象
;
vif-create <
/p>
在
VM
上新建
V
IF;
vif-dsetroy
销毁
VIF;
vif-plug <
/p>
尝试在
VM
处于运行状态时连接
VIF;
vif-unplug
当
VM
处于运行状态时尝试将
VIF
从中分离出来
;
VLAN
命令
xe pif-list
列出
VLAN
vlan-
create
在
XEN
主机上创建新
VLAN;
pool-vlan-create
通过确定特定网络所在的每个主机的接口
(
例如<
/p>
eth0)
,
并在每个相应的主机
上创建和插入一个新的
PIF
对象
,
为池中的所有主机创建一个新
VLAN;
vlan-destroy
销毁
VL
AN
,需要使用表示
vlan
的
PIF
的
UUID;
VM
命令
vm-list
用于列出当前所有的
VM
对象
;
vm-assert-
can-be-recovered
测试存储是否可用于恢复次
VM
;
vm-cd-add
p>
将新虚拟
CD
添加到所选的
VM;
vm-cd-eject
从虚拟
CD
驱动器弹出
CD
,当
且仅当只有一个
CD
连接到
VM
时,此命令才会
起作用;如果有两个或更多
C
D
,请使用命令
xe vbd-eject
。并指定
VBD
的
UUID
;
vm-cd-insert
将
CD
插入到虚拟
CD<
/p>
驱动器,当有且仅有一个空
CD
设备连接
VM
时,此命
令才会起作用,
如果有两个或多个空
CD
设备,
请使用命令
xe vbd-insert
并指定要插入
的
VBD
和
VDI
的
UUID
;
vm-cd-list
列出连接到指定
VM
的
CD
;
vm-cd-remove
从指定
VM
中移除虚拟
CD;
vm-
copy
复制现有的
VM;
vm-
crashdump-list
列出与指定
VM
关联的故障存储
;
vm-data-
source-list
列出可为
VM
记录的数据源
;
vm-data-source-
record
记录
VM
的指定数据源
,
此操作会将数据源中的信息写入指定
VM
的
静态性能指标数据库中,由于性能的原因,此数据看不同于普通的代理数据库
p>
;
vm-data-source-query
显示
VM
的指定数据源
;
vm-destroy
销毁指定的
V
M
,这会使与
VM
关联的存储保留不变
,要同时删除存储,请使用
xe vm-uninstall;
vm-disk-add
将新磁盘添加到指定
VM;
vm-
disk-list
列出连接到指定
VM
的磁盘
;
vm-disk-remove
从指定
VM
移除磁盘并将其销毁
;
vm-export
将指定
VM
到处到本地计算机上的文件中;
vm-import
从之前导出的文件导入
< br>VM
,早期的基于目录的
XVA
格式不能完整保留所有
VM
属性,尤其是默认情况下导入的
p>
VM
不会连接任何虚拟网络接口,如果需要网络,则使用
vif-create
和
vif-
plug
创建一个网络
;
vm-
indtall
基于模板安装或克隆
VM;
vm-migrate
在物理主机间迁移指定的
vm;
vm-reboot
重新引导指定的
VM
;
vm-recover
p>
从提供的
VDI
中包含的数据库中恢复
p>
VM;
vm-reset-powerstate
此命令强制池主服务器将
VM
的电源状态重置为
p>
halted
,
仅在池中的成
员主机出现故障时使用
;
vm-resume <
/p>
恢复指定的
VM
,如果
< br>VM
位于主机池内的共享
SR
上
,则使用
on
参数指定要
在其上启动的
VM
的主机
;
vm-shutdown
关闭指定
V
M
,使用
force
参数将导致非正常
关机(硬关机)
;
vm-suspend
挂起指定的
VM;
vm-
uninstall
卸载
VM
销毁其磁盘;
?
修改
XS
的时间,用
date
命令,最后
clock
–
w
保存下
date
so for example, to set to June 14, 2011
at 11:30:20 AM,
date
06141130.20
If you don't
care about seconds and want to set to June 14,
2011 at 11:31 AM
date
06141131
?
如何添加
p>
NTP
服务器
/article/CTX116307
service ntpd restart
ntpq
–
p
?
重新扫
描
HBA
路径:
1.
确
认
hba
卡所在的
host
序号
systool -c
fc_host
–
v
这边有几个<
/p>
HBA
卡就会显示几个
host
,比如显示的
host2
,
host5
2.
Echo
//
注意“
- -
-
“
三个中横线之间有空格
3.
Echo
“
- - -
“
>/sys/class/scsi_host/host5/scan
重新
remount
linux
的文件系统为读写
Mount
–
o
remount,rw /
Restart Multipath
Service
Restart multipathing
on each XenServer in the pool after any change to
the /etc/ file.
Run the following
command:
# chkconfig
multipathd restart
?
多路径方式的选择
在
xenserver
multip
ath
中支持两种
multipath
的
handler
,分别为
DMP
p>
和
MPP
RDAC
,
视具体的存储阵列
来选择具体的
handler
,如下是常见的存储厂
商所支持的
Handler
:
Array Series Handler
Dell MD 3000 series MPP
(default)
Fujitsu Eternus
Storage MPP RDAC
HP
StorageWorks Modular Smart Array (MSA) DMP
(default)
HP StorageWorks
Enterprise Virtual Array (EVA) DMP
(default)
IBM DS series MPP
(default)
IBM SANs MPP
RDAC
LSI, LSI-based arrays
MPP RDAC
NetApp DMP
(default)
因此对于你们的
IBM
DS
系列的存储则应该使用
MPP <
/p>
RDAC
的
handler
,在
xenserver
的
console
中使用如下的命令可以实现将默认的
handl
er
由
DMP
转为
MPP RDAC
/opt/xensource/libexec/mpp-rdac
--enable
然后
reboot
host
?
How to Check if
Extra C-States are Enabled without Booting into
the BIOS
/article/CTX130464
Instructions
Complete the following procedure:
1.
Open a console
to the host, it could be using a SSH client, the
console tab in XenCenter, or the local console.
2.
Run the
following command:
xenpm get-cpuidle-
states | grep total | uniq
3.
If extra
C-States are enabled, the command in step 2
generates an output similar to this:
total C-states: 4
4.
If no extra
C-States have been enabled, the output is similar
to the following:
total C-states: 2
Note:
If the value of total
C-States is bigger than 2, the extra C-States have
been enabled and as per CTX127395
–
Hosts Become
Unresponsive with XenServer 5.6 and above on
Nehalem and Westmere CPUs
.
C-States must be disabled from the
BIOS.
?
Network Interface Cards are Missing
After Replacing or Adding
NICs to
XenServer
/article/CTX129946
To resolve the issue,
complete the following steps:
1.
Run the
following command to get the UUID of the old NIC:
Xe pif-list
f8478317-693f-57ba-110e-995251368b40
device ( RO): eth0
currently-attached ( RO): true
VLAN ( RO): -1
network-uuid
( RO): 5e53aa85-e587-997e-4206-cf57b880bdae
2.
Run the
following command to remove the old NIC:
Xe pif-forget uuid=
f8478317-693f-57ba-110e-995251368b40
-
-
-
-
-
-
-
-
-
上一篇:软件系统日常运维服务方案
下一篇:品质管理有关的日语