One possible use for virtual machines for Trainzers.

JonMyrlennBailey

Active member
I am working on an experiment right now. I am creating a Windows 7 virtual machine (VM) for the purpose of testing newly-created CDP files. I have just recently discovered that it is possible for these to become corrupt somehow, probably during the process of creating the CDP. Some of us even back up our Surveyor work on CDP. Others here are more sophisticated than I am and use other methods for backing up train sim work.

Here is how the VM might work to VERIFY that a CDP save is good, not faulty.

I plan to install TS12 on the VM, not to run trains in sessions of course (native Trainz installs on physical non-gaming-grade computers (eg. your home office machine) are low-performance for gaming as it is and we all know how things often get even slower in virtualization), but to use the "virtual" CM therein to see whether a newly-created CDP (a backup of my route) will import error-free. If it proves to be a bad file, it simply can be created again and re-tested. I would create a CDP of my train route on the physical hardware (the host PC) with CM open, copy this newly-created to an external hard drive (one the VM is allowed to share) and import it in to the "virtual" Trainz to how how it came out.

Yes, I am going to try virtualization to give me peace of mind that my Trainz back ups are indeed reliable.

I will report back to see how this goes.

Of course, you could always test a newly-created CDP on another physical PC w/ TS installed for verification, but that is not as convenient to do.


Why not just simply test a backup CDP in the same CM that created it on your physical computer Trainz is already installed and running on, you ask?

Well, if you were to import a CDP into CM and the CDP content has the same KUID and/or content name (such as "Dave's Trainz Route") as what is already listed in CM, the import will overwrite
any such pre-existing content and we don't ever want to do that in case the CDP should prove faulty. You will lose your work for good! I tend to save increments of an edited/developed route in a sequence of CDPs
without renaming the route or saving a new session. The KUID, route name and any associated Sessions continue to remain the same. Only the CDP filenames (backup increments of the given route in progress) get different (descriptive) names to avoid confusion. I might have a route called "Jon's Trainz Route". I might just complete building Hoover Dam in this route and filename the CDP increment "Jon's Trainz Route - Hoover Dam Completed" . A week later I might add the Golden Gate Bridge to my route and then filename that CDP backup "Jon's Trainz Route - Golden Gate Bridge Completed". I tell Windows Explorer to sort these CDP files by date modified so the latest CDP increment is always on top.

In short, the virtual Trainz keeps things separated from the physical Trainz for safety's sake for backup data testing purposes.

Please stay tuned to my same bat Trainz thread on these same bat Trainz forums!
 
Last edited:
I plan to install TS12 on the VM, not to run trains in sessions of course (native Trainz installs on physical non-gaming-grade computers (eg. your home office machine) are low-performance for gaming as it is and we all know how things often get even slower in virtualization), but to use the "virtual" CM therein to see whether a newly-created CDP (a backup of my route) will import error-free.
That is the craziest idea I have heard in a long time. You have a system that is obviously flaky, creating corruptions that no-one else is experiencing. So you want to 'fix' it by adding a whole new level of complexity, both in terms of the OS and the procedures required to do the copying. That is exactly contrary to standard, proven troubleshooting techniques. You should be removing levels of complexity, so that you can narrow the problem down to a specific case and identify the cause. Adding new complexity just makes additional problems more likely and helps to hide the real source of your errors.

Seems to me that you are trying to prove that you can break Trainz if you try hard enough, rather than creating protocols and procedures that protect your data. While it might be interesting to follow your adventures, it will be an instruction of what not to do rather than any useful guide to an effective backup strategy.
 
Running another instance of Trainz in a virtual environment is not going to break anything. I am not geeky enough to troubleshoot CDP corruption causes. The VM does not fix anything. It only is intended to conveniently test things. When I get a flat tire on my car and find a screw in the tread area, I pull the screw out and plug the hole. I don't try to analyze how the screw got there. If a CDP fails the virtualization platform test, it simply gets discarded, redone and re-verified. This is done so nothing in my REAL Trainz (natively installed) gets busted. If my REAL Trainz DOES get busted, it gets reinstalled and hopefully my CDP backup work can be plugged right back into OK.

Please bear in mind that I replaced my hard drive on my PC not long ago. I went from a 500 GB Seagate to a 1 TB Western Digital. I have also recently done other things to my Windows 7 to keep Microsoft from spying on it through telemetry-related Windows updates. That action caused Windows startup issues but those are now ironed out.

It is possible that new hard drive may have had a bad sector or two on it. I should run CHKDSK on it for the first time soon.
 
Last edited:
I can tell you one thing, loading a bunch of CDP's into Trainz on a VM is a hellishly slow process. I have to get in all my locally-modified stuff, route dependencies, first before a test import a CDP route dependent upon all that crap.
 
I build routes in Trainz ... I "Save As" my routes in Trainz ... I run Trainz ... the CM works flawlessly on my ancient Toshiba Satellite 105 laptop

