Showing posts with label Virtualization. Show all posts
Showing posts with label Virtualization. Show all posts

Monday, 18 April 2016

Enabling Windows File History (aka Shadow Copy on Win 8) without an external drive or network drive

After being hit by a crypto/ransomware trojan, I’m looking at all options to make file management and backups easier and automatic. Shadow Copy is mentioned frequently in relation to the crypto locker virus (…in that the virus typically deletes shadow copies…) so I thought I’d look into this Windows feature. I’ve been after a version history, of sorts, for regular file content for a while so this sort of helps.

In Windows 8, Shadow Copy was renamed File History and is switched off by default. To switch it on, you need an external drive or a network location but that’s lame so I sought a workaround to test the waters and get up and running on an internal drive.

This blog post details the steps to set this up, which basically entails creating a virtual drive in Windows Disk Management, initialising it and creating a simple volume, and then pointing File History (via Control Panel) to that VHD.

This is by no means a bulletproof solution and I noticed the crypto virus that attacked my machine also encrypted my virtual machines so this .vhd would not be immune. But it’s about defence in depth, I suppose.

Although I gave the VHD solution a spin, it’s not for everyone and, most importantly, they’re not attached automatically when you reboot (without a startup script, that is). Instead of the VHD approach, I created a new folder to contain my file history, shared it (granting Read and Change share permissions to my Windows account), and then pointed File History the share via \\127.0.0.1\FileHistory [or whatever you name your share].

Update (a few days on): well that didn’t last. File History very quickly consumed all available free space on my internal laptop drive (a second partition). So I’ve turned it off and am using CrashPlan instead (despite the Java dependency—grrrr) as there was no interface to configure how much storage it uses. File History seems to be yet another one of those inane Windows features that is absolutely useless in real life.

Saturday, 8 March 2014

How to configure Hyper-V to use a wireless connection in Windows 8.1

I haven’t used Hyper-V for a while but when I recently built a Windows 8.1 test bed VM I needed a virtualisation platform  and Hyper-V was more or less ready to go within my Windows 8.1 host laptop.

The only hiccup I encountered along the way—and one I was familiar with from my days running Windows Server 2008 on my laptop simply so I could run Hyper-V—was configuring Hyper-V to make use of my laptop’s wireless connection. This time I followed Rick Gipson’s excellent post to get everything working  and I summarise/condense his steps here in the interest of preservation and to document a few notes relevant to my Win 8.1 environment. Check out Rick’s post for screenshots.

  1. Create a new Internal virtual network switch named Virtual WLAN from the Virtual Switch Manager in Hyper-V Manager. A new Unidentified Network connected to vEthernet (External WLAN) will now be visible within the host OS’ Network and Sharing Center. Note I renamed this connection to vEthernet (External WiFi) in Windows to reinforce its relationship to the wireless adapter and differentiated it from the Hyper-V object.
  2. In Hyper-V Manager, configure the target VM’s network adapter to use the newly-created virtual switch (i.e. Virtual WLAN). Note Rick suggested the need to add a new Legacy Network Adapter but I found this was unnecessary.
  3. In the host OS’ Network and Sharing Center, share the host’s physical WiFi adapter by checking the Allow other network users to connect through this computer’s internet connection box and specifying the Home networking connection as vEthernet (External WiFi). Note Rick’s screenshots show the Home networking connection field as a drop-down list but my current configuration displays as a text field. The WiFi adapter should now be listed as Shared in the host OS’ adapter settings.
  4. Start up your guest VM when you’re connected to a wireless and enjoy network connectivity including internet access.
If you found this post helpful, please support my advertisers.

Wednesday, 18 August 2010

Must Have Windows Server 2008 R2 Hyper-V Hotfixes

Now there's a damning blog post title!

In brief, I've had a few issues since installing Windows Server 2008 R2 and adding the Hyper-V Role on my Dell Precision M6500 Core i7 laptop (if you've landed on this post and you don't care about laptops--i.e. you're an admin--don't stop reading now as this post will likely apply to you too). This post is meant to be a running log of problems and their resolutions while we await the next service pack, I suppose.

