(KVM Qemu // 시스템)을 하이퍼 바이저로 사용하고 Libvirt를 인터페이스하여 온라인 가상 시스템에 더 많은 CPU 리소스를 추가하고 다시 시작하지 않고도 작업을 수행 할 수 있는지 알고 싶습니다.가상 머신에 cpu를 추가하고 재시작하지 않고도 동작시킬 수 있습니까?
더 많은 CPU를 추가 할 수 있지만 가상 시스템을 다시 시작해야 작동 할 수 있으므로 다시 시작하지 않고 작업을 수행 할 수있는 방법을 찾고 있습니다. 현재 사용하고있는 무슨
그러나, 당신은 손 전에 그것을 위해 게스트 XML을 준비해야, 지원 CPU가 요즘 핫 애드 할
from __future__ import print_function
import sys
import libvirt
domName = 'Fedora22-x86_64-1'
conn = libvirt.open('qemu:///system')
if conn == None:
print('Failed to open connection to qemu:///system', file=sys.stderr)
exit(1)
dom = conn.lookupName(domName)
if dom == None:
print('Failed to find the domain '+domName, file=sys.stderr)
exit(1)
dom.setVcpus(4)
conn.close()
exit(0)