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

Is the filesystem writable?

A simple way to answer:

[ -w /path/to/xmlfile.xml ] && echo 'writable' || echo 'not writable'

If any component of the file path or the file itself limits access this will show 'not writable'

And your answer is: ?

1 Like

Any entries re ttyS0 in the boot log?