mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
if nic type is default then make it virtio
This commit is contained in:
parent
d8fe9c2f64
commit
765b759953
2 changed files with 23 additions and 0 deletions
20
appsettings/migrations/0011_alter_appsettings_id.py
Normal file
20
appsettings/migrations/0011_alter_appsettings_id.py
Normal 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"
|
||||
),
|
||||
),
|
||||
]
|
|
@ -1853,6 +1853,9 @@ def create_instance(request, compute_id, arch, machine):
|
|||
machine = "q35"
|
||||
firmware["secure"] = "yes"
|
||||
|
||||
if data["net_model"] == "default":
|
||||
data["net_model"] = "virtio"
|
||||
|
||||
uuid = util.randomUUID()
|
||||
try:
|
||||
conn.create_instance(
|
||||
|
|
Loading…
Reference in a new issue