03.11.2016 21:49, Vincent Bernat пишет:
>> ... but *is* in the status xml (i.e. the output of
"visrh dumpxml
>> $domain" while the domain is running, and also the xml provided on stdin
>> to the qemu and network hooks when they are called).
>> (also, what Vincent said in his email - names with the prefix "vnet"
are
>> assumed to be "leftover" from a previous instance of the domain (for
>> better or worse) an replaced with an autogenerated name. But if you
>> supply a name that doesn't start with "vnet", it will be used).
> Hmm. What right way to manualy create my vnet device (example privnet0)
> and apply it device for guest?
You can create it with tunctl.
create device by command
ip tuntap add dev privnet0 mode tap one_queue vnet_hdr
set it in guest xml by
<interface type='network'>
<mac address='52:54:00:e8:6d:19'/>
<source network='testnet'/>
<target dev='privnet0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03'
function='0x0'/>
</interface>
testnet is
<network>
<name>testnet</name>
<uuid>f31d8d1b-9ff4-8bf7-d8b6-e6bd8759a2f1</uuid>
<forward mode='bridge'/>
<bridge name='br0' />
</network>
guest start, privnet0 added to bridge br0 and set up.
work fine.
after guest is shutdown privnet0 is not removed from bridge br0 and
guest not started after.
What is wrong?