Problem #1: Blue Screen of Death/random reboots

Resolution:

KB975530: Stop error message on a Windows Server 2008 R2-based computer that has the Hyper-V role installed and that uses one or more Intel CPUs that are code-named Nehalem: "0x00000101 - CLOCK_WATCHDOG_TIMEOUT"

Symptoms, event log entries, and whatnot: Unexpected freezes, BSODs and reboots during periods of high network activity.

  • Event ID 219, The driver \Driver\WUDFRd failed to load for the device USB\VID_0A5C&PID_5800&MI_01\7&66de6c9&0&0001.
  • Event ID 41, The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.
  • Event ID 4, Broadcom NetXtreme 57xx Gigabit Controller: The network link is down.  Check to make sure the network cable is properly connected.
  • Event ID 1001, The computer has rebooted from a bugcheck.  The bugcheck was: 0x00000101 (0x0000000000000019, 0x0000000000000000, 0xfffff880020ce180, 0x0000000000000003). A dump was saved in: C:\Windows\MEMORY.DMP. Report Id: 043010-31168-01.

Apparently this issue is caused by an Intel erratum affecting Nehalem-based processors (i.e. Xeon 5500, Core i7-800, and Core i5-700 series).

Problem #2: Guest VMs freeze, lost connection

Resolution:

None of this worked for me but changing my host power settings from Balanced to High performance did. In theory you should be able to revert to Balanced after installing and the above.

You may also want to investigate turning off TCP offloading.

Symptoms, event log entries, and whatnot: Hyper-V console freezes in some virtual machines but not others (the only one affected in my case was an XP VM upgraded from Virtual PC 2007 SP1), Hyper-V manager reports the Heartbeat as "Lost connection".

  • Event ID 5: The miniport 'Microsoft Virtual Machine Bus Network Adapter #3' hung.

...followed by...

  • Event ID 4: The miniport 'Microsoft Virtual Machine Bus Network Adapter #3' reset.

For additional information about this problem, definitely check out http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2virtualization/thread/0408a28d-6ab8-4c85-8773-4bc42c2df40b

More to come? Hopefully not! ;-)

If you found this post helpful, please support my advertisers:

Thursday, 6 May 2010

How to merge Hyper-V snapshots to a parent .vhd

Jason Neurohr has a detailed, illustrated post on the subject of merging Hyper-V snapshots to a parent .vhd, leaving you with a single .vhd file you can run without having to worry about the snapshots. I found Jason’s post excellent and the steps described worked like a charm the first time I had to do this (while I didn’t persist, I found exporting a VM with snapshots from the Hyper-V R2 console just wasn’t working—the snapshots weren’t exported as expected).

The merge process is actually quite simple and I’m therefore reproducing just the relevant details from Jason’s post for my own future benefit:

  • Backup the parent .vhd and all snapshot disks (.avhd)
  • Change the extension for all snapshot differencing disks from .avhd to vhd
  • Within the Hyper-V MMC, select the Edit Disk… option
  • On the Locate Disk screen, locate the snapshot disk to be merged
  • Select the Merge option and then the To the parent virtual hard disk option
  • Finish the wizard and create a new virtual machine using the merged disk

If multiple snapshots exist, merge the most recent snapshot into the parent disk and work in reverse snapshot date order all the way back to the parent.

Friday, 22 January 2010

Buying a laptop? Make sure it supports VT

Just borrowed a colleague’s Toshiba M300/Intel Core2 Duo Mobile Processor P7350 laptop only to find the CPU doesn’t support VT (or the Intel Virtualization Technology/hardware-assisted virtualisation) required by Hyper-V and VMware; I was planning to use this laptop for Hyper-V-based demos. Rats.

The laptop in question is only six months old and otherwise nicely equipped with 4GB of RAM and a 320GB hard drive so it’s a shame about this niggle… back to Virtual PC and 32-bit for me I suppose—how quaint!

