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

Monday, November 4, 2013

Convert XenServer to Hyper V 2012

Built a new Windows Server 2012 Hyper-V environment for my test and non-critical machines.  Below are the steps that I used to move some of my machines out of XenServer and into Hyper-V.

This was using XenServer 6.0

  1. Export VM as OVF
    1. Shutdown the machine
    2. Right click and Export
    3. Choose the OVF format, location, and name
    4. Next through the rest of the screens
  2. This leaves you with a VHD that we can attach to and use.
  3. In Hyper-V create a new diskless VM in your cluster share
  4. Copy the VHD to the subfolder for the VM
  5. In the settings of the VM under the IDE Controller 0 add a new hard drive
    1. Browse to the VHD and OK
  6. Convert the VHD to VHDX
    1. In Hyper-V Manager select the VM and click "edit disk".
    2. Select the VHD, Next
    3. Click Convert, Next
    4. Select VHDX, Next
    5. Leave at Dynamically Expanding, Next
    6. Browse to the VM folder (where it will create the VHDX), typically the same location as where the VHD is currently.
    7. Name it (can be the same name since extension will be different)
    8. Finish and wait for it to create.
  7. Change the VM to point to the VHDX.
    1. Edit the VM and change the virtual hard disk path to point to the vhdx instead of the vhd.
  8. Ensure it boots properly
  9. Login and remove the XenServer tools (note it will be very slow at this point), Reboot
  10. Ensure integrated services is the latest version by inserting the disk and running the update.
  11. Remove integrated services disk
  12. Change IP address as needed
  13. After saving the IP, go back in and make sure the default gateway is listed properly.
  14. Remove the old VHD file.

Tuesday, April 16, 2013

Netlogon 5719 at startup

This issue was a real booger and I almost threw in the flag and called in the big guns.

This error has been around for awhile.  There is a lot of information out there on it and a LOT of reasons it can occur.

I've actually run across this now twice.  Once in my server VM environment and also on new desktops.  It is possible / likely they are related due to the use of switches being simular / same.


In this post I'm focusing on the Virtual Environment issue.

I first discovered the issue when building an Exchange 2010 server and finding that the services where not starting automatically on boot.  This led me to find the Netlogon 5719.  After a review of the events it was obvious that this service was attempting and failing to start before the network was connected.

After find this: http://support.microsoft.com/kb/938449 I tried some of the suggestions with no help. Note this setup was with ESXi 5.1 going back to HP ProCurve switches (2810's).  STP was off on the switches.  Also, connected to the same switches is a XenServer environment and a few physical servers which do not see the issue.

Some of the different posts and KB's I found suggested that this isn't an issue and can safely be ignored as long as you can reach the DC to login.  After the set timeperiod Group Policy will apply.  Unfortunately this is NOT a solution nor a good workaround (for desktops, servers, anything).  This causes lots of issues in a domain environment especially where folder redirection, logon scripts, etc.  The proper fix is to be able to get the NIC to initialize before netlogon OR for MS to provide a method for admins to reliably force netlogon to wait for the NIC.

After messing around for awhile I discovered that this only occurs if the NIC is set to static IP.  When set to DHCP all works as expected.

So, at this point we could do DHCP reservations to make it work, BUT this isn't a solution for DC's or DHCP servers, and sometimes a static address is necessary or easier.

After finding a thread on VMWare communities that was exactly my issue it was suggested to try changing the ArpRetryCount.
http://communities.vmware.com/thread/316237?start=15&tstart=0

Bingo!

This could indicate a deeper network issue or possibly a flaw in logic as to when netlogon service should attempt to start.


Note: I also commonly see an issue very simular to this on workstations with SSD's (some differences, occurs when set to DHCP but not static, etc).  In these cases changing the ArpRetryCount does not help although I did find that it is heavily dependent on the type of switch that the workstation is plugged into.  For instance, the issue occurs when plugged into HP ProCurve switches, but does not occur when plugged into cheapo Linksys / Cisco switches.  This likely indicates configuration issue with HP ProCurve (although, many report same or simular issues with enterprise Cisco switches).  It may also be caused by the type of NIC / driver on the system (ie Realtek driver issue).  I have not been able to dig into this issue in great detail yet.