If it ain't broke ... don't try to fix it
 
Well, I have not been so lucky. Sometimes broken things have to be replaced altogether. That is why CDP was invented. I just have to be damn sure that CDP files are not ruined while not pulling my hair out trying to figure out why they got ruined in the first place. Fortunately for me, corrupt CDP files have been a very rare occasion in my experience. Incidentally, my VM experiment worked. I was successfully able to import a CDP route into it which proved error-free. The VM seems to be a good tool to verify the INTEGRITY of a CDP save without messing with TS natively installed. CM, even in a virtual machine platform state, will clearly indicate whether imported content is faulty.
 
Last edited:
CDP was made to replace EXE witch is what Trainz 1.0 to 1.2 had. Other than a bad download now and then I have never had a bad CDP in 15 years!
 
Yeah what Whitepass says, besides the only other time you'll see a corrupt CDP is if you make one that's way too big. There's a maximum limit of the file size, which to be safely away from keep well below 500 MB.

If you want to check your CDP, why not setup another TS12 install on your computer?

You can simply copy your current install to another folder-name. Copy TS12, or whatever you called it to TS12-TEST.

You can now import your CDP file from your working installation into your TS12-TEST install.

We have done this for years with great success and your method of using VM's though noble, is a bit over engineered. There are somethings, Jon which really do need the principals of KISS applied.
 
Thanks, John. I have been out of the Trainz Forum net for quite a spell now.

I didn't know I could have two separate installations of TS on the same physical PC without any interference between them. I will definitely try that out.
 
Thanks, John. I have been out of the Trainz Forum net for quite a spell now.

I didn't know I could have two separate installations of TS on the same physical PC without any interference between them. I will definitely try that out.



You may have interference between them with Content Manager. For example, if you have file associations set for type .cdp files, and you download a file, the CM for whatever the file association points to will handle the installation.
 
You may have interference between them with Content Manager. For example, if you have file associations set for type .cdp files, and you download a file, the CM for whatever the file association points to will handle the installation.

Only if you don't download using Content manager. ;)

Got around 5 installs here and never had a problem but I don't click cdps or use the website. I either use Content manager / Manage Content in TANE to download or import for cdps from elsewhere.

Shane Turner has or did have a program on his website that will switch the file association between versions which may be easier for non geeks than changing file associations manually.
 
Having 2 or more installations of Trainz on a single PC will fill up your disc space by 2x, or more, and having multiple installations of the same version on 1 PC will also confuse the heck out of you

I see a BSOD, HD Crash, and total corruption of Trainz, in your near future, if you keep insisting on over-complicating, and messing with things, that are truly not broken in the first place
 
There is no problem with running multiple Trainz versions on the same computer. I have Tane SP1, SP2, TS12, TS12 SP1, TS10, 2006 and 2004.
They all work happily together and I can move assets between them with no problems.
Cheers,
Mike
 
It seems as Trainz installs are self-contained as there are no complex ties with the Windows registry and DLL as there are with other types of complex software as Microsoft Office Suite, for example. The TS folder as installed in N3V in Program Files x86 by default is totally transportable. There is a Trainz icon within the folder that will execute Trainz with a double click.

Of course if I am using this second Trainz program folder as a test-bed, I will have to update this with any new route-dependencies content that I created in the working Trainz install so when I do my test route CDP import, there will be no warning about missing content. The sole purpose of the test-bed is to ensure a CDP will import flawlessly considering the countless hours of editing that goes into route building. Remember the days of cassette ROM BASIC? We would save a program on tape then VERIFY it afterward to ensure there was no data corruption. Storing BASIC programs on cassette tape was very sporadic: very hit and miss. Checksum error and baud rate notifications were common on my Radio Shack Tandy TRS-80 III Microcomputer of the early 1980's. The same principle applies with my testing install of Trainz. Verification of saved work for back up to ensure data integrity is preserved.

You can't ever trust or put anything past computers! They like the HAL-9000 are never infallible.

Thanks once again, John, I copied that TEST TS12 folder right onto my Windows desktop. I did a test CDP import and it worked error-free. :D
 
Last edited:
I have a HUGE 1 TB hard drive! Even with TWO TS12 installations now on that same HDD, the disk is still only about 30% full. One of the two TS12 folders is only about 15-16 GB size-wise. I have about 665 GB on my drive to spare. Not much disk real estate consumption to worry about. The test-bed folder (second TS folder) is labeled differently and in a different location (my desktop) to avoid any confusion. There is no reason both TS installations need to be open at the same time anyway.

The working installation of Trainz will be closed while any newly-created CDP is being tested in the other installation. At times I will have to reinstall Trainz and/or Windows. I will then rely upon (hopefully GOOD) CDP files in two different backup locations (both cloud backup subscription and external HDD) to put all my locally-created/modified/DLS stuff back into Trainz following any Trainz reinstall.
 
Last edited:
Back
Top