Running "Windows Emulation" headless ... possible?

Per Hedeland per at hedeland.org
Fri Jun 1 21:55:27 UTC 2007


Bakul Shah <bakul at bitblocks.com> wrote:
>> >> >
>> >> > Yes.  But you have to make sure each machine gets its own mac
>> >> > address.
>> >> 
>> >> Is that addressed using the tap interface, as Scott mentioned?
>> >
>> >Yes.
>> 
>> Hm, maybe I misunderstand the question or the answer, but I disagree.:-)
>
>I interepreted "Is that addressed using the tap interface" to
>mean "Is that done (by) using the tap interface".  So I was not
>talking about mac address of the tap interface!

OK, I interpreted your response as saying that something was making sure
that something got its own mac address by using the tap interface, and
the only thing that fit was the mac address of the tap interface.:-)
Anyway the point is that the qemus don't get their own mac addresses
unless you give them to them.:-)

>Right. I use a shell function to create a macaddress based on
>directory of the image file.  Something like:
>
>macaddr() {
>	echo 52:54:0:$(echo $1|md5 |cut -c1-6|sed 's/\(..\)\(..\)/\1:\2:/')
>}

Nice! I've been assigning them manually (writing a dedicated little
start script for each image), but it gets old pretty quickly.

>> - I never give an IP address to the bridge interface - this is wrong(tm)
>>   IMHO, and in any case there should not be any need for it.
>
>I do, to simulate this:
>
>bridge0 --[       ]
>	   | | | |
>	   0 1 2 3 <- tap interfaces
>
>In effect tap0 .. tapN are to individual VMs and the host
>uses just bridge0 to talk to them all.  Also see below.

Yes, but you *don't* put the physical interface in the bridge, right?
Then the bridge interface should definitely have its own address - it's
your host's (single) interface on the bridged network. When the physical
interface is also added to the bridge, your host effectively has two
interfaces on the combined physical and bridge-tap network - there's no
point in both having addresses, and it may even cause problems.

>Bridging with the phys device won't work if your VMs are on a
>wifi connected laptop.

I saw that, not a problem for me though.

> For this reason I use NAT (and it is good enough for what I want).

It could work for me too, but it's nice to have the qemus getting their
IP addresses from the already existing DHCP server on the physical
network, as well as being able to log in to them directly from other
hosts on occasion.

--Per Hedeland


More information about the freebsd-emulation mailing list