Which leads me this mental note: when buying a laptop go to extreme lengths to determine whether the CPU offers VT and do some Googling to determine whether it can actually be enabled in the BIOS (apparently the various manufacturers can disable/enable VT at their discretion).

In the P7350 case, Intel’s technical data was incorrect on publication—originally specifying support for VT. If you’ve actually got one of these and are reading this post, sorry mate—hope you weren’t planning to do too much 64-bit virtualisation!

Tuesday, 12 January 2010

Can’t start Hyper-V VM after Windows Server 2008 R2 upgrade

Oh the tedium… Having used Windows Server 2008 R2 for a while, I was keen to upgrade the Hyper-V host environment supporting my dev infrastructure from RTM to R2. R2 seems faster and more refined; I was also wanting to play with the latest version of the System Center Virtual Machine Manager—which requires R2.

The upgrade process went smoothly once I figured out the installer would eventually present me with the upgrade option after telling it to install the Windows Server 2008 R2 Standard (Full Installation) option; this was briefly confusing to me  since I didn’t want to do a full installation! I shut down all my VMs properly beforehand and everything seemed pretty much good (I did have to recreate the one VM I normally auto-start but luckily I was able to reuse the .vhd itself and the machine came back to life with little hassle).

Today, however, I went to create a new VM but was unable to start it post-creation. Clicking start popped up a message telling me the VM could not initialize and Hyper-V could not create or access saved state file. The physical location of my VMs hadn’t changed but I read this error message as a permissions issue—but where to start?! The only thing I had to go on was that I was creating the new VM on another volume.

Fortunately Jevgenij Martynenko saved the day for myself and others in this forum post with the old trick of granting access to the root of the drive. I remember having to do this for ASP.NET back in the day for some reason…

Anyway, as per the instructions, I granted ‘Authenticated Users’ ‘List folder / read data’ permission to the root of my E:\ drive, setting the scope drop down to This folder only. I did not replace all child object permissions as apparently that causes more problems.

Starting the new VM was successful after this change.

Windows Server 2008 R2 Scratch Disk

When building out a new VM I’ve occasionally created a second disk for holding non-system files and temporary data; this disk is easy to blow away every so often and saves the hassles of defragging and compressing.

I recently built a Windows Server 2008 R2 VM and created a system drive and secondary drive in Hyper-V manager before installing the OS. During the OS installation process, I created a new partition and noticed—but thought nothing of—the fact the installer didn’t nag me about creating a reserved system partition as well.

Carrying on my merry way, I eventually found the secret system reserved partition on my “scratch” disk (d:\) when I went to format what I expected was a completely unallocated disk. Bummer—I’m not clear on the ramifications of simply deleting this reserved partition but it currently means dragging around an additional 6GB of D: drive and being unable to blow away my scratch disk.

Thursday, 24 September 2009

Removing the shutdown details prompt in Windows Server

If you’re anything like me, chances are you’ve got dozens of virtualised dev servers hanging around and you shut them off at the end of the day; you also have no idea what to put in the Shutdown Event Tracker Comment box. The event and comment do get written to the event log for future reference so I usually comply and specify an exact reason where applicable or with my standard comment “a” for “all good” or “a-team” or something like that!

In practice, I’m the only one using my dev environments and I’ve never had the need to remind myself why I shut down the server. The specific event is likely buried among the shut down/start up events anyway and it’s probably safe to say this feature was intended for multi-admin production environments.

The shutdown event tracker is just an extra hassle as a developer but it can be turned off:

  • Run –> gpedit.msc
  • Browse to the Local Computer Policy / Computer Configuration / Administrative Templates / System node
  • Locate and open the Display Shutdown Event Tracker policy
  • Set it to Disabled

Life = that little bit easier.

Monday, 16 March 2009

Presenting at the next SharePoint User Group Presentation

