差異處

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

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:pvetips [2024/01/12 11:07] – [移除 cluster 內的一個 node] 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]] 
行 12: 行 13:
 </cli> </cli>
  
-==== 讓 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 版本]] 
- 
-==== PVE ISO 安裝無法啟動 XWindow 的解決方式 ==== 
-  * 參考 - https://forum.proxmox.com/threads/generic-solution-when-install-gets-framebuffer-mode-fails.111577/ 
-  * 對於比較新的硬體可能 ISO 內還未支援 X driver, 所以會出現中斷在以下的訊息, 無法進入 GUI 安裝畫面<cli> 
-Starting the installer GUI - see tty2 (CTRL-ALT-F2) for any errors... 
-</cli>按下 (CRTL-ALT-F2) 出現以下類似的錯誤訊息<cli> 
-: 
-(EE) 
-Fatal server error: 
-(EE) Cannot run in framebuffer mode. Please spacify busIDs  
-(EE) 
-: 
-</cli> 
-  * 切回 Console 畫面編輯 X Driver config file 
-    * 先以 lspci | grep -i vga 來確認 vga pci 編號<cli> 
-root@TN1-PVE-103:~# lspci | grep -i vga 
-00:02.0 VGA compatible controller: Intel Corporation Device a780 (rev 04) 
-</cli> 
-    * 編輯 config 檔案 Exp. /usr/share/X11/xorg.conf.d/my-vga.conf <file> 
-Section "Device" 
-    Identifier "Card0" 
-    Driver "fbdev" 
-    BusID "pci0:00:02:0:" 
-EndSection 
-</file> 
-  * 重啟 XWindows <cli> 
-xinit -- -dpi 96 >/dev/tty2 2>&1 
-</cli> 
 ===== PVE 主機安裝 snmpd ===== ===== PVE 主機安裝 snmpd =====
   * 安裝與設定程序<cli>   * 安裝與設定程序<cli>
行 70: 行 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
行 82: 行 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>
行 693: 行 671:
 rc-update add qemu-guest-agent rc-update add qemu-guest-agent
 rc-service qemu-guest-agent restart rc-service qemu-guest-agent restart
 +</cli>
 +    * Freebsd <cli>
 +pkg install qemu-guest-agent
 +sysrc qemu_guest_agent_enable="YES"
 +service qemu-guest-agent start
 </cli> </cli>
     * Windows VM      * Windows VM 
行 705: 行 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 密碼重設方式 =====
行 741: 行 748:
   * 原則上 Disk Cache 使用預設 none 模式即可(Host Page Cache:disabled, Disk Write Cache:enabled)  \\ {{:tech:20231018-0557.png|}}   * 原則上 Disk Cache 使用預設 none 模式即可(Host Page Cache:disabled, Disk Write Cache:enabled)  \\ {{:tech:20231018-0557.png|}}
   * 也可調整為 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 的妥協做法 =====
 +  * [[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 的做法 ======
 +  * 參考 - 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 .. 
 +  * 所以可透過 [[https://tteck.github.io/Proxmox/|tteck]] 提供的 Proxmox VE Kernel Clean 工具將 kernel 5.x 全部清除 <cli>
 +bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/kernel-clean.sh)"
 +</cli>
 +
 +==== PVE ISO 安裝無法啟動 XWindow 的解決方式 ====
 +  * 參考 - https://forum.proxmox.com/threads/generic-solution-when-install-gets-framebuffer-mode-fails.111577/
 +  * 對於比較新的硬體可能 ISO 內還未支援 X driver, 所以會出現中斷在以下的訊息, 無法進入 GUI 安裝畫面<cli>
 +Starting the installer GUI - see tty2 (CTRL-ALT-F2) for any errors...
 +</cli>按下 (CRTL-ALT-F2) 出現以下類似的錯誤訊息<cli>
 +:
 +(EE)
 +Fatal server error:
 +(EE) Cannot run in framebuffer mode. Please spacify busIDs 
 +(EE)
 +:
 +</cli>
 +  * 切回 Console 畫面編輯 X Driver config file
 +    * 先以 lspci | grep -i vga 來確認 vga pci 編號<cli>
 +root@TN1-PVE-103:~# lspci | grep -i vga
 +00:02.0 VGA compatible controller: Intel Corporation Device a780 (rev 04)
 +</cli>
 +    * 編輯 config 檔案 Exp. /usr/share/X11/xorg.conf.d/my-vga.conf <file>
 +Section "Device"
 +    Identifier "Card0"
 +    Driver "fbdev"
 +    BusID "pci0:00:02:0:"
 +EndSection
 +</file>
 +  * 重啟 XWindows <cli>
 +xinit -- -dpi 96 >/dev/tty2 2>&1
 +</cli>
 +
 ===== 相關頁面 ===== ===== 相關頁面 =====
 {{topic>pve}} {{topic>pve}}
  
 {{tag>pve tips cloudos 虛擬化 opensource}} {{tag>pve tips cloudos 虛擬化 opensource}}
  • tech/pvetips.1705028862.txt.gz
  • 上一次變更: 2024/01/12 11:07
  • jonathan