Bug 1044023

Summary: VMX file parser should support "transient" on disks
Product: [Community] Virtualization Tools Reporter: Wout Mertens <Wout.mertens>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, anande, eblake, Wout.mertens
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-17 23:53:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patches src/vmx/vmx.c, applies cleanly on 1.1.4 and current trunk
none
Actually functioning patch ;-) none

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>