Reading an .xva file

Aug 25, 2010 at 9:28 PM


I am trying to read an .xva file (XenApp Virtual Appliance).  My sample code (so far) looks like this:

var fileStream = File.OpenRead(xvaFile);
var vm = new VirtualMachine(fileStream);
var volumeManager = new VolumeManager();
foreach (var disk in vm.Disks)
foreach (var logicalVolume in volumeManager.GetLogicalVolumes())
    foreach (var fs in FileSystemManager.DetectDefaultFileSystems(logicalVolume))
        Console.WriteLine("Name: {0}  Description: {1}", fs.Name, fs.Description);

        // FAILS HERE...
        var discFileSystem = fs.Open(logicalVolume);

However at the indicated point [ DiscFileSystem.Open(VolumeInfo) ], the code fails with an IOException.  The exception message is "Corrupt record".

Any ideas?  Am I doing something wrong here?  It seems like it should work because the Console.WriteLine call prior shows the correct filesystem information.  Or is .xva just not supported?


Aug 26, 2010 at 6:47 AM

Your code looks right.  I haven't tried out the XVA code in a while - I suspect there's a bug in the XVA code.  I'll take a look.