配置變更和重新啟動後 vcpu 計數沒有變化

配置變更和重新啟動後 vcpu 計數沒有變化

我最近將虛擬伺服器 Echobox1 使用的 vcpu 數量從 4 個減少到 1 個。

前:

# virsh vcpucount Echobox1
maximum      config         4
maximum      live           4
current      config         4
current      live           4

我使用以下命令重新啟動了該伺服器

virsh reboot Echobox1

然而即時 vcpucount 仍然顯示 4:

# virsh vcpucount Echobox1
maximum      config         1
maximum      live           4
current      config         1
current      live           4

重置即時 vcpucount 還需要什麼?我可以重新啟動整個虛擬伺服器,但我不想這樣做,因為我有多個其他系統在其下運行。

筆記:我無法在這台機器上使用 --live 選項。

# virsh setvcpus Echobox1 1 --live
error: unsupported configuration: failed to find appropriate hotpluggable vcpus to reach the desired target vcpu count

長話短說:

我該如何重置居住更改設定檔後的vcpucount?

答案1

這實際上比預想的要容易。若要重置即時 vcpu 計數,請關閉虛擬伺服器,然後啟動它。簡單地重新啟動它不會更新該即時計數。

# virsh shutdown Echobox1
# virsh start Echobox1

相關內容