QEMU multicast socket support v4 (UML mcast compatible)
PATCH 1/1 QEMU multicast socket support v4 (UML mcast compatible)
Hi!
Attached patch (against qemu CVS 2005-12-10) adds multicast support for QEMU socket transport, ie: run several stateless possibly non-local QEMUs on same virtual ethernet "BUS".
User-mode-linux (UML) compatible (tested).
An excerpt from qemu-doc.texi:
`-net socket[,vlan=n][,fd=h][,mcast=maddr:port]'
Create a VLAN n shared with another QEMU virtual machines using a UDP multicast socket, effectively making a bus for every QEMU with same multicast address maddr and port. NOTES:
1. Several QEMU can be running on different hosts and share same bus (assuming correct multicast setup for these hosts).
2. mcast support is compatible with User Mode Linux (argument `ethN=mcast'), see http://user-mode-linux.sf.net.
Example:
# launch one QEMU instance qemu linux.img -net nic,macaddr=52:54:00:12:34:56 -net socket,mcast=230.0.0.1:1234 # launch another QEMU instance on same "bus" qemu linux.img -net nic,macaddr=52:54:00:12:34:57 -net socket,mcast=230.0.0.1:1234 # launch yet another QEMU instance on same "bus" qemu linux.img -net nic,macaddr=52:54:00:12:34:58 -net socket,mcast=230.0.0.1:1234 Example (User Mode Linux compat.): # launch QEMU instance (note mcast address selected is UML's default) qemu linux.img -net nic,macaddr=52:54:00:12:34:56 -net socket,mcast=239.192.168.1:1102 # launch UML /path/to/linux ubd0=/path/to/root_fs eth0=mcast
Available under GPLv2 from
http://www.irrigacion.gov.ar/juanjo/qemu/
Changes
-------
v4 (2005-12-12):
* Tested mcast user-mode-linux compatibility
* Minor tweaks
v3 (2005-12-07):
* correctly close fds if any socket syscall fails (ie. close'em don't leak'em ;)
v2 (2005-12-07):
* 1st public release
EnjoY
Signature · 5 lines
--Juanjo # Juan Jose Ciarlante (JuanJo) jjo ;at; mendoza.gov.ar # # GnuPG Public Key: gpg --keyserver wwwkeys.eu.pgp.net --recv-key 66727177 # # Key fingerprint: 0D2F 3E5D 8B5C 729E 0560 F453 A3F7 E249 6672 7177 #
README.qemu-mcast new file +56 -0
@@ -0,0 +1,56 @@ +QEMU multicast support +====================== +Author: JuanJo Ciarlante jjo()um.edu.ar, juanjosec()gmail.com +Date: Mon Dec 12 12:38:11 ART 2005 +Keywords: qemu, socket, multicast, UDP, mcast, UML + +Attached patch (against qemu CVS 2005-12-10) adds multicast support for +QEMU socket transport, ie: run several stateless possibly non-local QEMUs +on same virtual ethernet "BUS". +User-mode-linux (UML) compatible (tested). + +An excerpt from qemu-doc.texi: + + `-net socket[,vlan=n][,fd=h][,mcast=maddr:port]' + Create a VLAN n shared with another QEMU virtual machines using + a UDP multicast socket, effectively making a bus for every QEMU + with same multicast address maddr and port. NOTES: + 1. Several QEMU can be running on different hosts and share same + bus (assuming correct multicast setup for these hosts). + 2. mcast support is compatible with User Mode Linux (argument + `ethN=mcast'), see http://user-mode-linux.sf.net. + Example: + # launch one QEMU instance + qemu linux.img -net nic,macaddr=52:54:00:12:34:56 -net socket,mcast=230.0.0.1:1234 + # launch another QEMU instance on same "bus" + qemu linux.img -net nic,macaddr=52:54:00:12:34:57 -net socket,mcast=230.0.0.1:1234 + # launch yet another QEMU instance on same "bus" + qemu linux.img -net nic,macaddr=52:54:00:12:34:58 -net socket,mcast=230.0.0.1:1234 + Example (User Mode Linux compat.): + # launch QEMU instance (note mcast address selected is UML's default) + qemu linux.img -net nic,macaddr=52:54:00:12:34:56 -net socket,mcast=239.192.168.1:1102 + # launch UML + /path/to/linux ubd0=/path/to/root_fs eth0=mcast + +Available under GPLv2 from + http://www.irrigacion.gov.ar/juanjo/qemu/ + + +Changes +------- +v4 (2005-12-12): + * Tested mcast user-mode-linux compatibility + * Minor tweaks + +v3 (2005-12-07): + * correctly close fds if any socket syscall fails (ie. close'em don't leak'em ;) + +v2 (2005-12-07): + * 1st public release + + +--Juanjo + +# Juan Jose Ciarlante (JuanJo) jjo ;at; mendoza.gov.ar # +# GnuPG Public Key: gpg --keyserver wwwkeys.eu.pgp.net --recv-key 66727177 # +# Key fingerprint: 0D2F 3E5D 8B5C 729E 0560 F453 A3F7 E249 6672 7177 #
qemu-doc.texi +35 -0
@@ -293,6 +293,41 @@ qemu linux.img -net nic,macaddr=52:54:00 qemu linux.img -net nic,macaddr=52:54:00:12:34:57 -net socket,connect=127.0.0.1:1234 @end example +@item -net socket[,vlan=n][,fd=h][,mcast=maddr:port] + +Create a VLAN @var{n} shared with another QEMU virtual +machines using a UDP multicast socket, effectively making a bus for +every QEMU with same multicast address @var{maddr} and @var{port}. +NOTES: +@enumerate +@item +Several QEMU can be running on different hosts and share same bus (assuming +correct multicast setup for these hosts). +@item +mcast support is compatible with User Mode Linux (argument @option{eth@var{N}=mcast}), see +@url{user-mode-linux.sf.net}. +@end enumerate + + +Example: +@example +# launch one QEMU instance +qemu linux.img -net nic,macaddr=52:54:00:12:34:56 -net socket,mcast=230.0.0.1:1234 +# launch another QEMU instance on same "bus" +qemu linux.img -net nic,macaddr=52:54:00:12:34:57 -net socket,mcast=230.0.0.1:1234 +# launch yet another QEMU instance on same "bus" +qemu linux.img -net nic,macaddr=52:54:00:12:34:58 -net socket,mcast=230.0.0.1:1234 +@end example + +Example (User Mode Linux compat.): +@example +# launch QEMU instance (note mcast address selected is UML's default) +qemu linux.img -net nic,macaddr=52:54:00:12:34:56 -net socket,mcast=239.192.168.1:1102 +# launch UML +/path/to/linux ubd0=/path/to/root_fs eth0=mcast +@end example + + @item -net none Indicate that no network devices should be configured. It is used to override the default configuration which is activated if no
vl.c +93 -2
133 lines not on this page · raw message