Skip to content

Commit 3f23acb

Browse files
authored
Merge pull request retspen#638 from catborise/master
fix default nic type problem
2 parents d54d50d + 765b759 commit 3f23acb

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Generated by Django 4.2.10 on 2024-02-14 11:54
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("appsettings", "0010_auto_20231030_1305"),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name="appsettings",
15+
name="id",
16+
field=models.AutoField(
17+
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
18+
),
19+
),
20+
]

instances/templates/instances/settings_tab.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,9 @@ <h5 class="modal-title">{% trans "Edit Instance Network" %}</h5>
660660
<div class="clearfix"></div>
661661
</div>
662662
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="xmledit">
663-
<p>{% trans "If you need to edit XML please Power Off the instance" %}</p>
663+
{% if instance.status != 5 %}
664+
<p>{% trans "If you need to edit XML please Power Off the instance" %}</p>
665+
{% endif %}
664666
<form action="{% url 'instances:change_xml' instance.id %}" method="post" role="form" aria-label="Edit instance XML form">
665667
{% csrf_token %}
666668
<div class="col-sm-12" id="xmlheight">

instances/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,9 @@ def create_instance(request, compute_id, arch, machine):
18531853
machine = "q35"
18541854
firmware["secure"] = "yes"
18551855

1856+
if data["net_model"] == "default":
1857+
data["net_model"] = "virtio"
1858+
18561859
uuid = util.randomUUID()
18571860
try:
18581861
conn.create_instance(

webvirtcloud.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ create_user () {
197197
fi
198198

199199
usermod -a -G "$nginx_group" "$APP_USER"
200+
usermod -a -G libvirt "$nginx_group"
200201
}
201202

202203
run_as_app_user () {

0 commit comments

Comments
 (0)