# ProxmoxVE高可用集群搭建并集成Ceph

## 简介

> ProxmoxVE是类似Vmware Esxi的系统，可以创建并管理容器和虚拟机

## 下载ProxmoxVE的ISO镜像

* <https://www.proxmox.com/en/downloads>

## 主机网络环境规划

| 主机名 | eth0（桥接外网）     | eth1（Ceph内网） |
| --- | -------------- | ------------ |
| s1  | 192.168.88.101 | 10.37.129.20 |
| s2  | 192.168.88.102 | 10.37.129.21 |
| s3  | 192.168.88.103 | 10.37.129.22 |

* 3台服务器都安装ProxmoxVE的ISO镜像
* 3台服务器都配置好网卡，网络
* 3台服务器都修改/etc/hosts

## 在s1上创建ProxmoxVE的集群

```
# 创建集群
pvecm create cluster
pvecm status

# 添加节点
pvecm add s1
pvecm add s2
pvecm add s3
```

## 安装Ceph

```
# 每一个节点都需要操作，安装Ceph
pveceph install  
# s1上操作
pveceph init --network 10.37.129.0/24
# 每一个节点都需要操作，安装mon
pveceph createmon
```

* 然后登陆Web管理界面: <https://192.168.88.101:8006>
* 在Web界面上对每个节点都创建OSD
* 在Web界面上的某个节点创建POOL

## 创建CT或虚拟机

* 下载CT镜像：<http://download.proxmox.com/images/system/>
* 下载ISO镜像：百度/谷歌
* 将镜像上传到s1的/var/lib/vz/template
* CT镜像放到cache文件夹，iso镜像放到iso文件夹
* 在web界面上创建CT或虚拟机

## 设置HA

* 在Web界面上操作，点击HA进行配置

## RestFulAPI

* <https://pve.proxmox.com/pve-docs/api-viewer/index.html>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://how2realize.gitbook.io/project/zen-yang-shi-xian-de/proxmoxve-gao-ke-yong-ji-qun-da-jian-bing-ji-cheng-ceph.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
