[virt-tools-list] renaming interface in host machine

dave knottnhupfer at gmail.com
Thu Nov 19 08:26:42 UTC 2009


Hi,

I would like to assign to each interface from a guest-machine a useful
name so that I can address that interface by name from the host
machine. The problem is right now I get names like vnetX, where X
represents the number of the interface created.
I asked around and I found something like mapping each interface on
the host machine to a tun-device and give a more significant name to
the tun-device.

My goal is to have a name like machine1-eth0, machine1-eth1, ...,
machine-10-eth0, ... so that I can connect them with bridges by hand
from the host machine.

I tried following command but it didn't change anything:
virt-install --name=ubuntu-test -r 256 -vcpus=1 -f
/media/virtualization/virtual_machines/kvm/ubuntu.img --vnc
--accelerate -v -c ../../images/ubuntu-8.04.3-server-i386.iso
--os-type=linux --os-variant=ubuntuhardy -net nic,ifname=tap1 -net
tap,ifname=tap1,script=/etc/kvm/kvm-ifup

of course I created a tap1 device

indepently how I try to setup the network at the beginning I always
get the following interface:
   <interface type='bridge'>
     <mac address='52:54:00:00:bc:a8'/>
     <source bridge='br0'/>
     <model type='virtio'/>
   </interface>

I checked the --network arguments but couldn't find something useful.
Any hint, idea how I can handle my problem. I tried really hard the
last 2 days but with no result :(

OS: Debian testing
Virstinst version: 0.500.0-2

thx in advance

david

-- 
"Zwei Dinge sind unendlich: das Universum und die menschliche
Dummheit; aber bei dem Universum bin ich mir noch nicht ganz sicher
(Albert Einstein)."




More information about the virt-tools-list mailing list