launchers/kvm : chargement maxi-paresseux
This commit is contained in:
parent
1268015dee
commit
849f6de9bd
1 changed files with 2 additions and 2 deletions
|
@ -1,17 +1,17 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Retrieve the name of the monitor socket
|
||||
from subprocess import check_output
|
||||
from subprocess import CalledProcessError
|
||||
try:
|
||||
from subprocess import check_output
|
||||
socket = 'unix:%s,server,nowait' % (check_output(["sockpath"], text=True))
|
||||
except CalledProcessError as e:
|
||||
exit(e.returncode)
|
||||
|
||||
# Set number of vCPUs to use to the environment variable QEMUSH_NPROC or
|
||||
# half of total vCPUs installed if it fails
|
||||
from os import environ
|
||||
try:
|
||||
from os import environ
|
||||
nproc = environ['QEMUSH_NPROC']
|
||||
except KeyError:
|
||||
from multiprocessing import cpu_count
|
||||
|
|
Loading…
Reference in a new issue