Dan Kenigsberg
2013-06-20 11:42:31 UTC
Hi List,
Like most of us, I've bought my actual computer with an Ethernet
interface card, that I can connect to a wall jack at will. It's quite
easy to disconnect the Ethernet cable from the wall, as well.
I would like to expose this behavior to virtual computers, too. Via
libvirt, of course. That's useful, since an admin may need to disconnect
a running VM from a network temporarily, without resorting to
hot-unplugging its nic.
How should the domxml represent this situation? An interface that is
connected to a specific LAN1 bridge is
<interface type='bridge'>
<source bridge='LAN1'>
<target dev='vnet1'/>
<model type='virtio'/>
</interface>
Would the following make sense for an interface with no bridge at the
source?
<interface type='bridge'>
<source/>
<target dev='vnet1'/>
<model type='virtio'/>
</interface>
And how about the recommended config for <interface>s, which is
type='network'? Would it make sense to predefine
<network>
<name>null-bridge-network</name>
<forward mode='bridge'>
<bridge/>
</network>
so that
<interface type='network'>
<source network='null-bridge-network'/>
</interface>
means "keep this interface dangling out there"?
Regards,
Dan.
Like most of us, I've bought my actual computer with an Ethernet
interface card, that I can connect to a wall jack at will. It's quite
easy to disconnect the Ethernet cable from the wall, as well.
I would like to expose this behavior to virtual computers, too. Via
libvirt, of course. That's useful, since an admin may need to disconnect
a running VM from a network temporarily, without resorting to
hot-unplugging its nic.
How should the domxml represent this situation? An interface that is
connected to a specific LAN1 bridge is
<interface type='bridge'>
<source bridge='LAN1'>
<target dev='vnet1'/>
<model type='virtio'/>
</interface>
Would the following make sense for an interface with no bridge at the
source?
<interface type='bridge'>
<source/>
<target dev='vnet1'/>
<model type='virtio'/>
</interface>
And how about the recommended config for <interface>s, which is
type='network'? Would it make sense to predefine
<network>
<name>null-bridge-network</name>
<forward mode='bridge'>
<bridge/>
</network>
so that
<interface type='network'>
<source network='null-bridge-network'/>
</interface>
means "keep this interface dangling out there"?
Regards,
Dan.