1
virsh edit xml changes are lost
Using 'virsh edit ' command I tried to edit the xml file for a specific guest . I wanted to add serial ttyS0 for the guest machine, but I found that after using virsh edit then inserted below lines just before '' keyword I saved the file using ':wq!' (vi editor style) and booted the guest again but there is no impact. Also the changes I made in the xml does nt stay , it is lost immediately , I am editing the file with root as the user.
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
</devices>
</domain>
'Devices' and 'console' were already present in the file at the last . I inserted the code before 'devices' as display above.