解决VMWARE:在数据存储区的当前状态下不允许执行该操作

在客户现场,我们在他们的VMware vSphere环境中安装了NetApp AFF A220。一个非常不错的全闪存阵列,具有大量的功能和性能。为了制作可靠的虚拟机快照,我们安装了虚拟存储控制台和NetApp Data Broker虚拟设备。但是在安装和配置之后,出现了一个奇怪的问题。
在某些数据存储上创建虚拟机后,任务失败并显示错误"the operation is not allowed in the current state of the datastore"。在调查过程中,我注意到虽然几乎50%的可用空间仍然可用,但有关的数据存储已超量配置。显然,所有出色的NetApp存储效率功能(如重复数据删除,压缩和压缩)对于VMware来说都是至关重要的。
当我在寻找解决方案时,我偶然发现了一篇VMware KB文章,该文章建议禁用vCenter中的NetApp组件。显然,禁用NetApp虚拟存储控制台和SnapCenter插件并不能解决问题。解决方案也不是完全删除它们。

经过进一步调查,我发现数据存储区获得了一个额外的标志,称为thin_prov_space_flag。以下是进行自我检查的说明。

首先启用对您的vCenter ApplianceSSH访问(如果尚未启用):
浏览至https\ <您的vcenter ip或主机名>5480,使用登录root并启用SSH
正在上传…重新上传取消​
接下来,使用SSH客户端(例如Putty)与设备建立SSH连接,然后再次使用登录root。运行shell命令以启用bash-shell

login as: root

VMware vCenter Server Appliance 6.5.0.21000

Type: vCenter Server with an embedded Platform Services Controller

Using keyboard-interactive authentication.

Password:

Last login: Tue Jan 21 xx:xx:xx 2020 from x.x.x.x

Connected to service

    * List APIs: "help api list"

    * List Plugins: "help pi list"

    * Launch BASH: "shell"

Command> shell

Shell access is granted to root

root@<vcenter server> [ ~ ]#COPY

在停止服务之前,您可能需要检查这是否也是您的问题。
找出您的数据库密码:cat /etc/vmware-vpx/vcdb.properties并连接到数据库/opt/vmware/vpostgres/current/bin/psql -d VCDB -U vc

root@<vcenter server> [ ~ ]# cat /etc/vmware-vpx/vcdb.properties

driver = org.postgresql.Driver

dbtype = PostgreSQL

url = jdbc:postgresql://localhost:5432/VCDB

username = vc

password = <your db password>

password.encrypted = false

root@<vcenter server>[ ~ ]# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U vc

Password for user vc:

psql.bin (9.4.15 (VMware Postgres 9.4.15.0-7748409 release))

Type "help" for help.

VCDB=>COPY

运行命令以查看thin_prov_space_flag数据存储的:(select id,thin_prov_space_flag from vpx_datastore;
不要忘了最后的分号)

VCDB=> select id,thin_prov_space_flag from vpx_datastore;

  id  | thin_prov_space_flag

------+----------------------

  151 |                    0

  163 |                    0

  157 |                    0

  143 |                    0

  169 |                    0

 3159 |                    1

 3160 |                    1

   15 |                    0

 3161 |                    1

 3134 |                    0

(10 rows)

VCDB=>COPY

thin_prov_space_flag问题数据存储区下带有“ 1”的数据存储区。“ 1”阻止创建虚拟机。现在输入/q以退出Postgress提示符并返回到bash shell。之后,停止Vmware服务service-control --stop vmware-vpxd

VCDB=> \q

root@<vcenter server> [ ~ ]# service-control --stop vmware-vpxd

Perform stop operation. vmon_profile=None, svc_names=['vmware-vpxd'], include_coreossvcs=False, include_leafossvcs=False

Successfully stopped service vpxd

root@<vcenter server>[ ~ ]#COPY

再次输入PSQL提示。连接后,将tha数据存储区的值从1更改为0 :(update vpx_datastore set thin_prov_space_flag=0 where id=;同样不要忘记分号),并在必要时重复。完成使用后 /q ,离开Postgress提示符并返回bash shell。之后,启动Vmware服务(service-control --start vmware-vpxd

root@<vcenter server>[ ~ ]# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U vc

Password for user vc:

psql.bin (9.4.15 (VMware Postgres 9.4.15.0-7748409 release))

Type "help" for help.

VCDB=> update vpx_datastore set thin_prov_space_flag=0 where id=3159;

UPDATE 1

VCDB=> \q

root@<vcenter server> [ ~ ]# service-control --start vmware-vpxd

Perform start operation. vmon_profile=None, svc_names=['vmware-vpxd'], include_coreossvcs=False, include_leafossvcs=False

xxxx-xx-xxTxx:16:50.306Z   Service vpxd state STOPPED

Successfully started service vpxd

root@<vcenter server> [ ~ ]#COPY

(可选)您可以在离开Postgress提示符之前检查该标志是否正确设置为零。 select id,thin_prov_space_flag from vpx_datastore;

VCDB=> select id,thin_prov_space_flag from vpx_datastore;

  id  | thin_prov_space_flag

------+----------------------

  151 |                    0

  163 |                    0

  157 |                    0

  143 |                    0

  169 |                    0

 3159 |                    0

 3160 |                    0

 3161 |                    0

   15 |                    0

 3134 |                    0

(10 rows)

VCDB=> \q

root@<vcenter server> [ ~ ]#COPY

现在可以再次创建虚拟机。因此,请回到您的vCenter Server并开始配置。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值