找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1785|回复: 3

[虚拟机相关] pve 8.0使用记事

[复制链接]
发表于 2023-6-30 22:16 | 显示全部楼层 |阅读模式
1.安装系统
选择zfs(raid0) (不一定跟我选的一样,可以按喜好更改)
有usb网卡的,在第一次开机启动前拔出。
2.第一次启动
修改安装源
  1. $ nano /etc/apt/sources.list
  2. #deb http://ftp.debian.org/debian bookworm main contrib

  3. #deb http://ftp.debian.org/debian bookworm-updates main contrib

  4. # security updates
  5. #deb http://security.debian.org bookworm-security main contrib
  6. # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
  7. deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
  8. # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

  9. deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
  10. # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

  11. deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
  12. # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

  13. deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
  14. # # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

  15. #deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  16. # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
复制代码
  1. $ nano /etc/apt/sources.list.d/pve-enterprise.list
  2. deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bookworm pve-no-subscription
  3. #deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
复制代码
  1. $ nano /etc/apt/sources.list.d/ceph.list
  2. #deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise #这里我直接禁用了ceph源
复制代码
  1. $ apt update  #(可选)apt upgarde
  2. $ reboot
复制代码
3.配置网络
此时有usb网卡的同学可以插上了
转到数据中心--服务器--系统--网络--创建--linux bridge

将物理网卡名称填在桥接端口内,创建完后重启
重启后查看/etc/network/interfaces,如果不想固定host的ip可以改成这样
  1. auto vmbr0
  2. iface vmbr0 inet <font color="#ff0000">dhcp</font>
  3.         #address #你的静态地址
  4.         #gateway #你的网关
  5.         bridge-ports #你的网卡名
  6.         bridge-stp off
  7.         bridge-fd 0

  8. auto vmbr1
  9. iface vmbr1 inet <font color="#ff0000">dhcp</font>
  10.         bridge-ports #你的网卡名
  11.         bridge-stp off
  12.         bridge-fd 0
复制代码
如果要让pve自动获取ipv6地址,在/etc/sysctl.conf中添加以下内容
  1. net.ipv6.conf.all.accept_ra=2
  2. net.ipv6.conf.all.autoconf=1
  3. net.ipv6.conf.default.accept_ra=2
  4. net.ipv6.conf.default.autoconf=1

  5. #这里的vmbr0换成你的网桥名,如果有多个则添加多个
  6. net.ipv6.conf.vmbr0.autoconf=1
  7. net.ipv6.conf.vmbr0.accept_ra=2

  8. #如果要求pve使用临时地址
  9. net.ipv6.conf.all.use_tempaddr=2
  10. net.ipv6.conf.default.use_tempaddr=2

  11. #应用设置
  12. $ sysctl -p
  13. $ reboot
复制代码
配置防火墙
数据中心--防火墙--是

节点--防火墙--选项--是

4.新建虚拟机
节点--local--ISO镜像--上传

右上角创建虚拟机
资源池可以自己新建用于虚拟机的分类,可以理解为一个虚拟机文件夹。
选择操作系统--使用ISO镜像文件,然后选择刚刚上传的镜像文件。
机型q35比i440fx新。
如果host的硬盘是ssd那么可以选择ssd方阵,丢弃指可以回收磁盘资源。
cpu类别推荐选host。
内存ballooning可以在根据虚拟机的实际需要在[最小内存,内存]之间调整大小,此项功能需要在虚拟机上安装额外软件才能支持。
网络选择一个网桥即可。
5.去除nag,显示温度、省电等


https://www.right.com.cn/forum/f ... wthread&tid=6754687
https://www.right.com.cn/forum/f ... wthread&tid=8231970

大功告成!


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
发表于 2023-7-1 22:42 | 显示全部楼层
爱看百合的读者

点评

就是喜欢~  详情 回复 发表于 2023-7-2 18:19
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-7-2 18:19 | 显示全部楼层
kupord 发表于 2023-7-1 22:42
爱看百合的读者

就是喜欢~
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2023-7-2 20:13 | 显示全部楼层
此贴必须收藏。
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-7-9 05:14

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com

快速回复 返回顶部 返回列表