| Summary: | libguestfs ignores <readonly/> in libvirt XML | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Richard W.M. Jones <rjones> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | berrange, mbooth, virt-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-10-26 18:35:29 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Richard W.M. Jones
2011-10-19 11:34:05 UTC
I don't think there's any perfect answer here. You have a guest XML with 2 (or more) disks 1. Primary disk, read-write 2. Secondary disk, marked read-only Then, if you run guestfish --rw, there are two possible desirable outcomes a. Both disks opened read-write. b. Primary disk opened read-write, secondary disk read-only I think 'b' makes sense as the default, since that is honouring the guest definition, however, I could see a very occasional need to do 'a'. eg if the read-only disk, was in fact some shared HD that the guests normally share read-only, but you want to make some changes to now. Fixed upstream in libguestfs 1.13.26. ** Dan **: A useful feature for the libvirt test:/// XML would be the ability to start off a test domain in a state other than "running", ie. shut off. At the moment it's hard to create automated tests for this feature because libguestfs prevents you from trying to open a domain for write when it thinks it is running. See: http://git.annexia.org/?p=libguestfs.git;a=blob;f=regressions/test-add-domain.sh;hb=HEAD @rjones: while you can't make the test driver open with an existing shutoff domain, you can make it open with no existing domains, and then just use virDomainDefineXML to create yourself a shutoff guest. Use test:///path/to/node.xml - see examples/xml/test/testnode.xml for an example of syntax Sure, I realized that (or conversely: start with a running domain and call virDomainShutdown on it). However if you look at the test (comment 2) you'll see I'm not in a position to make libvirt API calls. It would be nice if it was directly available in the XML. |