Virsh edit xml changes are lost


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Virsh edit xml changes are lost
# 1  
Old 04-09-2019
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.



Code:
`<serial type='pty'>`

	`<target port='0'/>`

`</serial>`

`<console type='pty'>`

`<target type='serial' port='0'/>`

`</console>`
</devices>

</domain>

# 2  
Old 04-09-2019
Is the filesystem writable?
# 3  
Old 04-09-2019
A simple way to answer:

Code:
[ -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: ?
This User Gave Thanks to jim mcnamara For This Post:
# 4  
Old 04-10-2019
Any entries re ttyS0 in the boot log?
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting a single xml file into multiple xml files

Hi, I'm having a xml file with multiple xml header. so i want to split the file into multiple files. Sample.xml consists multiple headers so how can we split these multiple headers into multiple files in unix. eg : <?xml version="1.0" encoding="UTF-8"?> <ml:individual... (3 Replies)
Discussion started by: Narendra921631
3 Replies

2. Shell Programming and Scripting

Shell Command to compare two xml lines while ignoring xml tags

I've got two different files and want to compare them. File 1 : HTML Code: <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Discussion started by: Shaishav Shah
1 Replies

3. Shell Programming and Scripting

Plus edit and edit header

Dear Masters, i have a problem with unix script, till now i just know about how to create header. i want to change file below -63395.2 72653.5 -63361.3 72696.0 ... (9 Replies)
Discussion started by: ipatah
9 Replies

4. Shell Programming and Scripting

How to add the multiple lines of xml tags before a particular xml tag in a file

Hi All, I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me. <A>testing_Location</A> <value>LA</value> <zone>US</zone> <B>Region</B> <value>Russia</value> <zone>Washington</zone> <C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies

5. Shell Programming and Scripting

shellscripting to edit xml file

I have an xml file where every line which has the word CDATA in it follows this pattern (line number) <word1><!]></>I need only these lines editing so that the end result is that (line number) <word1><!]></word1>so it copies the first bit to the end. Anyone know how I can do this I am... (10 Replies)
Discussion started by: legolad
10 Replies

6. Shell Programming and Scripting

Loop through text file > Copy Folder > Edit XML files in bulk?

I have a text file which contains lines in this format - it contains 105 lines in total, but I'm just putting 4 here to keep it short: 58571,east_ppl_ppla_por 58788,east_pcy_hd_por 58704,east_pcy_ga_por 58697,east_pcy_pcybs_por It's called id_key.txt I have a sample folder called... (9 Replies)
Discussion started by: biscuitcreek
9 Replies

7. Shell Programming and Scripting

How to remove xml namespace from xml file using shell script?

I have an xml file: <AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Table1> <Data1 10 </Data1> <Data2 20 </Data2> <Data3 40 </Data3> <Table1> </AutoData> and I have to remove the portion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" only. I tried using sed... (10 Replies)
Discussion started by: Gary1978
10 Replies

8. Filesystems, Disks and Memory

Lost Data Lost Admin

First time so excuse my ignorance please. I may not be accurately describing the issue. I have inherited a small lab mostly SUN V120s. We lost power and are trying to recover. Nope no backups... The primary issue I have is 1 box is an Oracle Server. It has 2 36Gb harddrives. I am able to... (3 Replies)
Discussion started by: murphsr
3 Replies
Login or Register to Ask a Question