Best Practices?


gtroyp

Recommended Posts

I have been running VM's for a while now, but only started with Windows VM's in spring of this year, and I do hate me some Windows issues. I have never seen such a persnickety OS out of the box.

 

So, I want to set up a fault-tolerant VM system. I am not very Windows savvy (Mac and Linux user normally), so that is where my weakness lies in trying to figure this out.

 

I want to set up a data drive where programs live and a separate system drive that I will have a "known-to-work" back up that gets updated once every quarter, and a working back-up done weekly. In a perfect world I would want the system drive to be replaceable with as little interruption as possible when I get another BSOD (there should be an acronym for that which is more descriptive of the anger it causes).

 

Or, if there is a better way, I'm open to suggestions.

 

I have two VM's and one of them goes BSOD with enough frequency to be really annoying, but the other (less used) VM has been relatively problem free in the meantime. They are set up the same, with only the vm-images being different. It's like chasing gremlins, and I hate that. I just want to box out the gremlins with the ability to trash the corrupted system drive and drop in a replacement and have to re-download and re-set-up every file in the system.

 

TIA.

Link to comment

Depending on which programs you use, you may not be able to get away with separating programs from the OS. Windows expects all programs to stay put on the OS drive, and only the user data get archived or moved around. For example, let's say you install MSOffice on a "D:" drive. Blow away the windows folder on C, and reinstall windows. Even though the executables are still on D, they won't run, because none of the OS registry files, system dll's, etc, got updated as they do when you install office.

 

Some programs are self contained, and can be transported and work the way you want. Some won't. Good luck getting windows to behave like you want. You'll probably be stuck working the way windows wants you to work, not the other way around.

Link to comment

You can easily install a program to any drive on windows, just look for the location option during the installation process, click on browse and direct pc to install it wherever you like. Programmes can be installed anywhere you like just windows convention sticks it in programme folder on os drive.

You can also use sym links to move already installed programmes

Link to comment

You can easily install a program to any drive on windows, just look for the location option during the installation process, click on browse and direct pc to install it wherever you like. Programmes can be installed anywhere you like just windows convention sticks it in programme folder on os drive.

You can also use sym links to move already installed programmes

Sure, but unless the program doesn't touch any system files or add .dll files to windows\system(32) then a clean windows install won't run the program any more, and you'll have to reinstall again. Most windows programs are not portable. There are great efforts made to FORCE windows programs to be portable, just google portable windows apps for examples.
Link to comment

You can easily install a program to any drive on windows, just look for the location option during the installation process, click on browse and direct pc to install it wherever you like. Programmes can be installed anywhere you like just windows convention sticks it in programme folder on os drive.

You can also use sym links to move already installed programmes

Sure, but unless the program doesn't touch any system files or add .dll files to windows\system(32) then a clean windows install won't run the program any more, and you'll have to reinstall again. Most windows programs are not portable. There are great efforts made to FORCE windows programs to be portable, just google portable windows apps for examples.

 

Yeah thats true. But i think he wants to be able to backup a small vdisk for the c drive and store programmes and data on the d drive. Then if his os drive becomes unstable he can replace the os drive with one of his os (c drive) vdisk backups.

I want to set up a data drive where programs live and a separate system drive that I will have a "known-to-work" back up that gets updated once every quarter, and a working back-up done weekly.

This way he can have a small vdisk backup of say 30 gigs, but have the majority of data on the second drive (vdisk) . This saves having to have a huge say 100 gig backup to get back where he was before the error. :)

Link to comment

This way he can have a small vdisk backup of say 30 gigs, but have the majority of data on the second drive (vdisk) . This saves having to have a huge say 100 gig backup to get back where he was before the error. :)

 

This is it exactly. But I gave up, I don't want to arse around with Windows, I just want to play games and surf the web on the thing.

 

So, now I will have a honking 150G cron job (once I figure out how to do that) to run on Monday mornings. But, if I didn't want to mess with this I could just buy a windows box. Yeah right  ;)

Link to comment

My solution to this (I also hate Windows but have 2 gaming VM's) is to use LVM which LimeTech have kindly included for a while now.

An example:

Set an unassigned drive as a LVM physical Volume and create a volume group.

Create a logical volume to host Windows (I also have a 2nd logical volume for SteamApps - although not all games are happy to sit outside their designated locations).

Periodically cron a job to make a snapshot of the logical volumes...

There are then several things you can do from this point (and all will work while the VM is running)...

1: Full image backup to unRAID - dd if=/dev/vgpool/Windows-Drive_snapshot of=/mnt/user/Windows-Drive-backup-$(date +%F).img bs=2048 status=progress

2: Backup files to a location - mkdir /mnt/temp && mount /dev/vgpool/Windows-Drive_snapshot /mnt/temp && rsync -avP --delete /mnt/temp /mnt/user/Windows-Drive && umount /mnt/temp

3: With a little creativity, incremental backups could be performed using compression and a combination of either method if needed

Finally, delete the snapshot!

 

You could also leave live snapshots in place and just remove older ones... but the more snapshots you have of a logical volume can impact performance (I use bcache to SSD cache my LVM physical volume- but its not for the faint hearted).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.