VirtualBox and Vista-64 2
Vista is slow even when you get a new machine. I bought a new Dell Studio 1535 laptop last week with this config:
- Core 2 Duo T8100
- 4GB DDR2 RAM
- Intel x3100 Graphics 1280×800-eh
- 320GB disk
- Vista Home Premium 64-but
Out of the box, this config should be FAST, VERY FAST. It isn’t. It’s slow, really slow. I will admit, it is pretty, but I didn’t buy this $1k machine to be pretty. Vista is slow on my 4 day old laptop with 4GB of RAM and no extras installed. Unacceptable – Dell and MS, are you listening?
Run WinXP in a VirtualBox VM
Preliminaries
- Do you know what a virtual machine is? "Check out this Wikipedia article ":http://en.wikipedia.org/wiki/Virtual_machine to start.
- You’ll need to be committed to this process. This is not a quick fix. You’ll be living with this configuration going forward. Every 3-7 days, you’ll want to reboot Vista for sanity.
- I got a BSOD on Vista last night after I’d shutdown the VMs and VBox; no other data loss that I can tell
- You’ll need a legal WinXP license that can be activated with MS.
- Read all the directions through before you start. I’m not responsible if you fail and destroy your only working PC.
- Get any WinXP network drivers before you start. Actually, download every thing you will need before you start since your networking may not work for a few hours. A better idea is to have another PC with network connectivity ready to get the stuff you forget to get.
- If you change between WiFi and wire LAN connectivity, be prepared to use `arp` and `ipconfig /renew` alot. Vista seems to disconnect from networks whenever it feels like it.
- Expect this to take a good 1-2 hours to setup the first VM not including the 2+ hours to install WinXP. Later, setting up VMs takes about 5 minutes when you know what you are doing.
Suggestions for your new Vista box
If you can’t or are unwilling to wipe vista off and start over with a fresh XP or Linux install, like I was, perhaps …
- Buy more RAM, 3+GB – 4GB if you have 64-bit Vista. I don’t think that will help with the speed, but it will help with what we have planned. Vista “likes” at least 2 GB of RAM to itself, so if you only have 2GB of RAM, move along, there’s nothing to see here.
- Configure Vista to be a minimal OS, UNinstall every app that you aren’t using. The goal is to have the minimum disk, memory and CPU footprint, while leaving enough to
- control your networking
- not get hacked
- Uninstall Norton, MacAffee, and all the other crap “included”, especially the media center garbage. Leave an antivirus scanner – I"m using AVG Free version with URL checking disabled (for privacy)
- Set the machine for “best performance” to turn off all the fancy shading and other effects and set the GUI for “Classic mode”.
- Defrag the disk if that’s an issue – probably not.
- Reboot – go into the BIOS and enable the Hardware Virtualization Instruction support. AMD and Intel call these different things. This is needed to improve performance.
- Grab the non-OSS VirtualBox – the license will work for non-Corporate IT supported installs and personal use. This version supports USB devices, the OSS version doesn’t. You can use it on company equipment provided IT doesn’t install it.
- load VirtualBox on your Vista machine – vbox going forward
- In vbox, use Host Networking (that means you’ll need to be comfortable setting up “Bridged Networls” – without this, you’ll end up with a PC that isn’t connected. You can use NAT connections, but that wasn’t useful to me, so you’re on your own.
- In vbox, use the Intel PRO 1000 Network setting. Linux has drivers for this built in, but you’ll need to download the drivers from Intel for WinXP. This is important as the other network options gave me problems with disconnects, etc.
- In vbox, 20GB Disk – use which ever disk type you like, but know that the choice will impact performance and backups.
- In vbox, Change the video memory from 8M to 128M. I think this could be important for running at higher resolutions with true color graphics. Most of you won’t recall the days of 16 or 256 colors. All PC graphics cards support 16M+ colors at 1024×768 resolutions now.
- Put your WinXP install CD into the PC and configure this new VM to boot from it. There’s 2 places to be certain it boots the CDROM.
- Boot the VM
- load WinXP into a VM under it. Use an old XP license from an old machine that you don’t run anymore. My old Dell 600M laptop XP disk installed flawlessly and the MS registration went through easily, no phone call needed. I had another WinXP Home license ready.
- Don’t do anything with the screen resolution yet. Get get the networking in the VM working. I wouldn’t load any software at this point either – now WinXP Patches or SPs.
- Load the vbox client addons to get higher resolution graphics and other nice additions.
- The client addons disk was included in your Vbox install,
- just mount the CDROM image on the VM setup menu (shutdown the WinXP VM, modify the CDROM ISO and reboot the VM). Don’t boot from it.
- Boot using the HD, not the CDROM
- Find the loaded CD and run the install program.
- Now configure the local drive access, screen resolution and I changed the default get out of VM key from
to F11.
- The client addons disk was included in your Vbox install,
- Install all the WinXP patches (SP3 etc.) then shutdown the VM and back up VM files off to another disk or server. Don’t just copy the files.
- Create a “checkpoint”, if you like.
- Next I installed many, many of my apps, from MS-Office 2003, Firefox, Thunderbird, Divx, VideoRedo Plus, VLC, Opera, TrueCrypt, etc… and made another backup.
- Create a “checkpoint”, if you like.
Results
- I’m getting nearly native performance on my XP VM. Oddly, Vista is still slow on the host system.
- When I’m running full screen, I forget I’m in a VM even when doing video editing or encoding. Same for Linux VMs.
- Unless you are running fairly new games, this setup works with the extra niceness of trivial system backups, checkpoints, etc. If you use new games, forget VMs, this solution is just for productivity workers, lite gamers. I don’t know what level of DirextX is supported inside a VM, if any.
- Keep your “data” outside the VM on the host drive. The VM just holds programs and settings – setup around 20GB for XP, mine is using around 10GB now with MS-Office and about 20 other programs installed.
- Backups – perfect, recoverable systems to any VirtualBox running host. Back to exactly where you were in 2 hours or less on a completely different machine. This is the programs, not the data.
- Backing up VMs is not a trivial `copy`.
- Data backup – use MS-SyncTool or some other way to back it up daily over your network.
Update 9/2/08: If you get stuck, use google and read the virtualbox wiki carefully. I am not available as your personal guru without an hourly contract + expenses.
Update 9/3/08: Today is the first time I’ve connected to my KVM and used my desk with this new laptop. Everything works good, but it doesn’t exceed my expectations. The screen resolution changed to the native 1920×1400 of my 24" monitor. There is lite video flickering, that may drive me nuts; the laptop X3100 graphics chip isn’t the best, but the additional screen real estate is much needed. I suspect a better host graphics card would be significantly better.
More on Virtual Machines like VMware, VitrualPC and VirtualBox.
10-19.2008 update
So the lockup issue for vbox under Vista-64 was due to a huge memory leak in some Microsoft code. MS has a hotfix, but not a patch for this. That means you have to register, agree not to share the fix and use a password to access the fix. It is fairly easy to know which hotfix – the vbox guys have it documented clearly.
Basically, the VirtualBox guys started using a screen refresh routine that nobody else had used in Vista. A few dot releases later and vbox will stop using that call. It isn’t available in a formal released version yet.
Since applying the MS hotfix, my vbox system has been fairly stable. Zero BSOD.
The network disconnects still happen, but have been reduced significantly. Rather than every 15 minutes, they are every few hours. I changed my wireless router out (d-link —> linksys). That is the only noticeable change besides the memory fix. The disconnect happens under vista without any virtualization running at all. Bad Microsoft, bad Dell. Bad. My old laptop (WinXP and Dell) had no issues with either wifi router and disconnects.
Trackbacks
Use the following link to trackback from your own site:
https://blog.jdpfu.com/trackbacks?article_id=250
So the new version of VirtualBox 2.0.2 came out last week.
I was running 1.6.6 and was fairly stable with just 1 BSOD over the last 3 weeks. I left the machine and VMs running for 4+ days straight. Nice and stable.
I upgraded to 2.0.2 on Saturday. Every morning, I’ve had to reboot the entire machine since the upgrade. Today, I had to push the power button after waiting 15+ minutes. Unacceptable. I’ll be attempting a downgrade back to 1.6.6 ASAP.
Ok, so I figured out the issue with the PC locking up every night. IO/APIC. I turned that off. Life was good last night.
My VM OS was installed with that disabled and somewhere it says not to change that setting or bad things happen. Confirmed.