Just a reminder I’ll be delivering part two of my two-part presentation on how we do web content management on MOSS 2007 this Tuesday at 12:30pm. We had a great turnout for the first presentation so it will be interesting to see who comes back!! Honestly, it’s amazing how many of you SharePoint/MOSS guys I’ve met through the first presentation and I’m really looking forward to bumping into a few more of you—please come up and say hello!

The blurb on the user group site is a straight copy of the part one blurb so here’s what I’ll be talking about tomorrow:

westernaustralia.com was one of the first public-facing MOSS 2007-based internet sites launched in Australia and is billed as the Western Australia Tourism Commission’s flagship web site. Two years on and thirty MCMS 2002-based tourism sites are now being migrated to the MOSS 2007 platform. In the second segment of this two part presentation, Michael Hanes, the Development Coordinator/Tech Lead at Tourism WA, talks about the backend MOSS environments. In this presentation Michael presents the existing and replacement hardware environments, virtualisation, environment structure, farm configuration, security, site collection structure and variations, performance, tooling, content delivery (Akamai), and content deployment.

Jeremy’s aiming to record the presentation again so, all being well, the part two webcast will be available after the event in case you’re unable to come along.

Here’s part one in case you missed it. See you down there for part two!!

[Update: a vodcast of the presentation is now available here with a PDF of the slides and notes here.]

[Update: the original PowerPoint deck is now available.]

Sunday, 22 February 2009

Copying Hyper-V Disks

Copying virtual disks is something I do quite a lot of: I start with a base VM and then build out from there on distinct copies. Snapshots and differencing disks are supposed do this but my trust level isn't quite there yet ;-)
VPC 2007 makes it easy to find out where your disks live, pick them up, shift them around, and build new virtual machines around them. For some reason this doesn't seem like it's quite that simple with Hyper-V. Maybe that's because I was copying too much stuff (the snapshots folder and the Virtual Machines folder) and then creating a new VM pointing at the same location... dunno but it got messy yesterday with the copied disk and new VM never getting to the POST stage.

In an effort to remember how I got it right today, here's the very simple deal:
  • Locate the .vhd file to be copied
  • Create a new folder to contain the copy
  • Copy the .vhd file to the new folder
  • Create a new virtual machine that also lives in the same new folder and point it to the copied disk
Hmm... seems just like it used to with VPC!!!


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Tuesday, 9 December 2008

Windows Server 2008 with Hyper-V vs VMWare Server

Back in March I wrote about my first experience with Windows Server 2008 RTM and the pre-release version of Hyper-V. Despite a fiddly installation issue with my locale set to Australia, I eventually got the problem sorted out and declared that I liked Hyper-V. Then I read Andrew Connell's post extolling the virtues of VMWare Server 2.0 and I abandoned Hyper-V to try it out (we run ESX at Tourism and I'd already noted the portability issues with a Hyper-V-based VM during my own trial). I didn't have a ton of joy with the 2.0 beta so stuck with v1.x while v2.0 RTMd--haven't tried it again since. 

I'm an Andrew Connell fan and when he mentioned he was switching back to Hyper-V I figured I'd revisit. The first real version of Hyper-V has now been released and I was curious to see whether the locale issue went away. AC also cited performance and since I had some gripes with the VMWare Server web interface I wanted to see how it would fare. 

The installation was painless today. Install W2k8 x64, install the MSU, install the Hyper-V role and hey presto. I'm currently installing a W2k8 x86 VM and haven't run into any problems with the VMM service not starting or anything else for that matter. My aim is to build out a base image of the OS, copy or snapshot it, and then go from there with a small farm MOSS build out for dev purposes. 

I'm also very curious to find out for myself how easily I can move VMs around and how far I can get with VPC 2007 VMs under Hyper-V... and maybe vice-versa if possible.


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Wednesday, 3 December 2008

Christmas Came Early

We're in the throws of all sorts of things physcial here at Tourism WA. Apart from an office refit (no more trestle tables but the dev team is currently stuck in the training room with no windows), the ICT team are completely rebuilding our virtual environment.

