开发者社区> 问答> 正文

使用bosh安装cloudfoundry的问题

我现在是在部署cloudfoundry,其中需要先部署bosh,但是我在部署bosh的时候遇到了问题,中间没有任何的报错,最后输出无法启动

image.png

关于bosh的版本,我是使用的最新版的
下面的是输出日志信息

```[root@bogon bosh]# bosh create-env bosh-deployment/bosh.yml \

--state=state.json \
--vars-store=creds.yml \
-o bosh-deployment/vsphere/cpi.yml \
-o bosh-deployment/vsphere/resource-pool.yml \
-v director_name=bosh-1 \
-v internal_cidr=10.2.160.0/24 \
-v internal_gw=10.2.160.254 \
-v internal_ip=10.2.160.1 \
-v network_name="VM-Network-2" \
-v vcenter_dc=Datacenter \
-v vcenter_ds=Datastore_nfs \
-v vcenter_ip=10.2.161.10 \
-v vcenter_user=administrator@vs.local \
-v vcenter_password=UY6aAKjbQus:6A4 \
-v vcenter_templates=bosh-1-templates \
-v vcenter_vms=bosh-1-vms \
-v vcenter_disks=bosh-1-disks \
-v vcenter_rp=Resource-Pool \
-v vcenter_cluster=cluster

Deployment manifest: '/home/bosh/bosh-deployment/bosh.yml'
Deployment state: 'state.json'

Started validating
Downloading release 'bosh'... Skipped [Found in local cache] (00:00:00)
Validating release 'bosh'... Finished (00:00:01)
Downloading release 'bpm'... Skipped [Found in local cache] (00:00:00)
Validating release 'bpm'... Finished (00:00:01)
Downloading release 'bosh-vsphere-cpi'... Skipped [Found in local cache] (00:00:00)
Validating release 'bosh-vsphere-cpi'... Finished (00:00:04)
Validating cpi release... Finished (00:00:00)
Validating deployment manifest... Finished (00:00:00)
Downloading stemcell... Skipped [Found in local cache] (00:00:00)
Validating stemcell... Finished (00:00:09)
Finished validating (00:00:26)

Started installing CPI
Compiling package 'golang-1-darwin/c763ba92134af1d637bb6790f12453f1f9f15c1ec47bf79b0ec96de6814aa81b'... Finished (00:00:19)
Compiling package 'golang-1-linux/29f2024e7d815be0694944c3c3c9512914a36a31d5fa1b2cbd2452c8d331ce90'... Finished (00:00:19)
Compiling package 'ruby-3.1/8b225e7cc2608305a7b784b5828b2b4b7c7adc3eb14af46e313d64a9e14a3ad6'... Finished (00:05:05)
Compiling package 'iso9660wrap/57da6c48c387379cc701856daa68f9f5269c2441d0195a0c5a735c93d6d2c489'... Finished (00:00:17)
Compiling package 'vsphere_cpi/3a52a41dfcd0bdf411198f93e6a89591553be6afda07780d6de7df7d13dc2ddb'... Finished (00:00:20)
Installing packages... Finished (00:00:12)
Rendering job templates... Finished (00:00:00)
Installing job 'vsphere_cpi'... Finished (00:00:00)
Finished installing CPI (00:06:34)

Uploading stemcell 'bosh-vsphere-esxi-ubuntu-jammy-go_agent/1.199'... Finished (00:03:39)

Started deploying
Creating VM for instance 'bosh/0' from stemcell 'sc-cf3e9272-e08c-4d58-b3f5-96c13ae46d4a'... Finished (00:00:23)
Waiting for the agent on VM 'vm-5c72077c-c67c-4258-a8c0-37326f55eaae' to be ready... Finished (00:00:31)
Creating disk... Finished (00:00:09)
Attaching disk 'disk-d8d4e48b-49e2-4bd9-bd26-97474a93c956' to VM 'vm-5c72077c-c67c-4258-a8c0-37326f55eaae'... Finished (00:00:34)
Rendering job templates... Finished (00:00:11)
Compiling package 'golang-1-linux/29f2024e7d815be0694944c3c3c9512914a36a31d5fa1b2cbd2452c8d331ce90'... Skipped [Package already compiled] (00:00:01)
Compiling package 'director-ruby-3.2/84ee2f9d0485530a75822fa03e7fd0c73544aa4c2f6fe24aaebebe1757195efe'... Skipped [Package already compiled] (00:00:00)
Compiling package 'mysql/67dc3882464cb721ac6f0c093a0b2aeb4d4f963a0c7cd6a8a6e5764f3e193293'... Skipped [Package already compiled] (00:00:00)
Compiling package 'libpq/b309a72768019e24e2c592f3f25ded2679e98cbb90f774c3a4d6b7745760079f'... Skipped [Package already compiled] (00:00:00)
Compiling package 'ruby-3.1/8b225e7cc2608305a7b784b5828b2b4b7c7adc3eb14af46e313d64a9e14a3ad6'... Finished (00:05:47)
Compiling package 'tini/3d7b02f3eeb480b9581bec4a0096dab9ebdfa4bc'... Skipped [Package already compiled] (00:00:00)
Compiling package 'bpm-runc/9f66395d85ace4b4d4908069742f7db27dc28d0a'... Skipped [Package already compiled] (00:00:00)
Compiling package 'golang-1-darwin/c763ba92134af1d637bb6790f12453f1f9f15c1ec47bf79b0ec96de6814aa81b'... Finished (00:00:19)
Compiling package 'golang-1-linux/29f2024e7d815be0694944c3c3c9512914a36a31d5fa1b2cbd2452c8d331ce90'... Finished (00:00:19)
Compiling package 'postgres-10/e3f2ed31116e1a0c929ae6fcdde983a9d6c000c25cafde8a784fd126e06400f9'... Skipped [Package already compiled] (00:00:00)
Compiling package 'postgres-15/d60a5c68874e269beb9e2b03ea692912229bde7b0076d01f30203be6918323d2'... Skipped [Package already compiled] (00:00:00)
Compiling package 'bosh-gcscli/fc2b4b43a11fa3a6e4ac9f86ad4b750975f516371214ff04e01330f26e2a1222'... Skipped [Package already compiled] (00:00:00)
Compiling package 's3cli/595ee5f996cb5bbba60e154d05907e56751c2417b80f7533afa370119bc71c6e'... Skipped [Package already compiled] (00:00:00)
Compiling package 'director/a0be318a6f37525e62c779db96f0433ba1686767450e89e8a3d3f4dd982c28e3'... Skipped [Package already compiled] (00:00:00)
Compiling package 'nats/059ac4a2c0fd261f510efc239c5db4d2c83239f86768be42642fc81f2eee3332'... Skipped [Package already compiled] (00:00:00)
Compiling package 'vsphere_cpi/3a52a41dfcd0bdf411198f93e6a89591553be6afda07780d6de7df7d13dc2ddb'... Finished (00:00:28)
Compiling package 'nginx/ea3eadaa82bb9344018a8798a825b98315b1195bb1d495257f38421b0b7618a5'... Skipped [Package already compiled] (00:00:00)
Compiling package 'bpm/a677a3b57b36b898c10f9709c9f9813da6d878f0'... Skipped [Package already compiled] (00:00:00)
Compiling package 'iso9660wrap/57da6c48c387379cc701856daa68f9f5269c2441d0195a0c5a735c93d6d2c489'... Finished (00:00:13)
Compiling package 'health_monitor/c73db65a8a6aab446d7b81e6556c404bceffbda66bd3577296cf86af6afbac81'... Skipped [Package already compiled] (00:00:00)
Compiling package 'azure-storage-cli/8171a6ce0268a46a5f4a918ef5d7582ade2da6e0b3d53ac112527b09838c0772'... Skipped [Package already compiled] (00:00:00)
Compiling package 'davcli/cd048dc15c36ea85ec1e3db5ce2664fef7afc870d76f9394ca4c934e53a32a73'... Skipped [Package already compiled] (00:00:00)
Compiling package 'verify_multidigest/b994fa322b82ed46da9771398c3881821967111313aee7739f94fbbddd4f9830'... Skipped [Package already compiled] (00:00:00)
Compiling package 'postgres-13/fe1546f1a699070e23310d860d6c6ea6e61d086eb5cac3e50092cbb4368e8fa1'... Skipped [Package already compiled] (00:00:00)
Updating instance 'bosh/0'... Finished (00:00:21)
Waiting for instance 'bosh/0' to be running... Failed (00:05:03)
Failed deploying (00:14:28)

Cleaning up rendered CPI jobs... Finished (00:00:00)

Deploying:
Received non-running job state: 'failing'

Exit code 1
[root@bogon bosh]#
```

