月份: 2021 年 3 月

How to make Windows VM guest recognize and run on more than 2 cores under KVM

Windows guests do not recognize all of the available cores under KVM and will usually detect only 2 cores. This happens since KVM exposes the available virtual CPU cores as physical CPUs (sockets). So, if the physical host running KVM has 2 CPUs with 4 cores each (a total of 8 cores), and the guest is configured for 8 CPUs, Windows will see 8 physical CPUs and will run only on 2, due to the hard coded limits in some of the editions of Windows Server.

To make Windows use all available cores, we need to configure the guest to expose the CPUs as cores and not as physical CPUs (sockets):

In virt-manager:

  1. Open the guest configuration screen
  2. Select Processor options tab
  3. Expand the “Topology” setting
  4. Set the sockets to 2
  5. Set the cores to 4 (for the guest to have a total of 8 cores) or 3 (for the guest to have a total of 6 cores).
  6. You can also expand the “Configration” settings and click on “copy host CPU configuration” to make the guest fully use all of the physical host’s CPU capabilities.

If you run the guest from command line, the KVM option for setting the CPU topology is: -smp 8,socket=2,cores=4

Gmail 的 IMAP、SMTP、POP3 各項 port 及安全性協定

內送郵件 (POP) 伺服器pop.gmail.com需要安全資料傳輸層 (SSL):是通訊埠:995
外寄郵件 (SMTP) 伺服器smtp.gmail.com需要安全資料傳輸層 (SSL):是需要傳輸層安全性 (TLS):是 (如果可用)需要驗證:是傳輸層安全標準 (TLS)/STARTTLS 通訊埠:587。
伺服器逾時大於 1 分鐘 (建議設定 5 分鐘)
Incoming Mail (IMAP) Serverimap.gmail.com
Requires SSL: Yes
Port: 993
Outgoing Mail (SMTP) Serversmtp.gmail.com
Requires SSL: Yes
Requires TLS: Yes (if available)
Requires Authentication: Yes
Port for SSL: 465
Port for TLS/STARTTLS: 587