“Proxmox 笔记”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
 
(未显示同一用户的18个中间版本)
第106行: 第106行:
 
rm -f /etc/apt/sources.list.d/pve-enterprise.list
 
rm -f /etc/apt/sources.list.d/pve-enterprise.list
  
 +
#5
 
echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
 
echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
  
 
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
 
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
 +
 +
#5 to 6
 +
 +
echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
 +
sed -i 's/stretch/buster/g' /etc/apt/sources.list
 +
 +
apt update
 +
apt dist-upgrade
 +
 +
#6 to  7
 +
Update the configured APT repositories
 +
 +
First, make sure that the system is using the latest Proxmox VE 6.4 packages:
 +
 +
apt update
 +
apt dist-upgrade
 +
 +
Update all Debian repository entries to Bullseye.
 +
 +
sed -i 's/buster\/updates/bullseye-security/g;s/buster/bullseye/g' /etc/apt/sources.list
 +
 +
#也可直接换成国内的源
 +
vi /etc/apt/sources.list
 +
 +
deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
 +
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
 +
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
 +
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
 +
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
 +
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
 +
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
 +
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
 +
 +
 +
#Add the Proxmox VE 7 Package Repository
 +
 +
echo "deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list
 +
sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list
 +
 +
#Upgrade the system to Debian Bullseye and Proxmox VE 7.0
 
apt update && apt dist-upgrade
 
apt update && apt dist-upgrade
  
第117行: 第158行:
  
 
https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch
 
https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch
 +
 +
https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0
 +
 +
https://pve.proxmox.com/wiki/Upgrade_from_5.x_to_6.0#Introduction
  
 
https://pve.proxmox.com/wiki/Upgrade_from_4.x_to_5.0
 
https://pve.proxmox.com/wiki/Upgrade_from_4.x_to_5.0
  
 
=trouble shooting =
 
=trouble shooting =
1.
+
==1.在 dell 服务器上安装 出错 ==
在 dell 服务器上安装 出错  
 
  
 
command 'chroot /target dpkg --force-confold --configure -a' failed with exit code 1 at /usr/bin/proxinstall line 385
 
command 'chroot /target dpkg --force-confold --configure -a' failed with exit code 1 at /usr/bin/proxinstall line 385
第129行: 第173行:
  
  
2. TASK ERROR: Failed to run vncproxy.
+
==2. TASK ERROR: Failed to run vncproxy.==
 
可能是没打开虚拟化
 
可能是没打开虚拟化
  
 +
==3 升级问题 ==
 +
<pre>
 +
If you are unsure why 'proxmox-ve' would be removed, please verify
 +
W: (pve-apt-hook) - your APT repository settings
 +
W: (pve-apt-hook) - that you are using 'apt full-upgrade' to upgrade your system
 +
E: Sub-process /usr/share/proxmox-ve/pve-apt-hook returned an error code (1)
 +
E: Failure running script /usr/share/proxmox-ve/pve-apt-hook
 +
root@pve:~# /etc/apt/sources.list.d/pve-install-repo.list^C
 +
 +
-bash: etc/apt/sources.list.d/pve-install-repo.list: No such file or directory
 +
root@pve:~# cat /etc/apt/sources.list.d/pve-install-repo.list
 +
#deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
 +
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
 +
root@pve:~# sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list
 +
 +
 +
 +
少了一步
 +
sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list </pre>
  
 
=3=
 
=3=
第147行: 第210行:
 
Then try to restart the VM and it should be good.
 
Then try to restart the VM and it should be good.
 
</pre>
 
</pre>
 +
 +
 +
=网络  wifi=
 +
https://pve.proxmox.com/wiki/WLAN
 +
