virsh attach-device für serielles Gerät

virsh attach-device für serielles Gerät

Ich möchte über den virsh attach-deviceBefehl ein serielles Gerät (Konsole) zu einem Gast hinzufügen. Ich habe eine Datei console.xml mit folgendem Inhalt:

<serial type="pty">
  <target port="0"/>
</serial>

Und ich führe den folgenden Befehl aus:

sudo virsh attach-device VMNAME console.xml

Es wird jedoch die folgende Fehlermeldung angezeigt:

error: Failed to attach device from console.xml
error: XML error: unknown device type

Hier sind meine Versionsinformationen:

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

Was mache ich falsch? Wie kann ich das aus einem Skript hinzufügen? Für jede Hilfe wäre ich dankbar!!

Dank im Voraus.

Antwort1

Laut der libvirtDokumentation, benötigen Sie außerdem eineQuelleElement. Etwa so:

<serial type='pty'>
  <source path='/dev/pts/3'/>
  <target port='0'/>
</serial>

verwandte Informationen