I found the answer to this question:
1. create an XML file with a fake configuration (including a subnet not in use
elsewhere):
<network>
<name>fake</name>
<bridge name='virbr1' stp='on' delay='0' />
<ip address='192.168.0.1' netmask='255.255.0.0'></ip>
</network>
2. define the network: virsh net-define /path/to/fake.xml
3. autostart the network: virsh net-autostart fake
4. start the network now: virsh net-start fake
Once done, you can add this block of XML to your VM config with "virsh edit
<vm_name>":
<interface type='network'>
<mac address='aa:aa:aa:aa:aa:aa'/>
<source network='fake'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03'
function='0x0'/>
</interface>
Note that you should adjust the "slot" and "mac" arguments to avoid
conflicts.
Thanks,
Andrew
----- Original Message -----
From: "Andrew Martin" <amartin(a)xes-inc.com>
To: libvirt-users(a)redhat.com
Sent: Monday, December 30, 2013 11:25:29 AM
Subject: [libvirt-users] Fake Network Interface
Hello,
Is there a supported method for creating a fake network interface in a VM's
configuration file? I was using the below construct, however it is no longer
working for me in recent versions of libvirt (libvirt 1.0.2 with qemu-kvm
1.4.0). Is there a different, preferred method for creating a fake virtual
interface on the guest which does not exist on the host?
<interface type='network'>
<mac address='aa:aa:aa:aa:aa:aa'/>
<source network='fake'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03'
function='0x0'/>
</interface>
Thanks,
Andrew
_______________________________________________
libvirt-users mailing list
libvirt-users(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users