mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
36785c7e77
The current code was a little bit odd. At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. This seems to me as a lot of code for nothing. This patch may look to be more complicated than original approach, but this is a preferred way to modify/add driver specific stuff only in those drivers and not deal with them in common parsing/formating functions. The update is to add those implicit input devices into config XML to follow the real HW configuration visible by guest OS. There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices for x86 architecture and they are available always, even without graphics device. This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
34 lines
1011 B
XML
34 lines
1011 B
XML
<domain type='xen'>
|
|
<name>XenGuest1</name>
|
|
<uuid>c7a5fdb0-cdaf-9455-926a-d65c16db1809</uuid>
|
|
<memory unit='KiB'>592896</memory>
|
|
<currentMemory unit='KiB'>403456</currentMemory>
|
|
<vcpu placement='static' current='2'>4</vcpu>
|
|
<bootloader>/usr/bin/pygrub</bootloader>
|
|
<os>
|
|
<type arch='i686' machine='xenpv'>linux</type>
|
|
</os>
|
|
<clock offset='utc' adjustment='reset'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>restart</on_crash>
|
|
<devices>
|
|
<disk type='block' device='disk'>
|
|
<driver name='phy'/>
|
|
<source dev='/dev/HostVG/XenGuest1'/>
|
|
<target dev='xvda' bus='xen'/>
|
|
</disk>
|
|
<interface type='bridge'>
|
|
<mac address='00:16:3e:66:94:9c'/>
|
|
<source bridge='br0'/>
|
|
<script path='vif-bridge'/>
|
|
</interface>
|
|
<console type='pty'>
|
|
<target type='xen' port='0'/>
|
|
</console>
|
|
<input type='mouse' bus='xen'/>
|
|
<input type='keyboard' bus='xen'/>
|
|
<memballoon model='xen'/>
|
|
</devices>
|
|
</domain>
|