[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] The config of IP address for 'macvtap' network



On 05/15/2012 05:33 PM, Michal Privoznik wrote:
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?
Thank you very much for your reply!
I did try to add IP address like this, but seems it didn't work...

<network>
  <name>vdsm-testnet</name>
  <uuid>9b1b162c-3056-de63-6785-30b45abf24cf</uuid>
  <forward dev='eth0.6' mode='passthrough'>
    <interface dev='eth0.6'/>
  </forward>
  <ip address='192.168.123.1' netmask='255.255.255.0'>
  </ip>
</network>

or
...
...

  <ip address='192.168.123.1' netmask='255.255.255.0'/>
...



Michal

--
libvir-list mailing list
libvir-list redhat com
https://www.redhat.com/mailman/listinfo/libvir-list



--
Lei


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]