[libvirt] The config of IP address for 'macvtap' network
Michal Privoznik
mprivozn at redhat.com
Tue May 15 09:33:06 UTC 2012
On 15.05.2012 10:57, Lei Li wrote:
> Hi guys,
>
> I know the macvtap network is supported by libvirt as forward mode
> 'passthrough', I wonder is there anyway to configure the IP address
> for its interface?
>
> For example, If I create a network as below:
>
> <network>
> <name>vdsm-testnet</name>
> <uuid>31f6b3b3-e959-0dd1-ad3a-bf95db660415</uuid>
> <forward dev='eth0.8' mode='passthrough'>
> <interface dev='eth0.8'/>
> </forward>
> </network>
>
> For now, I have to set the IP address by 'ifconfig eth0.8 XXX.XXX.XXX.XXX'
> after defining the network.
>
> How can I set IP address for this VLAN device 'eth0.8' by libvirt, I mean
> does libvirt support to assign IP address in this mode now? If does,
> what is the
> xml format for it?
>
> It'd appreciate a lot if anybody could read my post and give me some
> suggestions!
>
>
I suppose adding:
<ip address='192.168.123.1' netmask='255.255.255.0'/>
into <network/> should work, doesn't it?
Michal
More information about the libvir-list
mailing list