core/hvm: do not start stubdom-dhcp when VM not connected to netvm (#697)

This commit is contained in:
Marek Marczykowski 2012-12-22 15:12:55 +01:00
parent 1d49bf9dc5
commit 0fefb7ce66
2 changed files with 3 additions and 1 deletions

View File

@ -36,4 +36,4 @@ on_reboot = 'destroy'
on_crash = 'destroy' on_crash = 'destroy'
# Use of DNS2 as DHCP server IP makes DNS2 not accessible, but DNS1 still should work # Use of DNS2 as DHCP server IP makes DNS2 not accessible, but DNS1 still should work
device_model_args = [ '-net', 'lwip,client_ip={ip},server_ip={dns2},dns={dns1},gw={gateway},netmask={netmask}' ] {disable_network}device_model_args = [ '-net', 'lwip,client_ip={ip},server_ip={dns2},dns={dns1},gw={gateway},netmask={netmask}' ]

View File

@ -923,6 +923,7 @@ class QubesVm(object):
if self.netvm.qid != 0: if self.netvm.qid != 0:
args['netdev'] += ",backend={0}".format(self.netvm.name) args['netdev'] += ",backend={0}".format(self.netvm.name)
args['netdev'] += "'" args['netdev'] += "'"
args['disable_network'] = '';
else: else:
args['ip'] = '' args['ip'] = ''
args['mac'] = '' args['mac'] = ''
@ -931,6 +932,7 @@ class QubesVm(object):
args['dns2'] = '' args['dns2'] = ''
args['netmask'] = '' args['netmask'] = ''
args['netdev'] = '' args['netdev'] = ''
args['disable_network'] = '#';
args['rootdev'] = self.get_rootdev(source_template=source_template) args['rootdev'] = self.get_rootdev(source_template=source_template)
args['privatedev'] = "'script:file:{dir}/private.img,xvdb,w',".format(dir=self.dir_path) args['privatedev'] = "'script:file:{dir}/private.img,xvdb,w',".format(dir=self.dir_path)
args['volatiledev'] = "'script:file:{dir}/volatile.img,xvdc,w',".format(dir=self.dir_path) args['volatiledev'] = "'script:file:{dir}/volatile.img,xvdc,w',".format(dir=self.dir_path)