The TAP/TUN devices are used for connection to a HVM domain, but there
is no relationship between each name of the devices and its domain
ID. This patch assigns a HVM domain ID to each TAP/TUN device name.
Signed-off-by: MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp>
ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
(nics, mac, model))
ret.append("-net")
- ret.append("tap,vlan=%d,bridge=%s" % (nics, bridge))
+ ret.append("tap,vlan=%d,ifname=tap%d.%d,bridge=%s" %
+ (nics, self.vm.getDomid(), nics-1, bridge))
return ret