2

I am faced with a Windows hardware/software problem left over from another person. It's on me to resolve. It's a mission critical setup. The situation is:

I've got a physical server machine with:

-Disk C:\ (one disk) containing a basic install of Windows Server 2008 R2, formerly Win Vista Pro, now gone.

-Disk D:\ (software Raid) containing a VirtualBox disk image of a configured Windows Server 2008 R2 running SQL Server R2 among others.

What shall I do now?

  • Migrate all the stuff from the configured VM to the basic but
    natively installed C:\ Windows Server 2008 R2 (with the possibility
    of breaking stuff)? Or,

  • Setting up the machine to "natively boot" the VM with the help of bcdedit.exe (something I've read about, what I've never done, what I don't know of if it works, if it hits performance, or if it is stable for production)

For me, being old skool, I am in the process of de-virtualising everything (option 1). But I'd be happy if someone suggests I am ok to go down the "natively boot" route.

Bart De Vos
  • 17,761
  • 6
  • 62
  • 81
isync
  • 703
  • 2
  • 8
  • 20
  • What is the problem? You've described the basic architecture, but what are you trying to solve? – Martijn Heemels Nov 28 '11 at 00:08
  • 3
    "being old skool" is bad, plain and simple. The world changes, change with it or become irrelevant. I know that's harsh, but the world is. Virtualization might add complexity, but also vast degrees of flexibility and possibilities. There's really only a few niche areas where virtualization's benefits don't easily outweigh it's drawbacks. – Chris S Nov 28 '11 at 00:14
  • 1
    I believe in "bare metal" for servers, that's why I'd like to "devirtualise" (random crashes also convince me that this VirtualBox VM is running but not stable).Is running a server in a VM on a Win7 or so host *really* the contemporary gospel?? – isync Nov 28 '11 at 00:41
  • 3
    @isync what the heck does `"I believe in bare metal"` mean? Our job as SAs isn't to go on gut feeling. Everything that we do can be quantified, tested, and refined. We're not professional horse betters or sports gamblers. Gut feeling has no place in our industry. If you have legitimate reasons to go to bare metal, then that's fine, but "believing" in something isn't nearly enough of a justification. – MDMarra Nov 28 '11 at 01:01
  • Touché, MarkM, you've got a point there. – isync Nov 28 '11 at 01:12

4 Answers4

8

"I am in the process of de-virtualising everything" - really? o_O why?

FWIW of your two suggested approaches, I'd migrate it but I'd be more than a little bit wary of this approach personally.

Your question is a little unclear: does the VM run now as it is? Unless you're having an actual problem other than being wary of virtualisation, my real suggestion is to actually leave it where it is, virtualised.

update to address comments

Ok, to address your comments, if the server is critical and currently running then I'd suggest borrowing "first do no harm" from the medical community. What I mean by that is that if you wish to change how this server is hosted at all, you should place the results of any migration onto a new server, so that the current server will be available as much as possible while you work on the new one, and so that anything you do cannot 'damage' the current service to your users. This approach will also allow you to take the time and do things right.

If you can't get the budget to do this with a critical system then you may have just found the reason why your predecessor made what appear to be a few very questionable choices...

As for the suitability of virtualisation, I'd say that your predecessor was barking mad to run a mission critical system in a virtualbox install on a workstation OS, but that doesn't mean that there's anything wrong with virtualisation per se. This is not really worse than running critical servers on old workstations "because that's all we had around at the time" and I think we've all seen that happen.

I'm running most (about 60 servers) of our production servers on eight VMWare ESXi servers and our development/testing environments on 3 Microsoft HyperV boxes - these are both free 'server quality' virtualisation products (though you do pay for the fancy tools to manage a datacentre full of them) and I've never had unplanned downtime from either of them. Both of these also have tools that allow you to migrate/import currently running servers so this could make a migration very simple

So given what you've described, I'd suggest:

  1. Migrating the server to new hardware regardless of whether you choose to look at virtualisation with the 'right' tools or stay 'bare metal'.
  2. Consider one of the "server quality" virtualisation tools, to hopefully take advantage of their migration/import tools to painlessly migrate away from the current, flawed, system.
Rob Moir
  • 31,664
  • 6
  • 58
  • 86
  • 1
    Random crashes when the host was running Win Vista Pro, but as such the Server 2008 R2 VM does run. Only two days since I've changed the host OS to Server 2008 R2, no idea if this setup is now running more stable. – isync Nov 28 '11 at 00:45
  • @isync - updated my answer to respond to your comments. – Rob Moir Nov 28 '11 at 08:39
  • Thank you Rob for taking the time for an in-depth answer, suggesting a path of action and giving a glipse into how others are using these tools. Thumbs up! – isync Nov 28 '11 at 20:20
  • 2
    One idea, perhaps, would be to use the Windows Server Backup Utility on the current VM that you have. I believe (someone correct me if I'm wrong) you can use these backups to restore a windows server on top of a freshly installed version. In that case, install the Hyper-V role, make a new windows Server VM, and then restore from the backup you made. – Safado Nov 28 '11 at 20:55
  • I can see why he's hesitant about using Virtual Box for server virtualization. I do, however, appreciate that he's at least not running it on a Vista machine anymore. I don't think the argument is about the virtues of visualization, but more about how is current setup is _unreliable_ and therefore, I am upvoting MDMarras answer. Stay virtualized, but for goodness sake, go with Hyper-V, not virtualbox. – Get-HomeByFiveOClock Jul 10 '14 at 14:47
7

VirtualBox is almost certainly the wrong tool for server virtualization, but that doesnt mean that you shouldn't virtualize. If you have a Standard 2008R2 license, it allows for one host and one guest install. If it's Enterprise, you get 4 guests.

Also, since you have 2008 R2, you have free access to the Hyper-V Server role. Hyper-V is an excellent solution that won't cost you any additional money. Unless you have a compelling reason to V2P your infrastructure, your "old skool" ways are going against the grain.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • As I understand it, you say virtualisation is okay, just that my predecessor opted for VirtualBox is the problem. VM, even for a server, with a proper tool is okay, right? – isync Nov 28 '11 at 00:43
  • 2
    @user411189 Using virtualization on servers is commonplace, even for small shops. VMWare ESX(i), Hyper-V, Xen, and KVM are all **major** players in the server virtualization game. By going Virtual to Physical, you're taking a big step in the wrong direction. Yes, VirtualBox is trash, generally speaking. It has a place in testing environments, but doesn't really belong on production servers. That doesn't mean that you should discount other solutions. – MDMarra Nov 28 '11 at 00:48
  • OK. Now, that I don't care about if it's a VM or not - what would you suggest? I've got 2 vdi disks and one VHD connected to this VM. Can I get a proper virtualisation tool for free? Or do I already have it with Server 2008? (Sorry for being a *nix centric, Microsoft world noob) – isync Nov 28 '11 at 01:05
  • 1
    Hyper-V Server is free and included as a role in Windows Server 2008 R2. You can either download the standalone Hyper-V server or use the role on your existing 2008 R2 install. I suggest doing the latter, since it has GUI tools. It'll be easier for you to get started on. – MDMarra Nov 28 '11 at 01:16
  • I would not use hyper-v on a virtualbox VHD, I have yet to get that to work properly – Jim B Nov 28 '11 at 02:10
  • 1
    @JimB I wouldn't either. I didn't mean to imply that the OP should either. It should be backed up and restored to a Hyper-V-native VHD, or converted with the proper tools. I believe that SCVMM can do this, among other things. – MDMarra Nov 28 '11 at 02:12
  • @MarkM for V2V with SCVMM I think only vmware is supported. You can try P2V with SCVMM on a virtualox machine but I've always had issues migrating virtualbox. BTW I agree that virtualbox is junk but I'm amazed at how often I see it. – Jim B Nov 28 '11 at 02:25
  • virtualbox makes me want to cry, but as you guys say it pops up more than you'd think and its what the OP's stuck with as their starting point. – Rob Moir Nov 28 '11 at 11:09
4

You cannot native boot a virtualbox image using bcdedit (you can set a VHD to native boot but not all images) I'm not sure why you would want to "devirtualize" everything unless "old school" is somehow synonymous with "scared". In short the whole "de-virtualize" idea isn't a good one.

If you really want to migrate this the best option I can think of is to power up the VM, use the Microsoft deployment toolkit to capture the image and redeploy that image to another machine (or the parent machine).

EDIT:

If crashes are the issue on the VM and not the server, chances are the Hypervisor is to blame (without more details on the crashes of course). I would add the hyper-v role to the parent 2008R2 server, after capturing the image with MDT ,and then (in order of preference)

  1. rebuild the troublesome VM and migrate the data
  2. use the MDT to try deploying to the Hyper-v VM
Jim B
  • 23,938
  • 4
  • 35
  • 58
  • "You cannot native boot a virtualbox image using bcdedit" – isync Nov 28 '11 at 00:46
  • "cannot native boot a virtualbox image" thanks for that ess. info, as I've got 2 vdi and 1 vhd connected to this VM. I'd like to have the server run on bare metal for stability. I had random crashes on the system, 1st idea was: 'a server OS in a VM on a WinVistaPro host? Strange, let's get rid of that' Changed the host to WinServer8R2 to prepare for migration, then learned about 'native boot' which might save me the migration. Here you gave me a second essential info "MS deployment tk", which might save me from migration as it seems to be able to V2P the VM onto the current host more easily. – isync Nov 28 '11 at 00:58
  • 2
    I don't think crashing is a valid reason to stop using VMs, it's certainly a reason to look into other hypervisors – Jim B Nov 28 '11 at 02:18
  • \@JimB's edit: I couldn't track down the crashes, but it was more the parent, as the whole system rebooted. Or the VM crashing the hypervisor so hard that it took down the host with it. – isync Nov 28 '11 at 20:11
  • In a normal hypervisor situation it shouldn't be possible to crash the parent hypervisor from a guest. If there are other programs or services running on the host machine, that might be the casue of your instability. I think that a change to hyper-v would certainly be warranted (so long as the host isn't running other applications) – Jim B Nov 29 '11 at 13:50
1

For people seeing this post (and not checking the date just wanting some help om something similar.)

heres what i would do, on the basic install (or the os on the real drive not the image) i would run a utility called driverbackup! (thats what its called on sourceforge) back up all the drivers, AND make sure you tick the restore file generation option.

THEN i would make sure the virtual system is off, a VHD file would be most apropriate, it u cannot get a vhd, i.e your using vmdk or the image was in a backup file say easeus PBP format, they have converter options, vmware has an option, i think virtualbox has an internal option, but i cannot remember what its called.

easeus todo backup has a backup image converter, to vmdk or vhd, if you use this app, select the vhd format, name and save somewhere.

then look up how to restore drivers to an offline image on microsoft technet site, look for your desired version, ie vista, 7, 2008,08 r2, 2012, 12 r2, 8, 8.1 etc.

the drivers you backed up HAVE to match the architecture of the os your gonna restore them to. ie X86 to X86, X64 to X64, IA64 to IA64 etc. (implying the virtual os was the same architecture, not the user is stupid etc)

follow the microsoft instructions to restore the drivers.

now once you have that completed, mount the VHD using diskmgmt.msc (click attach vhd) go find your file, once you do that click open/accept/etc

use your favorite tool to backup the drive image (as if it was a physical one) store the image on a seperate medium or place it somewhere on a network/external drive.

(e.g windows backup generates a folder and some files in it to go with that image backup)

if the program has a bootable utility, boot into that. this assumes you want RID of your current windows OS.

goto the option to restore the image. find a way to reach the image, i.e if networking is needed, you might of needed drivers in the bootable utility, wireless cannot work this way as there isnt a utility to scan networks and enter passwords, gui or command line to my knowledge.

if you still require multiboot options you could resize the host os to make room and create a space for your image restore.

after you find the image, put it over the destination (partition if multiboot) or (drive if wiping the drive fresh).

you should after its complete have an option now to boot into your os you restored, if multiboot, you will manually need to either edit the name of the item & partition UID for the boot configuration to find your newly restored os i.e. if its a different windows version ie say you restores 2012 r2 and you had 2008 r2, and it will boot but has a wrong name, or its the same os, but it is trying to boot to a wrong partition as that information is not updated to reflect the changes a tool called EASY BCD will help if u need to do it via gui, BUT you need a commercial licence if its a business you are doing this for.

now, you should be up an running with a virtual os put onto a physical drive, and it will now be as you wanted, no messing about migrating, or cutting and pasting stuff from folders or registries etc.

should JUST boot.

hope this helps anyone in need for some help and couldnt find a no nonsense get to the point way of sorting this kind of scenario out.

for me it came down to personally doing this kinda stuff with home os versions of stuff, as i am a home user, but it applies to commercial also as in the end, it is a windows os, it has folders, it has registries, it has a boot config, and they have uuid-like entries in this config, so they mainly operate the same when coming down to the real basics.

kind regards, Dez Ainsworth