[https://blog.csdn.net/qq_19905867/article/details/114118476  Proxmox VE(PVE)连接WiFi及一些配置]
 +
=权限=
 +
[https://blog.51cto.com/yuweibing/2460451  ProxmoxVE 添加用户权限]
  
 
= 分布式存储Ceph=
 
= 分布式存储Ceph=
第159行: 第229行:
  
 
[https://blog.51cto.com/lijie1977/2348579  免费开源的服务器虚拟化Proxmox+分布式存储Ceph(四)]
 
[https://blog.51cto.com/lijie1977/2348579  免费开源的服务器虚拟化Proxmox+分布式存储Ceph(四)]
 +
 
=proxmox and k8s=
 
=proxmox and k8s=
  
第167行: 第238行:
 
https://stackoverflow.com/questions/55813994/install-and-create-a-kubernetes-cluster-on-lxc-proxmox
 
https://stackoverflow.com/questions/55813994/install-and-create-a-kubernetes-cluster-on-lxc-proxmox
  
=参考=
+
=proxmox虚拟机中添加硬盘=
 +
 
 +
[https://www.cnblogs.com/weihua2020/p/13717318.html proxmox虚拟机中添加外部硬盘]
 +
 
 +
[https://blog.51cto.com/kusorz/2495915  Proxmox VE 在线扩容磁盘分区]
 +
 
 +
= PVE的磁盘分区以及local-lvm空间=
 +
 
 +
https://pve.proxmox.com/wiki/Storage:_LVM
 +
 
 +
[https://zhuanlan.zhihu.com/p/145862221 Proxmox虚拟系统PVE的磁盘分区及文件系统分析总结]
 +
 
 +
[https://blog.csdn.net/qq_40858216/article/details/105071040  Proxmo VE(pve) 调整local 以及local-lvm空间]
 +
 
 +
[https://vzone.me/943/ Proxmox VE (PVE6.x) 增加 或减小 local 目录的大小即扩容]
 +
 
 +
=reference=
 
[https://blog.csdn.net/sxjinmingjie/article/details/101694507  使用Proxmox搭建私有云平台有集群]
 
[https://blog.csdn.net/sxjinmingjie/article/details/101694507  使用Proxmox搭建私有云平台有集群]
  

2023年10月9日 (一) 06:30的最新版本

下载

官方安装文档

下载url ,然后选择Proxmox VE 5.x ISO Installer

https://www.proxmox.com/en/downloads/item/proxmox-ve-5-1-iso-installer

下载完成后 和官网 SHA256SUMS 对比一下 用下面的命令

evan@evanpc:~/iso/proxmox$ sha256sum  proxmox-ve_5.1-722cc488-1.iso 
e279547f07402cae615834cc7ea1cebd1ec05028e892e93c2327d0bc049fc914  proxmox-ve_5.1-722cc488-1.iso

使用

https://192.168.88.8:8006

一些要注意的

1)写入U盘得用 dd才行
dd if=pve-cd.iso of=/dev/XYZ bs=1M
http://pve.proxmox.com/wiki/Install_from_USB_Stick 


proxmox 上传镜像
在create vm时可以不用物理光驱,此处是proxmox的母机
/var/lib/vz/template/iso

vm 安装centos7

来不及设置密码 启动机器后 单用户进去就行了

Centos7单用户模式

win user

win32 disk imager 推荐这个写入

usb

我是直接在web界面添加 然后添加你穿入的USB

硬件--> 添加--> usb设备--> 使用usb端口--> --> -->

proxmox VE 4.4 增加USB 重定向功能

USB Devices in Virtual Machines

修改Proxmox VE 5的储存方式,不使用 lvmthin


修改Proxmox VE 5的储存方式,不使用 lvmthin

Proxmox VE 5 使用的是lvmthin这种方式来存放vm的磁盘镜像文件,据Proxmox的说明文档中所述,这种方式是block型的存储,速度会更快,而且是按实际使情况来分配空间,所以可以分配出看上去比实际要大的空间出来(存在一定风险),让终端用户看起来有很多空间,总之好处很多。
但对于单位内部来说,我觉得不必去节省这些存在风险的成本,而且我还有不少的KVM旧文件需要迁到这里来,用这种存储方式不太方便。所以将这种方式改为传统方式。以下是在新安装没有创建任何VM或CT的前提下操作。

一、修改storage配置文件

cd /etc/pve/
cp storage.cfg storage.cfg.1

nano storage.cfg
将文件从
--------------
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images
------------
注:vgname pve (这个是vg名,在/dev目录下可找到,可使用 pvs, vgs, lvs等命令查看)

改为:
---------------------
dir: local
        path /var/lib/vz
        content rootdir,content iso,images,vztmpl,backup
--------------------

二、将 lvmthin 变回传统文件系统格式,并挂载。

mkfs.ext4 /dev/pve/data
mount /dev/pve/data /mnt
cp -r /var/lib/vz/* /mnt
mount /dev/pve/data /var/lib/vz/

三、修改fstab
nano /etc/fstab
--------------------
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
/dev/pve/data /var/lib/vz/ ext4 defaults 0 0
————————————————


修改Proxmox VE 5的储存方式,不使用 lvmthin

Proxmox 删除local-lvm 操作步骤

ProXmoX VE升级

vim /etc/apt/sources.list.d/pve-enterprise.list
#deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
#也可以直接删除掉
rm -f /etc/apt/sources.list.d/pve-enterprise.list

#5
echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list

wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg

#5 to 6

echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
sed -i 's/stretch/buster/g' /etc/apt/sources.list

apt update
apt dist-upgrade

#6 to  7
Update the configured APT repositories

First, make sure that the system is using the latest Proxmox VE 6.4 packages:

apt update
apt dist-upgrade

Update all Debian repository entries to Bullseye.

sed -i 's/buster\/updates/bullseye-security/g;s/buster/bullseye/g' /etc/apt/sources.list

#也可直接换成国内的源 
vi /etc/apt/sources.list

deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib


#Add the Proxmox VE 7 Package Repository

echo "deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list
sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list 

#Upgrade the system to Debian Bullseye and Proxmox VE 7.0
apt update && apt dist-upgrade

升级完成后,可以执行pveversion -v查看下最新的软件版本。然后执行reboot重启物理服务器

官方文档:

https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch

https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0

https://pve.proxmox.com/wiki/Upgrade_from_5.x_to_6.0#Introduction

https://pve.proxmox.com/wiki/Upgrade_from_4.x_to_5.0

trouble shooting

1.在 dell 服务器上安装 出错

command 'chroot /target dpkg --force-confold --configure -a' failed with exit code 1 at /usr/bin/proxinstall line 385

原来raid 没有初始化


2. TASK ERROR: Failed to run vncproxy.

可能是没打开虚拟化

3 升级问题

 
 If you are unsure why 'proxmox-ve' would be removed, please verify
W: (pve-apt-hook) 	- your APT repository settings
W: (pve-apt-hook) 	- that you are using 'apt full-upgrade' to upgrade your system
E: Sub-process /usr/share/proxmox-ve/pve-apt-hook returned an error code (1)
E: Failure running script /usr/share/proxmox-ve/pve-apt-hook
root@pve:~# /etc/apt/sources.list.d/pve-install-repo.list^C

-bash: etc/apt/sources.list.d/pve-install-repo.list: No such file or directory
root@pve:~# cat /etc/apt/sources.list.d/pve-install-repo.list
#deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
root@pve:~# sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list 



少了一步 
 sed -i -e 's/buster/bullseye/g' /etc/apt/sources.list.d/pve-install-repo.list 

3

clone出来的VM启动不了 
Proxmox trying to acquire lock... TASK ERROR: can't lock file '/var/lock/qemu-server/lock-102.conf' - got timeout

If Proxmox won't start aVM with an error like this:

trying to acquire lock...
TASK ERROR: can't lock file '/var/lock/qemu-server/lock-102.conf' - got timeout

rm /var/lock/qemu-server/lock-102.conf

Then try to restart the VM and it should be good.


网络 wifi

https://pve.proxmox.com/wiki/WLAN Proxmox VE(PVE)连接WiFi及一些配置

权限

ProxmoxVE 添加用户权限

分布式存储Ceph

ceph分布式存储简介

免费开源的服务器虚拟化Proxmox+分布式存储Ceph(一) 原创

免费开源的服务器虚拟化Proxmox+分布式存储Ceph(二)

免费开源的服务器虚拟化Proxmox+分布式存储Ceph(三) 原创

免费开源的服务器虚拟化Proxmox+分布式存储Ceph(四)

proxmox and k8s

https://github.com/TheCase/kubernetes-on-proxmox

https://github.com/dy2k/proxmox-kubernetes

https://stackoverflow.com/questions/55813994/install-and-create-a-kubernetes-cluster-on-lxc-proxmox

proxmox虚拟机中添加硬盘

proxmox虚拟机中添加外部硬盘

Proxmox VE 在线扩容磁盘分区

PVE的磁盘分区以及local-lvm空间

https://pve.proxmox.com/wiki/Storage:_LVM

Proxmox虚拟系统PVE的磁盘分区及文件系统分析总结

Proxmo VE(pve) 调整local 以及local-lvm空间

Proxmox VE (PVE6.x) 增加 或减小 local 目录的大小即扩容

reference

使用Proxmox搭建私有云平台有集群

proxmox集群

proxmox 笔记

Proxmox搞定gpu穿透3D设计

Proxmox VE的初试小探

攻克私有云通杀神器proxmox