1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

fix(instances): a new VM's existing volume or template is taken from the chosen pool

The create job looked volumes up by name in every active pool and took
the first match, so a volume of the same name in another pool could be
attached or copied in place of the chosen one. The form now sends each
existing volume as pool/volume and the template's pool, and the job
looks each up in its own pool.
This commit is contained in:
catborise 2026-11-08 14:33:10 +03:00
parent a1ed639999
commit ec6480ed66
7 changed files with 41 additions and 22 deletions

View file

@ -117,7 +117,8 @@ class NewVMForm(forms.Form):
net_model = forms.CharField(max_length=256, required=False)
storage = forms.CharField(max_length=256, required=False)
template = forms.CharField(max_length=256, required=False)
images = forms.CharField(max_length=256, required=False)
template_pool = forms.CharField(max_length=256, required=False)
images = forms.CharField(max_length=256, required=False) # existing volumes, each "pool/volume"
cache_mode = forms.CharField(max_length=16)
hdd_size = forms.IntegerField(min_value=1, required=False)
meta_prealloc = forms.BooleanField(required=False)