mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: virtio console support
Enable specifying a virtio console device with: <console type='pty'> <target type='virtio'/> </console>
This commit is contained in:
1
tests/qemuxml2argvdata/qemuxml2argv-console-virtio.args
Normal file
1
tests/qemuxml2argvdata/qemuxml2argv-console-virtio.args
Normal file
@@ -0,0 +1 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x2 -hda /dev/HostVG/QEMUGuest1 -chardev pty,id=console0 -device virtconsole,chardev=console0 -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
||||
27
tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
Normal file
27
tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory>219200</memory>
|
||||
<currentMemory>219200</currentMemory>
|
||||
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='ide' index='0'/>
|
||||
<console type='pty'>
|
||||
<target type='virtio'/>
|
||||
</console>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -355,6 +355,8 @@ mymain(int argc, char **argv)
|
||||
QEMUD_CMD_FLAG_NODEFCONFIG);
|
||||
DO_TEST("channel-virtio-auto", QEMUD_CMD_FLAG_DEVICE |
|
||||
QEMUD_CMD_FLAG_NODEFCONFIG);
|
||||
DO_TEST("console-virtio", QEMUD_CMD_FLAG_DEVICE |
|
||||
QEMUD_CMD_FLAG_NODEFCONFIG);
|
||||
|
||||
DO_TEST("watchdog", 0);
|
||||
DO_TEST("watchdog-device", QEMUD_CMD_FLAG_DEVICE |
|
||||
|
||||
29
tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
Normal file
29
tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory>219200</memory>
|
||||
<currentMemory>219200</currentMemory>
|
||||
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='ide' index='0'/>
|
||||
<controller type='virtio-serial' index='0'/>
|
||||
<console type='pty'>
|
||||
<target type='virtio' port='0'/>
|
||||
</console>
|
||||
<memballoon model='virtio'/>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -184,6 +184,7 @@ mymain(int argc, char **argv)
|
||||
DO_TEST_DIFFERENT("channel-virtio-auto");
|
||||
DO_TEST_DIFFERENT("console-compat-auto");
|
||||
DO_TEST_DIFFERENT("disk-scsi-device-auto");
|
||||
DO_TEST_DIFFERENT("console-virtio");
|
||||
|
||||
virCapabilitiesFree(driver.caps);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user