1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

if nic type is default then make it virtio

This commit is contained in:
catborise 2024-02-28 08:16:44 +03:00
parent d8fe9c2f64
commit 765b759953
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,20 @@
# Generated by Django 4.2.10 on 2024-02-14 11:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("appsettings", "0010_auto_20231030_1305"),
]
operations = [
migrations.AlterField(
model_name="appsettings",
name="id",
field=models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
]

View file

@ -1853,6 +1853,9 @@ def create_instance(request, compute_id, arch, machine):
machine = "q35" machine = "q35"
firmware["secure"] = "yes" firmware["secure"] = "yes"
if data["net_model"] == "default":
data["net_model"] = "virtio"
uuid = util.randomUUID() uuid = util.randomUUID()
try: try:
conn.create_instance( conn.create_instance(