Friday, March 1, 2013

Convert XenServer XVA to VMDK for VMWare ESXi 5.1

During our conversion from XenServer to VMWare I had one machine that had a woopsy and would no longer boot in XenServer without BSOD.  Of course, this is the ONE machine I didn't snapshot first HA.

Environment:
XenServer 5.6 SP2
ESXi 5.1


Cause:
During the conversion, I uninstalled the XenServer tools.  When I went to use VMConverter on the machine it couldn't find the disk due to drivers on the SCSI controller.  So, I went to select a generic driver for the controller and low and behold, I selected the wrong one and rebooted.  ACK  Of course I was greeted by the BSOD.


Solution:
I could have just rebuilt the machine, but it was one of those pain machines (ie, reconfiguring it would be more painful then spending an hour seeing if I could fix it).

  1. Export from XenServer to XVA format
    1. I tried to export to OVF, but it would fail and after some quick looking on the citrix forums it looked like it would likely be easier to export to xva then convert to ovf
  2. XenConvert v2.3.1  (version 2.5 doesn't have the options necessary to do this)
    1. From = Xen Virtual Appliance
    2. To OVF
    3. This converts to OVF format which gives you 2 files, an OVF and a VHD
  3. WinImage v8.5 (http://www.winimage.com/download.htm)
    1. Disk dropdown
    2. Convert virtual hard disk image
    3. Select the OVF (vhd file)
    4. OK
    5. Type name and change save as type to vmdk
    6. When you click save the conversion starts
    7. At the end you don't need to mount it with winimage
  4. Create a new virtual machine using the datastore that you want.
    1. Edit the VM and delete the Hard Disk
    2. Browse the datastore and delete the vmdk file
  5. Veeam FastSCP (I used the older version)
    1. Copy the 2 files that WinImage created to the datastore VM Folder
      1. both are vmdk files.  One will be large the other small.  Both are required for this to work (otherwise when you add a hard disk in the next step it won't see it)
  6. Back in VMWare now
    1. Add hard disk
    2. Browse to the VMDK and select it
    3. Boot
    4. Login and install tools
    5. Restart
  7. Change the disk from IDE to SCSI
    1. In VMWare edit the VM and add a new hard disk of 1GB using SCSI (this pulls the controller into the image)
    2. Delete the disk you just created
    3. shutdown the VM
    4. Now we have to edit the vmdk, this can be done using vi, but I'm a windows guy so I used notepad++ on my workstation
      1. pull a copy of the small vmdk down to your local drive using Veeam FastSCP
      2. edit with notepad++
      3. modify the line "ddb.adapterType = "ide" change to "lsilogic"
      4. save and push the file back up to the datastore overwriting
      5. Delete the primary IDE hard disk
      6. Browse the datastore and delete the 1GB vmdk that we created earlier (for getting the LSI controller installed)
      7. Add new hard disk and point to the vmdk
      8. It will find it as SCSI / LSI Logic
      9. Note: if you have a CDROM, it will be IDE 0:1, so you'll want to delete it and re-add it so that it picks up IDE 0:0
      10. Boot
That wasn't so bad...


Your results may vary :)







Thursday, February 28, 2013

Convert from XenServer 5.6SP2 to VMWare ESXi 5.1

Recently we converted our main environment from XenServer 5.6 SP2 (Lefthand Networks SAN/iQ) to VMWare ESXi 5.1 (Nimble Storage CS240).

First off, we looked very hard at XenServer 6, Hyper 2012, and ESX.  After getting hands on for each solution VMWare imo was hands down easier to use and gave better results.

Next, Nimble Storage is awesome!  If your looking at storage give them a good look.



The conversion is pretty easy really, but if you get the steps wrong you can end up with BSOD and other ickyness.  This worked for me, your experience may be different.  I took snapshots at the Lefthand level and XenServer level before touching anything.  Results may vary.

There may be an easier way, doesn't really matter to me. This worked consistantly for me so I'm stickin to it.

It's best practice to rebuild rather than convert.  I only converted machines that couldn't be rebuilt, where being replaced soon (but not ready to replace just yet), or when I was short on time and had to move it immediately. 

Server 2008 / 2008 R2
  1. Download and install VMWare Converter 4.3, yes, the older version
  2. Disable any services necessary (ie, IIS, etc)
  3. Ensure your logged in through the default view, not RDP.
  4. Uninstall XenTools and reboot
  5. Go into Device Manager
  6. You'll see that the SCSI Controller doesn't have a driver.
    1. VMWare converter won't see the disks because of this
  7. Right click the SCSI Controller
  8. Update Driver Software
  9. Browse my computer for driver software
  10. Let me pick from a list of device drivers on my computer
  11. (Standard IDE ATA/ATAPI contoller)
    1. IDE Channel
    2. If you get the wrong one you'll likely see a BSOD upon reboot
  12. Reboot
  13. Open VM Converter
  14. Convert Machine
  15. Select "This local Machine"
  16. Note that "View source details..." lights up. Click it
  17. Ensure that a Source disk is listed (if you didn't change the controller driver then none will be listed and it will error when you attempt to convert)
  18. Type in the info for one of your VMWare hosts
  19. Select your datastore target
  20. Change RAM, CPU, etc as fit
  21. Finish and wait
  22. Once it's completed shutdown the VM in XenServer
  23. In the VMWare console edit the VM.
  24. Delete the CDROM and Hard Disk
  25. Add a new Hard Disk as the SCSI 0:0 and point to the VMDK
  26. Add new CDROM with basic settings
  27. Start the machine and install tools
  28. Note that the VM Version is listed as 4
    1. Shutdown the VM
    2. Right click the VM and choose the option for "Upgrade Virtual Hardware"
    3. It should now show as a vmx-09
  29. Change the nic to vmxnet3 if desired
  30. Boot and change IP address if needed
  31. Uninstall VMWare converter

Since typing the Windows 2008 section, I tried something new that worked amazingly well with little downtime.  I did this with Windows 2008 RTM x32 and Windows 2008 R2 successfully.
  1. Download and install VMWare Converter 4.3.  New version may work better.
  2. Open VM Converter
  3. Convert Machine
  4. Select "This local Machine"
  5. Type in the info for one of your VMWare hosts
  6. Select your datastore target
  7. I had to edit the devices and change the controller to IDE
  8. Finish and wait
  9. At this point it's extermely important to remember that we don't want both VM's on at the same time.  BUT I wanted to ensure that my new VMWare VM would boot...
  10. Change Settings
    1. Change network to an isolated network off production.
  11. Delete the CDROM and Hard Disk
  12. Add a new Hard Disk as the SCSI 0:0 and point to VMDK
  13. Add new CDROM with basic settings
  14. Start the machine
  15. Uninstall XenServer Tools
  16. Reboot
  17. Install VMWare Tools
  18. Shutdown
  19. Note that the VM Version is listed as 4
    1. Shutdown the VM
    2. Right click the VM and choose the option for "Upgrade Virtual Hardware"
    3. It should now show as a vmx-09
  20. Boot the server and ensure it boots
  21. Shutdown VMWare VM
  22. Shutdown XenServer VM
  23. Edit VMWare VM and change NIC to production network
  24. Boot and change IP address if needed
  25. Uninstall VMWare converter
I was amazed how well this worked.  NOTE: I did this on fairly unimportant systems.  Not sure I'd do it with systems that are critical (besides, I rebuilt anything critical, converting is never my first choice)

Windows 2008 RTM: I also had to delete the NIC (which was listed as Flexible) and add a new one for VMXNET3.

One final strange thing I noticed is that the IntialKeyboardIndicators key would get messed up.
This is found under KHEY_USERS\.Default\Control Panel\Keyboard
It would be set to 21474836648 after conversion
Changing this back to 0 made it work as expected.

Tuesday, January 19, 2010

Server 2008 Virtual Iron to XenServer winlogon.exe corrupt

During a conversion of Server 2008 to XenServer the first boot worked great. Upon reboot the server responded with an error that "winload.exe - the selected entry could not be loaded because the application is missing or corrupt"

Booting to the install disk and choosing repair then command prompt. I then ran the following:
Bcdedit /set {device} osdevice “partition=C:”
Bcdedit /set {device} device “partition=C:”
Bdedit /set {bootmgr} device “partition=C:”

I then also had to ensure that the device ID (on storage tab) where set properly for each drive.

Reboot and worked fine.

Saturday, August 8, 2009

Virtual Iron > XenServer Terminal Server Conversion

This is pretty basic and follows the steps from my previous guides, but there where a couple of key points that I HAD to do in order to not have issues in the end.


  1. Uninstall VI Tools (Important)
  2. Start machine back up and follow these steps: (had to login via the local admin account, domain account login failed) http://didyourestart.blogspot.com/2009/08/vmware-vi-conversion-tip.html
  3. Shutdown
  4. Export (this is for a Virtual Volume in VI, didn't have any Terminal / Citrix Servers with Raw LUN connections)
  5. Convert to xva
  6. Import and boot
  7. Login via local admin account
  8. Windows finds new hardware and installs drivers, reboot (not the pci device, but rather the hub root). I had to reboot after this occured prior to installing XenTools otherwise funky issues happened, may not be related, but what's a reboot?
  9. Cancel the search for drivers for the PCI device
  10. Install XenTools
  11. Reboot
  12. Login and ensure IP address is correct. When I did this I found that in the Device manager the "Citrix XenServer PV Ethernet Adapter" was not working properly. I simply waited 5 minutes (was researching how to fix) and it finished it's install and started working on it's own in that time.
  13. Fix IP address if necessary
  14. Shutdown
  15. Change Memory, CPU, and Advanced options (select Optimize for Citrix XenApp)
  16. Boot

Wednesday, August 5, 2009

VMWare / VI Conversion Tip

Received this great tip from an unidentified colleague ;)

He had used this method on VMWare machines. It also works great on Virtual Iron machines and especially with Windows Server 2008 conversions.

From within VMWare machine
  1. remove VMWare Tools
  2. reboot
  3. Go to the Device Manager->IDE ATA/ATAPI controllers
    • Right click on the "Intel 82371AB/EB PCI Bus Master IDE Controller" drive
    • Select 'Update Driver'
    • No, not this time
    • Install from list or specific location
    • Don't search
    • Select 'Standard Dual Channel PCI IDE Controller'
  4. This will update the driver to a generic non-busmaster driver.
  5. Shutdown your VM then convert to VHD
Sources
http://support.citrix.com/article/CTX116603
http://vmtoolkit.com/files/folders/converters/entry8.aspx
http://blog.virtualiron.com/2006/12/18/converting_vmware_virtual_appl.html

Monday, July 20, 2009

Virtual Iron > Citrix XenServer Conversion

With the purchase of Virtual Iron by Oracle we decided to move away from VI/Oracle and into the realm of either MS HyperVisor or Citrix XenServer. This lead us to the need of converting Virtual Iron VM's to XenServer VM's as we tested out Citrix XenServer.

I began by removing the Virtual Iron tools installation and then exporting a test server that was created with a Virtual Iron logical disk (ie boot source of "Disk") to a .vhd format. Download and Open XenConvert v2.0 and convert from VHD to Xen Virtual Appliance format. This will create an ova.xml and related directories for importing into XenServer (you could convert directly into XenServer as well). Open XenServer and select Import > Browse > change file types to "XenServer Virtual Appliance Version 1 (ova.xml) > select the ova.xml file > Select Home Server > Select Storage > Click Import.

A 20 Gig .vhd took approx 20 mins to import and I didn't see a progress bar. Instead when it was completed the option for starting the server became available. Once the VM was started I removed the VI tools and installed the XenServer tools.

I haven't attempted a server that is raw LUN boot (ie boot source of SAN), but will post when I do and whether it's successful or not.

Edit: The import progress bar is displayed on the logs tab.

Note: I found it extremely important to remove the VI Tools before the conversion. Otherwise a lot of issues would begin on the second boot of the VM.