Bug 1044023 - VMX file parser should support "transient" on disks
Summary: VMX file parser should support "transient" on disks
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: All
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Blake
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 16:01 UTC by Wout Mertens
Modified: 2014-01-24 22:30 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-17 23:53:52 UTC
Embargoed:


Attachments (Terms of Use)
Patches src/vmx/vmx.c, applies cleanly on 1.1.4 and current trunk (2.21 KB, text/plain)
2013-12-17 16:01 UTC, Wout Mertens
no flags Details
Actually functioning patch ;-) (2.52 KB, patch)
2013-12-17 17:06 UTC, Wout Mertens
no flags Details | Diff

Description Wout Mertens 2013-12-17 16:01:13 UTC
Created attachment 837746 [details]
Patches src/vmx/vmx.c, applies cleanly on 1.1.4 and current trunk

Description of problem:
The domain xml format supports adding <transient /> on a disk. The .vmx file parser ignores this.
In my opinion, <transient /> should translate to 'mode="independent-nonpersistent'

Version-Release number of selected component (if applicable):
git trunk

How reproducible:
always

Steps to Reproduce:
1. Create VM from XML domain with <transient /> on the disk

Actual results:
2. Notice in the VMWare console that the disk is persistent

Expected results:
2. Notice in the VMWare console that the disk is independent-nonpersistent

Additional info:
I created a preliminary patch which I am attaching. Unfortunately it is untested as of yet, I have problems with my build environment.

Comment 1 Eric Blake 2013-12-17 16:10:44 UTC
Yes, this idea of porting to vmx was one of the ideas discussed back when <transient/> was first added to domain XML.  Thanks for tackling it!  Would you please also post your patch upstream to libvir-list, where it will get a wider review (developers tend to prefer patches present in email and where 'git am' can apply the patch with minimal effort, rather than having to dig through a couple URLs and manual application).

Comment 2 Wout Mertens 2013-12-17 17:06:51 UTC
Created attachment 837792 [details]
Actually functioning patch ;-)

Comment 3 Wout Mertens 2013-12-17 17:08:10 UTC
I was able to build and test. I had a spurious * on the mode_name definition so I updated the patch here and I sent it to libvir-list.
Thanks!

Comment 4 Eric Blake 2013-12-17 23:53:52 UTC
Next upstream release (1.2.1) will contain:

commit 5d7e4f0cf335235c09e4c2d797fe1cf870f5cba9
Author: Wout Mertens <Wout.Mertens>
Date:   Tue Dec 17 18:04:35 2013 +0100

    Support transient attribute on vmware disks
    
    vmx/vmx.c ignores the transient attribute on the disk xml format. This patch
    adds a 1-1 relationship between it and [disk].mode = "independent-nonpersistent".
    
    The other modes are ignored as before. It works in my testing.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1044023
    
    Signed-off-by: Eric Blake <eblake>


Note You need to log in before you can comment on or make changes to this bug.