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 '<devices>' 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>