Pass network parameters to linux-stubdom

See QubesOS/qubes-issues#5022.
This commit is contained in:
Pawel Marczewski 2020-01-28 19:44:23 +01:00
parent 6a0b9bbe2e
commit 1d1cc10211
No known key found for this signature in database
GPG Key ID: DE42EE9B14F96465
2 changed files with 10 additions and 3 deletions

View File

@ -1439,7 +1439,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase):
<script path="vif-route-qubes" />
</interface>
<!-- server_ip is the address of stubdomain. It hosts it's own DNS server. -->
<emulator type="stubdom-linux" />
<emulator type="stubdom-linux" cmdline="-qubes-net:client_ip=10.137.0.1,dns_0=10.139.1.1,dns_1=10.139.1.2,gw=10.137.0.2,netmask=255.255.255.255" />
<input type="tablet" bus="usb"/>
<video>
<model type="vga"/>

View File

@ -166,13 +166,20 @@
{% else %}
type="stubdom"
{% endif %}
{% if vm.netvm and not
vm.features.check_with_template('linux-stubdom', True) %}
{% if vm.netvm %}
{% if vm.features.check_with_template('linux-stubdom', True) %}
cmdline="-qubes-net:client_ip={{ vm.ip -}}
,dns_0={{ vm.dns[0] -}}
,dns_1={{ vm.dns[1] -}}
,gw={{ vm.netvm.gateway -}}
,netmask={{ vm.netmask }}"
{% else %}
cmdline="-net lwip,client_ip={{ vm.ip -}}
,server_ip={{ vm.dns[1] -}}
,dns={{ vm.dns[0] -}}
,gw={{ vm.netvm.gateway -}}
,netmask={{ vm.netmask }}"
{% endif %}
{% endif %}
{% if vm.stubdom_mem %}
memory="{{ vm.stubdom_mem * 1024 -}}"