So what does that mean? To start with, redundancy in terms of mirrored setups at head office and the data centre. Each environment is getting a rack full of new blades and some of these things shown in the picture--$170k worth of SAN or 10 usable terabytes of storage.

On the software side, we're going VMware ESX 3.5, Windows Server 2008 x64, SQL Server 2008 , MOSS 2007 x64, and .NET 3.5 SP1 (upgrading from Windows Server 2003 x86, SQL Server 2005, MOSS 2007 x86, and .NET 3.0). Should be interesting. 


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Wednesday, 24 September 2008

How to Create a stand-alone "small farm" MOSS 2007 VPC without a domain controller

Here's my quick and dirty guide to setting up a stand-alone "small farm" MOSS VPC without a domain controller. In this example I'm using Windows Server 2008 with SQL Server 2008, .NET 3.5, and MOSS 2007; I've been through this process on both x86 and x64 platforms--it's the same in both cases. Presumably this is pretty much the same on Windows 2003.


Note this is not a comprehensive guide to VPC building: I make no assumptions about your virtualisation software (I used the free VMware Server product for x64 guest support in this case but I regularly use MS Virtual PC 2007). You may also want to consider differencing disks, memory allocation, physical disk performance, CPU allocations, and so on.


Install Windows Server 2008
  • Don't add it to a domain but changing the machine name from the default is usually helpful.
Configure the Web Server role
  • Add the ASP.NET service
  • Add HTTP Redirection service (somewhat arbitrary)
  • Add Windows Authentication service
  • Add IIS Management Scripts and Tools
  • Add the .NET Framework 3.0 Feature (excluding XPS Viewer)
Update .NET
  • Download and install .NET 3.5 with SP1 (although you can skip this step if you like and let the SQL Server 2008 install handle it)

Install SQL Server 2008 (RTM)

  • Yes to the prompt to install an updated Windows Installer version (and optionally the .NET Framework 3.5 SP1)

  • Select the stand alone installation option

Choose to install the following at a minimum:
  • Database Engine Service
  • Management Tools - Basic
  • Management Tools - Complete

Configure the SQL Server instance as follows

  • Use the default instance name
  • Use the Network Service account for all services. The database engine service should be set to start automatically.
  • Select Windows authentication mode and add your local administrators group
Note: If you don't want to install SQL Server, you can do a "Basic" MOSS install and the MOSS installer will add SQL Serve Express to your system. This is not considered a MOSS farm deployment and there is no upgrade path from this stand-alone configuration to even a small MOSS farm.


Create Local Accounts


Create moss_farm and moss_web local Windows accounts and set a password. Don't add either account to any specific Windows group or SQL Server. MOSS will take care of creating logins for these accounts in SQL Server and assigning them to the appropriate roles.



Install MOSS 2007 SP1