由于屏幕没有任何其他的输出,我这边也没有办法通过ssh链接到出问题的虚拟机上,是通过了一个折中的办法,也是bosh官网的一个办法 https://bosh.io/docs/tips/#unresponsive-vm-logs

思路就是,把出问题的虚拟机关机,然后卸载掉磁盘。然后手动新建一个正常的虚拟机,在将出问题的虚拟机的磁盘挂载到新建的虚拟机上,这样可以达到访问磁盘的目的
但是这样以后,我通过查看磁盘的日志,也没有找到相应的错误输出。但是我在22年12月份的时候是成功装过一次,没有遇到这个问题

不知道大家有没有什么好的解决方案,最终的目的是想将cloudfoundry安装成功

展开
收起
vnvgv3efhihzw 2023-08-29 15:39:00 126 0
2 条回答
写回答
取消 提交回答
  • 根据bosh官方的安装教程https://bosh.io/docs/init-vsphere/
    下面的是我自己实际情况的参数
    ```[root@bogon bosh]# bosh create-env bosh-deployment/bosh.yml \

    --state=state.json \                                        #这三个参数是bosh给出的固定格式
    --vars-store=creds.yml \                                    #这三个参数是bosh给出的固定格式
    -o bosh-deployment/vsphere/cpi.yml \                        #这三个参数是bosh给出的固定格式
    -o bosh-deployment/vsphere/resource-pool.yml \            #声明我要使用vsphere的资源池功能
    -v director_name=bosh-1 \                                    #bosh的自定义名称
    -v internal_cidr=10.2.160.0/24 \                            #bosh所用的网络
    -v internal_gw=10.2.160.254 \                                #bosh的网关
    -v internal_ip=10.2.160.1 \                                #bosh的ip地址
    -v network_name="VM-Network-2" \                            #bosh使用的网络交换机,这个上行链路就是10.2.160.0这个网段
    -v vcenter_dc=Datacenter \                                #vsphere的数据中心名称
    -v vcenter_ds=Datastore_nfs \                                #vsphere的存储
    -v vcenter_ip=10.2.161.10 \                                #vsphere的地址
    -v vcenter_user=administrator@vs.local \                    #vsphere的登录账户
    -v vcenter_password=passsw \                                #vsphere的登录密码
    -v vcenter_templates=bosh-1-templates \                    #这个参数是bosh给出的固定格式,bosh名称加templates
    -v vcenter_vms=bosh-1-vms \                                #这个参数是bosh给出的固定格式,bosh名称加vms
    -v vcenter_disks=bosh-1-disks \                            #这个参数是bosh给出的固定格式,bosh名称加disks
    -v vcenter_rp=Resource-Pool \                                #vsphere资源池的名称
    -v vcenter_cluster=cluster                                #vsphere的集群名称
    

    ```
    image.png
    image.png
    image.png

    2023-08-30 09:47:03
    赞同 展开评论 打赏
  • CSDN全栈领域优质创作者,万粉博主;InfoQ签约博主;华为云享专家;华为Iot专家;亚马逊人工智能自动驾驶(大众组)吉尼斯世界纪录获得者
    • BOSH环境配置错误:如果您在部署BOSH时没有正确配置BOSH环境,可能会导致BOSH无法启动。

    • BOSH Agent未启动:如果BOSH Agent未启动,可能会导致BOSH无法启动。

    • 网络配置错误:如果您在部署BOSH时没有正确配置网络,可能会导致BOSH无法启动。

    2023-08-29 15:41:39
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载