Each TAP/TUN device name for a HVM guest includes its domain ID.

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>
This commit is contained in:
Keir Fraser committed 2008-03-18 11:02:00 +00:00
1 parent 079d3b064f
commit 6dc8df55ea
1 file changed
+2 -1
+2 -1
View File
@@ -580,7 +580,8 @@ class HVMImageHandler(ImageHandler):
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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.