
Me gustaría agregar un dispositivo serie (consola) a un invitado mediante el virsh attach-device
comando. Tengo un archivo console.xml que contiene:
<serial type="pty">
<target port="0"/>
</serial>
Y ejecuto el siguiente comando:
sudo virsh attach-device VMNAME console.xml
Pero aparece el siguiente error:
error: Failed to attach device from console.xml
error: XML error: unknown device type
Aquí está la información de mi versión:
Compiled against library: libvir 0.9.8
Using library: libvir 0.9.8
Using API: QEMU 0.9.8
Running hypervisor: QEMU 1.0.0
¿Qué estoy haciendo mal? ¿Cómo puedo agregar esto desde un script? ¡¡Cualquier ayuda sería apreciada!!
Gracias de antemano.
Respuesta1
Según la libvirtdocumentación, también necesitas unfuenteelemento. Algo como esto:
<serial type='pty'>
<source path='/dev/pts/3'/>
<target port='0'/>
</serial>