acrn-config: add 'tap_' perfix for virtio-net

UOS would be failed to get ip address, add 'tap_' perfix for virtio-net
name setting.

Tracked-On: #4255
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Wei Liu 2019-12-16 14:03:34 +08:00 committed by wenlingz
parent 6383394b89
commit 2342271348

View File

@ -60,7 +60,7 @@ def tap_uos_net(names, virt_io, vmid, config):
net_name = net net_name = net
if ',' in net: if ',' in net:
net_name = net.split(',')[0] net_name = net.split(',')[0]
print("tap_net {}".format(net_name), file=config) print("tap_net tap_{}".format(net_name), file=config)
print("#check if the vm is running or not", file=config) print("#check if the vm is running or not", file=config)
print("vm_ps=$(pgrep -a -f acrn-dm)", file=config) print("vm_ps=$(pgrep -a -f acrn-dm)", file=config)
@ -465,7 +465,7 @@ def virtio_args_set(dm, virt_io, vmid, config):
net_name = net net_name = net
if ',' in net: if ',' in net:
net_name = net.split(',')[0] net_name = net.split(',')[0]
print(" -s {},virtio-net,{} \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net{}".format(net)), net_name), file=config) print(" -s {},virtio-net,tap_{} \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net{}".format(net)), net_name), file=config)
# virtio-console set, the value type is a string # virtio-console set, the value type is a string
if virt_io['console'][vmid]: if virt_io['console'][vmid]: