core: adjust for updated stubdom support in libvirt

Fixes QubesOS/qubes-issues#1456
This commit is contained in:
Marek Marczykowski-Górecki 2015-11-27 00:09:11 +01:00
parent 2fdbf51ccc
commit f525a58134
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 11 additions and 7 deletions

View File

@ -1161,8 +1161,10 @@ class QubesVm(object):
args['dns2'] = self.secondary_dns
args['netmask'] = self.netmask
args['netdev'] = self._format_net_dev(self.ip, self.mac, self.netvm.name)
args['disable_network1'] = '';
args['disable_network2'] = '';
args['network_begin'] = ''
args['network_end'] = ''
args['no_network_begin'] = '<!--'
args['no_network_end'] = '-->'
else:
args['ip'] = ''
args['mac'] = ''
@ -1171,8 +1173,10 @@ class QubesVm(object):
args['dns2'] = ''
args['netmask'] = ''
args['netdev'] = ''
args['disable_network1'] = '<!--';
args['disable_network2'] = '-->';
args['network_begin'] = '<!--'
args['network_end'] = '-->'
args['no_network_begin'] = ''
args['no_network_end'] = ''
args.update(self.storage.get_config_params())
if hasattr(self, 'kernelopts'):
args['kernelopts'] = self.kernelopts

View File

@ -57,7 +57,7 @@ Requires: libvirt-python
%if x%{?backend_vmm} == xxen
Requires: xen-runtime
Requires: xen-hvm
Requires: libvirt-daemon-xen >= 1.2.12-3
Requires: libvirt-daemon-xen >= 1.2.20-4
%endif
Requires: createrepo
Requires: gnome-packagekit

View File

@ -9,7 +9,6 @@
<loader>hvmloader</loader>
<boot dev='cdrom'/>
<boot dev='hd'/>
{disable_network1}<cmdline>-net lwip,client_ip={ip},server_ip={dns2},dns={dns1},gw={gateway},netmask={netmask}</cmdline>{disable_network2}
</os>
<features>
<pae/>
@ -22,7 +21,8 @@
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator type='stubdom'/>
{no_network_begin}<emulator type='stubdom'/>{no_network_end}
{network_begin}<emulator type='stubdom' cmdline='-net lwip,client_ip={ip},server_ip={dns2},dns={dns1},gw={gateway},netmask={netmask}'/>{network_end}
{rootdev}
{privatedev}
{otherdevs}