Matthias Pfeifer wrote:
On Tue, 2 Feb 2010 15:10:24 +0100
Matthias Pfeifer <[email protected]> wrote:
Hello
On Tue, 02 Feb 2010 05:35:28 -0600
Vijay Sankar <[email protected]> wrote:
Matthias Pfeifer wrote:
Hello list
I am trying to get multiple qemu guests on
host machine running. Host and guests are running
openbsd 4.6 in sync with the patch brunch.
The Host IP is: 192.168.102.110
The guest should have: 192.168.102.111, 192.168.102.112 ..
and so on. All in the same network, using the same DNS server
and gateway.
I have read /usr/local/share/doc/qemu/README.OpenBSD
and tried the samples in the tap section. This works
fine for one host.
For example, this is working well for one host:
ifconfig tun0 link0
ifconfig bridge0 create
brconfig bridge0 add tun0 add rl0 up
qemu -net nic,macaddr=52:54:00:12:35:10 \
-net tap,fd=3 \
-name Host1 \
-no-fd-bootchk \
-hda Host1/system.img 3<>/dev/tun0
Then, I'd like to doing this:
ifconfig tun1 link0
ifconfig bridge1 create
brconfig bridge1 add tun1 add rl0 up
qemu -net nic,macaddr=52:54:00:12:35:11 \ ## MAC changed
-net tap,fd=4 \ ## fd changed
-name Host1 \
-no-fd-bootchk \
-hda Host2/system.img 4<>/dev/tun1 ## tun interface changed
But this fails. Is there a way to do something like this
without adding a real NIC?
Thanks in advance!
Matthias
NOTE: sudo calls closefrom(2). In order to have more than one fd passed
tap interface, a line to sudoers akin to:
Defaults closefrom_override
then calling sudo via 'sudo -C 5 -u $USER qemu ..' is required.
See sudoers(5) and sudo(8) for details.
--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: [email protected]
Sorry, this is what i mean :)
I have added "Defaults closefrom_override" to /etc/sudoers.
So i am using the tun0 for the second qemu host:
sudo sh -c " sudo -C 5 -u qemu qemu -net nic,macaddr=52:54:00:12:35:10 \
-net tap,fd=3 -name DSB -no-fd-bootchk -hda host1/system.img
3<>/dev/tun0"
Working fine. Then the second:
sudo sh -c " sudo -C 5 -u qemu qemu -net nic,macaddr=52:54:00:12:35:11 \
-net tap,fd=4 -no-fd-bootchk -hda host2/system.img 4<>/dev/tun0"
this gives me a " cannot create /dev/tun0: Device busy "
--
--------------------------------------------------------------
Matthias Pfeifer <[email protected]>
- Technik -
Finance Circle GmbH
Burgstrasse 3
31582 Nienburg / Weser
Tel. 05021-92196-25 // Fax. 05021-92196-99
HRB 106525 // AG Hamburg //USt.ID: de204840463
Geschdftsf|hrer: Axel Schwiersch
I was running three instances of Windows 2000 Server and one Windows
2003 server on a Dell 2900 -- two IIS servers, and two SQL Servers for
testing purposes a while ago. Here is some info on how I was doing it at
that time --
9:55AM up 106 days, 23:56, 6 users, load averages: 0.18, 0.17, 0.16
USER TTY FROM LOGIN@ IDLE WHAT
vsankar C0 - 21Sep09106days xinit /etc/X11/xinit/xinitrc
-- /usr/X11R6/bin/X :0 -auth /home/vsankar/.serverauth.21200
vsankar p0 :0.0 21Sep09106days qemu -net
nic,vlan=0,model=rtl8139,macaddr=AA:BB:CC:DD:EE:F1 -net tap,vlan=0 -m
448 -no-fd-bootchk -localtime -hda w2k3.img -nographic
vsankar p2 :0.0 21Sep09106days qemu -net
nic,vlan=0,model=rtl8139,macaddr=AA:BB:CC:DD:EE:F2 -net tap,vlan=0 -m
384 -no-fd-bootchk -localtime -hda w2k.img -nographic
vsankar p3 :0.0 21Sep09106days qemu -net
nic,vlan=0,model=rtl8139,macaddr=AA:BB:CC:DD:EE:F3 -net tap,vlan=0 -m
384 -localtime -no-fd-bootchk -nographic -hda appint.img
vsankar p4 :0.0 21Sep09106days qemu -net
nic,vlan=0,model=rtl8139,macaddr=AA:BB:CC:DD:EE:F4 -net tap,vlan=0 -m
384 -no-fd-bootchk -localtime -hda appext.img -nographic
Each vm guest was started with a command similar to the following:
sudo env ETHER=bnx1 qemu \
-net nic,vlan=0,model=rtl8139,macaddr=AA:BB:CC:DD:EE:XX \
-net tap,vlan=0 -m 384 -no-fd-bootchk -localtime \
-hda whatever.img -nographic
XX was F1, F2, F3, and F4 w2k3, w2k, appint and appext images respectively
I used nographic because it was easier to use rdesktop and rdp from
other systems to access the vm guests instead of being at the console.
hope this helps,
Vijay
--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: [email protected]