haven’t had time for writing the test yet, since I’m trying to get an app out the door that uses libvirt for running “instant clones” of a VM.
When I create a new domain with a transient disk like this, the .vmx file and all supporting files will be stored in the same directory as the transient disk. One of the supporting files is the “nvram” file and you can only have one, which means you can only have one VM using the same disk, transient or otherwise :-( :-( :-(
The code that selects the location of the new .vmx file is vmwareVmxPath in src/vmware/vmware_conf.c and it picks the directory of the first disk
Workarounds I can think of:
- Augment the domain xml description so it also defines the storage pool on which the created domain should reside
- Change vmwareVmxPath so it uses a temporary directory on the first disk’s datastore if the first disk is transient
- Somehow encode the .vmx storage location in a device type that isn’t used by vmware.
The first way seems the cleanest but is probably also the most work and touches more code.
The second way seems hackish but makes sense when you think about it - the disk is transient so the vm definition should be, too. Sadly you can’t specify a different datastore then.
The third way is a bit of a middle ground but I wouldn’t know what device to use.
Help! :-(
Wout.
Hi Eric,
thank you very much for your assistance! I'll take a look at writing that test tomorrow.
Wout.