差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:pvetips [2024/04/11 11:12] – [清除舊版 kernel 的做法] jonathantech:pvetips [2025/04/11 15:28] (目前版本) – [Proxmox VE(PVE) 安裝相關紀錄] jonathan
行 1: 行 1:
 ====== Proxmox VE(PVE) 安裝相關紀錄 ====== ====== Proxmox VE(PVE) 安裝相關紀錄 ======
 +  * 版本資訊(Roadmap) - https://pve.proxmox.com/wiki/Roadmap
 ===== 更改 Package Repositories ===== ===== 更改 Package Repositories =====
   * [[https://pve.proxmox.com/wiki/Package_Repositories]]    * [[https://pve.proxmox.com/wiki/Package_Repositories]] 
行 40: 行 41:
 #  use tls #  use tls
 smtp_use_tls=yes smtp_use_tls=yes
 +
 +# MailU Setting
 +#relayhost = [mail.mailu.com]:465
 +#smtp_tls_security_level = encrypt
 +#smtp_tls_wrappermode = yes
 +
 # use sasl when authenticating to foreign SMTP servers # use sasl when authenticating to foreign SMTP servers
 smtp_sasl_auth_enable = yes smtp_sasl_auth_enable = yes
行 52: 行 59:
   - 編輯 /etc/postfix/sasl_passwd <file>   - 編輯 /etc/postfix/sasl_passwd <file>
 [smtp.gmail.com]:587  username:password [smtp.gmail.com]:587  username:password
 +#[mail.mailu.com]:465  username:password
 </file> </file>
   - 更改檔案權限 <cli>   - 更改檔案權限 <cli>
行 680: 行 688:
      
   * 參考網址 - https://pve.proxmox.com/wiki/Qemu-guest-agent   * 參考網址 - https://pve.proxmox.com/wiki/Qemu-guest-agent
 +
 +===== 解決 VM 時間無法和 Host 同步問題 =====
 +  * 主要發生在 Alpine VM 內的系統時間無法和 PVE 主機時間相同的議題
 +  * 解決方案 : 在 vmid.conf 內加入 args: -rtc clock=vm,base=utc 來解決 Exp. /etc/pve/qemu-server/111.conf <file>
 +agent: 1
 +args: -rtc clock=vm,base=utc
 +boot: order=scsi0;ide2;net0
 +cores: 2
 +cpu: x86-64-v2-AES
 +ide2: none,media=cdrom
 +memory: 2048
 +meta: creation-qemu=8.1.2,ctime=1702131932
 +name: pve-rproxy-internet
 +net0: virtio=BC:24:11:8F:41:CE,bridge=vmbr0,firewall=1
 +numa: 0
 +onboot: 1
 +ostype: l26
 +scsi0: ssd-zfs:vm-111-disk-0,iothread=1,size=32G
 +scsihw: virtio-scsi-single
 +smbios1: uuid=595b1cc9-fbf0-4c16-a580-401bee86ac25
 +sockets: 1
 +tags: service
 +vmgenid: 58a2ec03-e357-4aa9-8567-9e58ec447890
 +</file>
  
 ===== CT 忘記 root 密碼重設方式 ===== ===== CT 忘記 root 密碼重設方式 =====
行 717: 行 749:
   * 也可調整為 writeback 模式後(Host Page Cache:enabled, Disk Write Cache:enabled), 進入 VM 內使用 wget -qO- bench.sh | bash 進行效能測試來比對調整後的結果 \\ {{:tech:20231018-0605.png|}}   * 也可調整為 writeback 模式後(Host Page Cache:enabled, Disk Write Cache:enabled), 進入 VM 內使用 wget -qO- bench.sh | bash 進行效能測試來比對調整後的結果 \\ {{:tech:20231018-0605.png|}}
  
 +===== Move Disk 出現 timeout 議題 =====
 +  * 參考 - https://forum.proxmox.com/threads/how-do-you-move-large-disk.117633/
 +  * 當 VM Hard Disk 透過 Disk Action -> Move Storage 到 NFS 的 Storage Exp. pvs-253-nfs 結果等 60 秒出現 timed out 類似以下的訊息<cli>
 +create full clone of drive scsi0 (zfs-raid:vm-106-disk-0)
 +Formatting '/mnt/pve/pbs-253-nfs/images/106/vm-106-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=536870912000 lazy_refcounts=off refcount_bits=16
 +TASK ERROR: storage migration failed: unable to create image: 'storage-pbs-253-nfs'-locked command timed out - aborting
 +</cli> 
 +  * 主要的原因就是 pve-253-nfs 這 Storage 速度太慢, 無法在 60 秒內建立出 500G 的磁碟空間(preallocation).. 所以可以設定對這 storage 不要 preallocation, 作法如下<cli>
 +pvesm set pbs-253-nfs --preallocation off
 +</cli>這樣針對 pbs-253-nfs 這 storage 就不會在搬移前進行 preallocation.
  
-==== 讓 PVE 6 安裝 CentOS7 的 CT 移轉至 PVE 7 的妥協做法 ====+===== 讓 PVE 6 安裝 CentOS7 的 CT 移轉至 PVE 7 的妥協做法 =====
   * [[https://www.ichiayi.com/tech/pve6_and_pve7#%E8%AE%93_pve_6_%E5%85%A7%E7%9A%84_centos7_%E7%9A%84_ct_%E7%A7%BB%E8%BD%89%E8%87%B3_pve_7_%E7%9A%84%E5%A6%A5%E5%8D%94%E5%81%9A%E6%B3%95| 在 PVE 7 的主機 kernel option 加上 systemd.unified_cgroup_hierarchy=0 來改變使用之前 CGroup 版本]]   * [[https://www.ichiayi.com/tech/pve6_and_pve7#%E8%AE%93_pve_6_%E5%85%A7%E7%9A%84_centos7_%E7%9A%84_ct_%E7%A7%BB%E8%BD%89%E8%87%B3_pve_7_%E7%9A%84%E5%A6%A5%E5%8D%94%E5%81%9A%E6%B3%95| 在 PVE 7 的主機 kernel option 加上 systemd.unified_cgroup_hierarchy=0 來改變使用之前 CGroup 版本]]
  
-==== 清除舊版 kernel 的做法 =====+===== 清除舊版 kernel 的做法 ======
   * 參考 - https://forum.proxmox.com/threads/proper-way-to-remove-old-kernels-from-pve-8-0-4-which-are-safe-to-remove.131644/   * 參考 - https://forum.proxmox.com/threads/proper-way-to-remove-old-kernels-from-pve-8-0-4-which-are-safe-to-remove.131644/
   * 雖然每次升級後透過 apt autoremove 會自動移除掉不需要的舊版 kernel 但仍然會殘留一些不需要的 kernel 版本在系統內.. Exp. pve-kernel-5.4: 6.4-12 ..    * 雖然每次升級後透過 apt autoremove 會自動移除掉不需要的舊版 kernel 但仍然會殘留一些不需要的 kernel 版本在系統內.. Exp. pve-kernel-5.4: 6.4-12 .. 
  • tech/pvetips.1712805134.txt.gz
  • 上一次變更: 2024/04/11 11:12
  • jonathan