[virt-tools-list] renaming interface in host machine
dave
knottnhupfer at gmail.com
Fri Nov 20 01:46:09 UTC 2009
Chris, thank you soooo much ...
Finally I can continue my work :)
2009/11/19 Chris Lalancette <clalance at redhat.com>:
> On 11/19/2009 09:26 AM, dave wrote:
>> 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
>
> This won't do anything; virt-install is a separate program, so sending
> qemu arguments to it won't accomplish anything. In fact, I'm surprised
> it didn't blow up when you tried this (it should).
it didn't, don't know why either. Since it didn't blow up I thought
somehow it must work this way even there was no documentation about it
:(
>> 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>
>
> If you add <target dev='name'/> to that above piece of XML, you can get the
> behavior you desire. Note that 'name' *cannot* start with 'vnet', otherwise
> libvirt assumes that it is one of the auto-controlled network names. For
> more information, see: http://libvirt.org/formatdomain.html#elementsNICS
Thx again
/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