XenStorage add DisposableVm handling
This commit is contained in:
parent
989eab1d72
commit
1934f06869
@ -28,9 +28,9 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from qubes.qubes import (QubesAdminVm, QubesAppVm, QubesException, QubesHVm,
|
from qubes.qubes import (QubesAdminVm, QubesAppVm, QubesDisposableVm,
|
||||||
QubesNetVm, QubesProxyVm, QubesTemplateHVm,
|
QubesException, QubesHVm, QubesNetVm, QubesProxyVm,
|
||||||
QubesTemplateVm, defaults, vm_files)
|
QubesTemplateHVm, QubesTemplateVm, defaults, vm_files)
|
||||||
from qubes.storage import Pool, QubesVmStorage
|
from qubes.storage import Pool, QubesVmStorage
|
||||||
|
|
||||||
|
|
||||||
@ -322,6 +322,9 @@ class XenPool(Pool):
|
|||||||
subdir = 'vm-templates'
|
subdir = 'vm-templates'
|
||||||
elif vm_type in [QubesAdminVm, QubesNetVm, QubesProxyVm]:
|
elif vm_type in [QubesAdminVm, QubesNetVm, QubesProxyVm]:
|
||||||
subdir = 'servicevms'
|
subdir = 'servicevms'
|
||||||
|
elif vm_type is QubesDisposableVm:
|
||||||
|
subdir = 'appvms'
|
||||||
|
return os.path.join(pool_dir, subdir, vm.template.name + '-dvm')
|
||||||
else:
|
else:
|
||||||
raise QubesException(str(vm_type) + ' unknown vm type')
|
raise QubesException(str(vm_type) + ' unknown vm type')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user