Showing posts with label Hyper-V. Show all posts
Showing posts with label Hyper-V. Show all posts

Monday, August 19, 2013

How to Update The Provisioning Services (PVS) Agent or Hypervisor Tools The Easy Way

Either you are updating the Provisioning Services (PVS) client on a target device or you are updating the hypervisor tools, there are a few methods to choose from.  One of the quickest and least error prone (in my opinion) methods to perform this is by using the VHD attach method.  This method works with XenServer, Hyper-V, and VMware.  I have also used this method using PVS 5.6 and 6.1.  Instead of reverse imaging, or keeping a master VM to re-image from, all you need is the latest merged VHD.  I say merged because you will need to perform a merge (versions + base) into a single VHD if using PVS 6.1. Below are the steps to perform this in a XenServer or VMware environment.  Hyper-V is almost self-explanatory, as you can boot to the VHD without much effort.

VMware

I have used this method to migrate PVS images from VMware 4.x to 5.x, updating the VMware tools and hardware versions as well as applying PVS agent hotfixes.  This method is a bit more involved than using Hyper-V or XenServer, but it works well.
  1. Merge all versions and the base image into one VHD from within PVS.
  2. Download and install WinImage.  There is a 30 day trial for WinImage, which should be fine to complete this process.
  3. Using WinImage, convert the VHD file to VMDK.
  4. Copy the VMDK file to the VMware datastore.
  5. Create a new VM using the VMDK you just copied.
  6. Log in with the local administrator account (you may have to rejoin the domain).
  7. Uninstall the PVS agent and reboot.
  8. Install any VMware tools updates or VMware hardware version updates.
  9. Install the PVS agent.
  10. At this point you can either copy the VMDK image and use WinImage to convert the image back to VHD, or use the PVS agent wizard.

XenServer


Using XenServer is a bit quicker than using VMware as you don't have to perform any VHD conversions.

  1. Create a NFS share on the PVS server:
    1. Windows 2003:
      1. Using WinSCP, copy the following files from XenServer to the desktop:
        1. /etc/passwd
        2. /etc/group
      2. Install NFS on Windows:
        1. Launch the Add/Remove Windows Components Wizard in the Control Panel
        2. Select the following:
          1. Other Network File and Print Services | Microsoft Services for NFS
          2. Other Network File and Print Services | Microsoft Services for NFS | User name mapping
      3. Configure NFS:
        1. Open Microsoft Services for NFS.
        2. Right-click "User name mapping" and click "Properties".
        3. Select "Use password and group files".
        4. Browse to the passwd file you downloaded to your desktop for the password file.
        5. Browse to the group file you downloaded to your desktop for the group file.
        6. Click "OK".
        7. Right-click "User maps" and click "Create map".
        8. Verify the domain and select an administrator account.
        9. For the Unix user specify "root".
        10. Click "Add".
      4. Create a NFS share:
        1. Create a new directory.
        2. Right-click the new directory and select "NFS Sharing" tab.
        3. Select "Share this folder".
        4. Check "Allow anonymous access".
        5. Click "Permissions".
        6. Check "Allow root access".
        7. Set the "Type of access:" to "Read-Write".
        8. Click "OK".
        9. Click "OK".
    2. Windows 2008:
      1. Install the file role service "Services for Network File System".
      2. Create a NFS share:
        1. Create a directory.
        2. Right-click the directory and select "NFS Sharing" tab.
        3. Enable sharing and specify a name.
        4. Click "Manage NFS Sharing".
        5. Click "Permissions".
        6. Set "Type of access" to "Read-Write"
        7. Check "Allow root access".
        8. Click "OK".
        9. Click "OK".
        10. Click "OK".
  2. Create a new SR in XenServer and point to the NFS share you created earlier.  Remember, the NFS share is case sensitive.
  3. Create a new VM in XenServer with the same specifications as the existing target devices.  Choose the new NFS SR to hold the vDisk for this VM.  Do not start this VM automatically.
  4. Within PVS, set the image you want to update to private mode.
  5. Copy or cut the VHD to the NFS share directory.  You should see another VHD in the NFS share directory with the UUID of that VHD.
  6. Rename the VHD you just copied into the NFS share directory with the same name of the VHD that was created when you created the VM within XenServer.
  7. Boot the VM within XenServer.
  8. Uninstall the PVS agent.
  9. Restart the VM and update any hypervisor tools.
  10. Install the new PVS agent.
  11. Shutdown the VM and cut or copy the VHD back to the PVS store and rename it appropriately back to the original name.
  12. Boot to the image using one of your target devices to make sure all is working and then close the image as you normally do.

Friday, December 21, 2012

Windows Server 2012 Hyper-V Cookbook Review

I recently read "Windows Server 2012 Hyper-V Cookbook" from Packt Publishing written by Leandro Carvalho.  The book starts off with server requirements and how to determine if the hardware you are using is compatible.  Then it goes on to enabling and installing Hyper-V and then performing basic configurations as well as integrating several different Windows components to help manage the system.  The format is an overview, describe how to perform a task, and then describe a bit more in detail.

This book is good for someone who is beginning their virtualization journey.  The book is full of how-to and overviews.  It does a good job on describing how to perform tasks.  If you are wanting to setup a lab with Hyper-V for testing and more discovery, this book will help you get there.  Also, in the appendix, there is a good overview of hypervisors and how they work in relation to actual hosts.

There is no design or integration with enterprise-level components besides clustering and Hyper-V Replica in this book, so if that is what you are looking for, then you will need additional texts in addition to this book.  The book does briefly mention a comparison to VMWare but does not include XenServer, of which all 3 should be considered if embarking and evaluating hypervisors.  Some of the methods mentioned for managing the hypervisor including monitoring and backing up is geared more towards small business when there is not a lot of systems to manage or lack of funds to acquire enterprise type tools.

All-in-all, Microsoft Hyper-V is a good option to help build your cloud whether public, private or hybrid.  And if you are just getting started in testing Hyper-V, this book is a good resource to pull from.

Tuesday, May 12, 2009

Time Synchronization and Hyper-V

You install a new Hyper-V environment and virtualize your domain controllers. Now your time is off. You try and synchronize your PDC emulator to an external time source and the time reverts back. What is happening?




The key word here is Hyper-V Integration Service. There are many benefits to having this service but one down fall in this situation, the time synchronization. Time synchronization in Hyper-V Integration Service synchronizes the virtual machine's time to the hosts time. So even though you have the virtualized Domain Controller getting its time from an external source your time is still off because this service overrides those updates.




What do you do? Easy enough, you disable the time synchronization portion of the Hyper-V Integration Service in the virtual machine settings:




Since this change is being made on your PDC role holder, all your other machines in the domain will automatically synchronize their time. To synchronize the domain controller with an external time source you need to do the following:
  1. Open a command prompt on the PDC emulator with administrative access.
  2. Type: w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL (you can use any external time source, I personally like pool.ntp.org).
  3. Type: w32tm /config /update
  4. Type: w32tm /resync

Thats it! Now your PDC emulator will successfully synchronize with an external time source and all your other computers in the domain will get the correct time from the PDC emulator.