MOSS SP1 is required to install on SQL Server 2008. SP1 can be slipstreamed into the RTM build although Microsoft supplies a ready-to-go MOSS 2007 with SP1 installer.
  • Select the Advanced option
  • This is a small farm installation, so select the Complete option (not the Stand-alone option unless you're not using SQL Server 2008)
  • Leave all defaults as they are
  • Install any post-SP1 updates before running the configuration wizard.

Note there's no requirement to install Windows SharePoint Services (WSS) 3.0 when installing MOSS 2007.



Configure MOSS
  • Run the configuration wizard
  • Select to create a new farm
  • Point MOSS to localhost as the database instance
  • Leave the configuration database name as SharePoint_Config or change it if you like
  • Provide credentials for your moss_farm account
  • Create the Central Administration site on any free port
  • Extend the server's path variable to include C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN (for easy access to stsadm)

Enable Ping (always helpful)

  • netsh firewall set icmpsetting 8
    (to disable ping: netsh firewall set icmpsetting 8 disable)

Clean Up
  • Disable visual enhancements
  • Turn off the Windows page file
  • Delete installer and windows update files (all the junk under %windir%)
  • Defrag, compress, backup, etc

Create a Test Site
  • Create a site using your moss_web account.
  • Set up SSPs, etc, etc.

[Update: Since I wrote this post I've come Justin Devine's very extensive and well-illustrated post on configuring a small farm, with AD and SQL Server 2005, on Windows 2003. Well worth reading and there are some detailed walkthroughs on POP3 and SSP setup. Awesome work Justin! Also worth checking out this link]

Wednesday, 10 September 2008

VMWare Server 2.0 RC2 on a 64-bit host with a 64-bit guest

I recently decided to consolidate a number of physical servers onto a virtualised platform to save space, save energy, and make life easier to backup and manage. Doing this with 32-bit software wouldn't have been a problem: install host, deploy guests, away we go. Instead, since Windows 2008 has RTM'd and MOSS scalability supposedly benefits from a 64-bit environment and MOSS 2007 is supposedly the last 32-bit version of said platform, I figured I'd go whole hog and install 64-bit W2k8 as both host and guest. Not so fast, cowboy. 

The first problem I encountered was the need for 64-bit hardware support. Intel CPUs have offered 64-bit bits for a while now--the Celeron machine I built for my father in-law a few years back offered support for a 64-bit OS, for crying out loud. Not only does a machine require these extensions to run a 64-bit host but apparently some extra special extensions are also required to then run a 64-bit guest. Okay fine: I had to enable the Intel VT stuff at the BIOS level but having done that I'm ready to go. 

Sort of. 

I'm a habitual Virtual PC 2007 user. VPC doesn't support 64-bit guests, I read somewhere (but don't take my word for it), and I'm a bit over the whole VPC thing anyway. I want VMWare's ESX to nearly omit the host OS. ESXi is now free but attempting to install that requires special hardware and while I did get to the point where the installer was looking for SCSI drives, I gave up for now since I don't yet have a fun new iSCSI thing put together just yet... maybe in the future. I've already experimented with Hyper-V but it doesn't allow you to move VMs around very easily and moving these things to and from my laptop might be useful in the future. 

So I settled on the current version of VMWare Server 1.x (aka GSX). It's free and while I've never used it before, it offers some intriguing features--especially support for 64-bit guests. I bang together my Windows 2008 64-bit host machine (without Hyper-V, of course), install VMWare Server, and surprise, I can't create new VMs as there appears to be no local VM server installed. Googling around and word on the street has it 1.x doesn't support 64-bit hosts. Sigh. 

After uninstalling 1.x, I've now downloaded and installed 2.0 RC2. The installer itself doesn't seem to come in a x64 flavour, which is kind of boring; it also seems to automatically install some sort of thingo requiring a FQDN--which I assume is the web-based management interface that was optional in the previous version and was otherwise installed as an IIS web site. Dunno. The web access bits are definitely there and it seems to have installed Tomcat. Great.

Even still, the thing's installed, so good. I don't know why they decided to go from a Windows UI to a web UI but they have. It's slow, annoying, and boring but it seems to work so far. The worst part is that it keeps asking for certificates and logins and this, that, and the other thing. Just get on with it already! I logged in as myself when prompted but I'm not sure how it determined my password and why it can't just log me in automatically.

Out of the box this release supports Windows 2008 64-bit guests, which is nice. Setting up walks you through a wizard, which isn't really my thing but I've gotta say the memory selection is sooo nice: select the recommended value (1024MB), the minimum recommended, or the max recommended (or set your own value directly). No stupid sliders, just go. The console did require I install a plugin but after I powered on my first VM opening in a new window failed. Powering on the VM in fact did a whole lot of nothing. Despite being pointed at the local drive for the Windows 2008 media, the thing sits there with the VMWare logo grinning back at me. I configured the VM with SCSI drives (the default) and in all honesty I don't know a lot about SCSI and how it relates to things I take for granted with IDE drives.

All in all, the thing's installed now--just need to figure out how to become as proficient with this tool as I am with VPC 2007!