mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
002b7704ff
This is identical to type='bridge', but without the "connect to a bridge" part, so it can be handled by using the same functions (and often even the same cases in switch statements), after renaming virLXCProcessSetupInterfaceBridged() to virLXCProcessInterfaceTap() and enhancing it to skip bridge-related items when brname == NULL. To be truly useful, we need to support setting the ip address on the host side veth as well as guest side veth (already supported for type='bridge'), as well as setting the peer address for both. The <script> element (supported by type='ethernet' in qemu) isn't supported in this patch. An error is logged at domain start time if it is encountered. This may be changed in a later patch.
43 lines
1.3 KiB
XML
43 lines
1.3 KiB
XML
<domain type='lxc'>
|
|
<name>8675309</name>
|
|
<uuid>e21987a5-e98e-9c99-0e35-803e4d9ad1fe</uuid>
|
|
<memory unit='KiB'>1048576</memory>
|
|
<currentMemory unit='KiB'>1048576</currentMemory>
|
|
<vcpu placement='static'>1</vcpu>
|
|
<resource>
|
|
<partition>/machine</partition>
|
|
</resource>
|
|
<os>
|
|
<type arch='x86_64'>exe</type>
|
|
<init>/sbin/init</init>
|
|
</os>
|
|
<idmap>
|
|
<uid start='0' target='100000' count='100000'/>
|
|
<gid start='0' target='100000' count='100000'/>
|
|
</idmap>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>restart</on_crash>
|
|
<devices>
|
|
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
|
<filesystem type='mount' accessmode='passthrough'>
|
|
<source dir='/mach/8675309'/>
|
|
<target dir='/'/>
|
|
</filesystem>
|
|
<interface type='ethernet'>
|
|
<mac address='00:16:3e:0f:ef:8a'/>
|
|
<ip address='192.168.122.12' family='ipv4' prefix='24'/>
|
|
<ip address='192.168.122.13' family='ipv4' prefix='24'/>
|
|
<route family='ipv4' address='0.0.0.0' gateway='192.168.122.1'/>
|
|
<route family='ipv4' address='192.168.124.0' prefix='24' gateway='192.168.124.1'/>
|
|
<target dev='veth0'/>
|
|
<guest dev='eth2'/>
|
|
</interface>
|
|
<console type='pty'>
|
|
<target type='lxc' port='0'/>
|
|
</console>
|
|
</devices>
|
|
<seclabel type='none'/>
|
|
</domain>
|