mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add support for multiple serial ports into the Xen driver
this is the patch to add support for multiple serial ports to the libvirt Xen driver. It support both old style (serial = "pty") and new style (serial = [ "/dev/ttyS0", "/dev/ttyS1" ]) definition and tests for xml2sexpr, sexpr2xml and xmconfig have been added as well. Written and tested on RHEL-5 Xen dom0 and working as designed but the Xen version have to have patch for RHBZ #614004 but this patch is for upstream version of libvirt. Also, this patch is addressing issue described in RHBZ #670789. Signed-off-by: Michal Novotny <minovotn@redhat.com>
This commit is contained in:
committed by
Eric Blake
parent
79c3fe4d16
commit
3ee7cf6c9b
@@ -0,0 +1 @@
|
||||
(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8ff')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
|
||||
53
tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
Normal file
53
tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<domain type='xen' id='1'>
|
||||
<name>fvtest</name>
|
||||
<uuid>b5d70dd2-75cd-aca5-1776-9660b059d8ff</uuid>
|
||||
<memory>409600</memory>
|
||||
<currentMemory>409600</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/foo.img'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/boot.iso'/>
|
||||
<target dev='hdc' bus='ide'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:16:3e:1b:b1:47'/>
|
||||
<source bridge='xenbr0'/>
|
||||
<script path='vif-bridge'/>
|
||||
<target dev='vif1.0'/>
|
||||
</interface>
|
||||
<serial type='dev'>
|
||||
<source path='/dev/ttyS0'/>
|
||||
<target port='0'/>
|
||||
</serial>
|
||||
<serial type='dev'>
|
||||
<source path='/dev/ttyS1'/>
|
||||
<target port='1'/>
|
||||
</serial>
|
||||
<console type='dev'>
|
||||
<source path='/dev/ttyS0'/>
|
||||
<target type='serial' port='0'/>
|
||||
</console>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<graphics type='vnc' port='5901' autoport='no'/>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -0,0 +1 @@
|
||||
(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8ff')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
|
||||
49
tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
Normal file
49
tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<domain type='xen' id='1'>
|
||||
<name>fvtest</name>
|
||||
<uuid>b5d70dd2-75cd-aca5-1776-9660b059d8ff</uuid>
|
||||
<memory>409600</memory>
|
||||
<currentMemory>409600</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/foo.img'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/boot.iso'/>
|
||||
<target dev='hdc' bus='ide'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:16:3e:1b:b1:47'/>
|
||||
<source bridge='xenbr0'/>
|
||||
<script path='vif-bridge'/>
|
||||
<target dev='vif1.0'/>
|
||||
</interface>
|
||||
<serial type='dev'>
|
||||
<source path='/dev/ttyS1'/>
|
||||
<target port='1'/>
|
||||
</serial>
|
||||
<console type='dev'>
|
||||
<source path='/dev/ttyS1'/>
|
||||
<target type='serial' port='1'/>
|
||||
</console>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<graphics type='vnc' port='5901' autoport='no'/>
|
||||
</devices>
|
||||
</domain>
|
||||
Reference in New Issue
Block a user