Skip to content

Commit

Permalink
if nic type is default then make it virtio
Browse files Browse the repository at this point in the history
  • Loading branch information
catborise committed Feb 28, 2024
1 parent d8fe9c2 commit 765b759
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions appsettings/migrations/0011_alter_appsettings_id.py
Original file line number Diff line number Diff line change
@@ -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"
),
),
]
3 changes: 3 additions & 0 deletions instances/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 765b759

Please sign in to comment.