Reassociating a VMHost in a Cluster on SCVMM 2008 R2 with Powershell

November 14th, 2009 admin Posted in Virtual Machine Manager, Windows Powershell 1 Comment »

You can’t remove or update vmhosts if they are in Cluster on SCVMM 2008 R2. For that reason, you have to update hosts with Powershell. If you are getting “Access Denied” message from your hosts, you can reassociate them with Powershell:

1
2
$Credential = Get-Credential
Get-VMMManagedComputer | where {$_.State -eq "AccessDenied"} | Reassociate-VMMManagedComputer -Credential $Credential

After that, just update vmhost using SCVMM. Host will be ready.

AddThis Social Bookmark Button

Centos hangs at “IBM TrackPoint firmware” on Hyper-V R2!

November 3rd, 2009 admin Posted in Virtual Machine Manager 3 Comments »

If you install Centos 5.4 on Hyper-V R2 with Linux IC, it could hangs on reboots. We installed Linux Integration Components v2 and Linux Mouse Driver from Citrix. But we couldn’t solve the problem at the beginning.

VMBus: SynIC version: 1
IBM TrackPoint firmware: 0×01, buttons: 0/0
input: TPPS/2 IBM TrackPoint as /class/input/input1

part1

Then I realized something, Hyper-V doesn’t support 4 CPU in Linux Machines. So I switched the CPUs 4 to 1:

part2

And Wolaaaaa!

part3

This solved all problems. Have fun!

AddThis Social Bookmark Button

I’m very proud to show my PS script for SCVMM R2: VMDetails.ps1

November 3rd, 2009 admin Posted in Virtual Machine Manager, Windows Powershell No Comments »

You don’t need any storage server to use Hyper-V. We have Dell Blade servers and also Core i7 OEM servers. So if you have OEM servers, you have to choose VM locations carefully. Because your SATA disks will effect your virtual machines performance directly. So you have to check all SATA disks and find the best disk for the best performance. For that reason, i made this script. With VMDetails.ps1, you will always find the best SATA disk to deploy your Virtual Machine.

Also with VMDetails.PS1, you don’t need to know “Virtual Network Name” of your Hyper-V Host. If you just type “Auto”, it looks for Virtual Networks and choose the best Virtual Network Name. Also you can exclude any Virtual Network like “Backup Network”.

How about Best Hyper-V Host? Just type “Auto” for Hyper-V host name and you will get the Best Hyper-V host to deploy your virtual machines. This script looks all your hyper-v hosts and choose the best one for the best performance.

VMDetails.ps1 Preview:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##########################
####   VMDETAILS.PS1  ####
##########################
 
# Gets Template and Hardware Details
 
function Get-VMDetails
{
param ($VMHost, $Template, $HardwareProfile, $HDDPart, $Network, $ExcludedHDD, $ExcludedNetwork)
 
    $Temp = Get-Template | Where { $_.Name -eq "$Template" }
    $OperatingSystem = $Temp.OperatingSystem.Name
    $SysprepScript = $Temp.SysprepScript.SharePath
 
    $Hardware = Get-HardwareProfile | Where { $_.Name -eq "$HardwareProfile" }
    $CpuType = $Hardware.CPUType.Name
 
    If ($VMHost -eq "Auto")
    {
        $BestServer = Get-VMHost * | Select-Object -Property Name,AvailableMemory | Sort-object AvailableMemory | Select-Object -Last 1
        $VMHostName = $BestServer.Name
        $HDDPart = $HDDPart
 
        If ($HDDPart -eq "Auto:")
        {
            $BestDisk = (Get-VMHost $VMHostName).DiskVolumes
 
            Foreach ($i in $BestDisk)
            {
                If ($i -like "$ExcludedHDD*")

You can download from here: VMDetails.ps1

Usage:

Get-VMDetails -VMHost $VMHost -Template $Template -HardwareProfile $HardwareProfile -HDDPart $HDDPart -Network $Network -ExcludedHDD $ExcludedHDD -ExcludedNetwork $ExcludedNetwork

Params:

$Template: Virtual Machine Template for Deploy
$HardwareProfile: Hardware Profile for Template
$VMHost: One of your Hyper-V Servers’ Name in VMHosts (like hyperv02 or Auto)
$HDDPart: Hard Disk Partition (like C:, D:, E: or Auto)

Example:

Get-VMDetails -VMHost hyperv02 -Template W2K8R2STDT1 -HardwareProfile TEMP2GB -HDDPart Auto -Network Auto -ExcludedHDD "C:" -ExcludedNetwork "Backup Network"

How can you use results?

1
2
3
4
5
6
7
8
$VMDetails = Get-VMDetails -VMHost "$VMHost" -Template "$VMTemplate" -HardwareProfile "$HardwareProfile" -HDDPart "$HDDPart" -Network "$NetworkName" -ExcludedHDD "$ExcludedHDDPart" -ExcludedNetwork "$ExcludedNetwork"
 
$CpuType = $VMDetails.CpuType
$OperatingSystem = $VMDetails.OperatingSystem
$SysprepScript = $VMDetails.SysprepScript
$VMHostName = $VMDetails.VMHostName
$HDDPart = $VMDetails.HDDPart
$NetworkName = $VMDetails.NetworkName

Also I updated the script. Now If you use Windows Server 2008 R2, the “Reserved System Partition” is auto excluded.

Have Fun!

AddThis Social Bookmark Button

DELL R200 vs Hyper-V R2 VM Performance Test

November 2nd, 2009 admin Posted in Virtual Machine Manager, Windows Server No Comments »

Today, I tested a DELL R200 server with two different Hyper-V R2 VMs. Results are unexpectable. Hyper-V R2 beats R200 on performance test. Server configurations:

Dell R200:
OS: Windows Server 2008 R2 (64-bit)
CPU: Intel Xeon X3320 @ 2.50GHz
Ram: 4094 MB RAM
Disk Size: 232 GB, Raid1

Dell M600:
OS: Windows Server 2008 R2 (64-bit)
VM CPU: Intel Xeon L5430 @ 2.66GHz
VM Ram: 4095 MB RAM
VM Disk: 40 GB, Dell EqualLogic

Dell M610:
OS: Windows Server 2008 R2 (64-bit)
VM CPU: Intel Xeon E5530 @ 2.40GHz
VM Ram: 4095 MB RAM
VM Disk: 40 GB, Dell EqualLogic

Results:
performance test

So choosing Radore vXeon servers is a smart play for your needs :)

AddThis Social Bookmark Button

Removing Hyper-V host that you can no longer access from SCVMM 2008

October 28th, 2009 admin Posted in Virtual Machine Manager, Windows Powershell No Comments »

You may need to remove Hyper-V Host without using Credentials if you can no longer access that host. But using SCVMM panel is not a right way sometimes if that host have a associate with another SCVMM server.

1
Remove-VMHost -VMHost RH-VOEM01 -Force -Confirm

With using Force switch, you can remove VMHost directly from SCVMM SQL database. So you don’t need credentials because this operation doesn’t remove SCVMM agent on target host. This command saved my life :)

AddThis Social Bookmark Button

IIS7.5 üzerinde Web Farm ile NLB çalışması

October 21st, 2009 admin Posted in Hosting & IIS7, Virtual Machine Manager, Windows Server No Comments »

Bugün uzun zamandır yapmak istediğim fakat donanım yetersizlikleri ve vakit darlığı nedeniyle bir türlü yapmayı başaramadığım sistemi yarattım. Şuan 6 adet Windows Server 2008 R2 üzerinde tamamen yedekli bir yapıda çalışan bir IIS 7.5 Web Farm’a sahibiz. Teknik detaylara çok fazla girmeyeceğim fakat yaratmış olduğumuz yapıyı biraz gözünüzde canlandırın diye notlarımı yazacağım.

Çalışma için 2 fiziksel sunucu, 4 sanal sunucu kullanıldı.

Fiziksel sunucular:
VXEON01
VXEON02

Sanal sunucular:
INODE01
INODE02
VSPACE01
VSPACE02

INODE01 ile VSPACE01 -> VXEON01 üzerinde
INODE02 ile VSPACE02 -> VXEON02 üzerinde

VXEON01 ile VXEON02 üzerinde Cluster Shared Volumes ile Failover Cluster aktif durumda. Yani fiziksel sunucuda oluşacak donanımsal bir sorunda ya da update sonrası restart’ta diğer sunucuda çalışmaya devam ediyorlar.

VSPACE01 ile VSPACE02, kendi aralarında Clustered File Server. FTP hesapları ve IIS ayarları bu sunucu üzerinde tutuluyor.

INODE01 ile INODE02 ise Shared Configuration’a sahip Web Farm. Ayrıca kendi aralarında NLB’ler. İki sunucu da çalışır durumdayken hem siteye gelen ziyaretçilerin yükü bu iki sunucuya bölüştürülüyor hem de update nedenli bir restart’ta diğer sunucudan hizmet vermeye devam ediyor. Ayrıca external bir Clustered File Server kullanarak, sync problemlerini sıfıra indirmiş oldum. Ayrıca sunucular üzerinde Offline Files Caching aktif. Storage Server’ların ikisi de anlık olarak hizmet veremezse, IIS sunucusu kendi cache’inden hizmet veriyor.

Storage olarak kullandığımız Dell EqualLogic ile Clustered File Server arasında MPIO aktif. Ethernet kartlarından bir tanesi bile uçsa, diğeri üzerinden iletişim devam ediyor. Yine Offline Files özelliği sayesinde EqualLogic bağlantısı tümden gitmiş olsa bir cache’ten çalışmaya devam edebilir yapı. Offline Files Caching’i read only olarak ayarlayarak, kısa süreli erişim problemlerinden sonra yaşanılabilecek sync sorunlarını da engellemiş olduk.

Kurulan yapı kısaca bu şekilde. Kurulum ve yapılandırma yaklaşık 12 saatimi yedi fakat ortaya mükemmel bir sistem çıktı. NLB ile Cluster’ı aynı yapı içinde görebilmek harika bir duygu. Bu tür sistemler ile %100 online kalan shared hosting hesapları, artık hayal değil.

AddThis Social Bookmark Button

How to add untrusted domain host to SCVMM 2008 R2 with Powershell?

October 13th, 2009 admin Posted in Virtual Machine Manager, Windows Powershell No Comments »

You can add untrusted domain host to System Center Virtual Machine Manager 2008 R2 (SCVMM 2008 R2) with Powershell using:

$Credential = get-credential
$VMHostGroup = Get-VMHostGroup -VMMServer localhost | where {$_.Path -eq "All Hosts"}
 
Add-VMHost -VMMServer localhost -ComputerName "hyperv02.yusufozturk.info"
-Description "" -Credential $Credential -RemoteConnectEnabled $true -VmPaths ""
-Reassociate $true -RunAsynchronously -NonTrustedDomainHost -VMHostGroup $VMHostGroup

You can find an example about $Credential in this blog.

AddThis Social Bookmark Button

SCVMM 2008 R2 – Error 415

October 13th, 2009 admin Posted in Virtual Machine Manager No Comments »

You may get this error when you try to add an external host to SCVMM 2008 R2:

Error (415)
Agent installation failed copying C:\Program Files\Microsoft System Center Virtual Machine Manager 2008 R2\agents\I386\2.0.4271.0\msiInstaller.exe to \\hyperv02.yusufozturk.info\ADMIN$\msiInstaller.exe.
(The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you)

Recommended Action
1. Ensure hyperv02.yusufozturk.info is online and not blocked by a firewall.
2. Ensure that file and printer sharing is enabled on hyperv02.yusufozturk.info and it not blocked by a firewall.
3. Ensure that there is sufficient free space on the system volume.
4. Verify that the ADMIN$ share on hyperv02.yusufozturk.info exists. If the ADMIN$ share does not exist, reboot hyperv02.yusufozturk.info and then try the operation again.

Solution: Check external host’s AD DNS servers. In my scenario, DNS servers were down, I couldn’t get authenticated.

AddThis Social Bookmark Button

Hyper-V R2 üzerinde Windows Server 2008 R2 Performansı

October 11th, 2009 admin Posted in Virtual Machine Manager, Windows Server No Comments »

Hayretler içersindeyim. Yeni AD kurulumu ve virtual pool yapılandırmamız tamamlandı. Windows Server 2008 R2 ile gerçekleştirdiğimiz testler, beni çok etkiledi. İşte çıkardığımız sonuçlar:

1) SCVMM R2, Hyper-V R2 ile mükemmel bir uyumluluk ve hızda çalışıyor. Komutların uygulanması çok daha hızlı.
2) Hyper-V R2 üzerine kurduğumuz Windows Server 2008 R2, disk üzerinde sadece 6.5 GB’lık bir yer kaplıyor. Windows Server 2008 x64′te bu 15 GB’a yakındı. Yani W2K8 R2 ile birlikte, eski işletim sisteminde bulunan gereksiz kod fazlalıkları ayıklanmış durumda. Neredeyse yarı yarıya küçülmüş!
3) Yine aynı işletim sistemi üzerinde yaptığımız testte, boot süresi 40 sn, desktop’ın gelmesine kadar geçen süre ise yaklaşık 45 sn. Yani administrator şifresini boş tanımladığınızda, SCVMM R2 üzerinden Start demeniz ile Desktop’ı görmeniz arasında 45 sn gibi bir süre geçiyor. Bunun bir sunucu bazlı işletim sistemi olduğunu hatırlatayım.
4) Bilgisayarıma sağ tıklayıp, Yönet (Manage) dediğinizde, yönetim penceresinin açılması 1 sn, rollerin yüklenmesi için ise 2.5 sn gibi çok kısa bir süre geçiyor. W2K8 üzerinde bu süre, bize acı çektirmeye yetecek kadar uzundu.
5) Windows Server 2008 R2 Standart’ın kullandığı ram miktarı sadece 375 MB!

Kısacası Hyper-V R2 üzerinde Windows Server 2008 R2 performansı mükemmel derecede iyi. Test için kullanmış olduğum sunucu, Dell M610; depolama için kullandığım disk sunucusu ise Dell EqualLogic idi.

AddThis Social Bookmark Button

Hyper-V için eşsiz bir dönüştürücü: Disk2vhd v1.0

October 10th, 2009 admin Posted in Virtual Machine Manager, Windows 7, Windows Server No Comments »

Bu hafta içersinde SysInternals tarafından Hyper-V kullanıcılarının çok hoşuna gidecek bir dönüştürücü yayınlandı: Disk2vhd. Disk2vhd ile birlikte bilgisayarınızda bulunan fiziksel diskinizin içeriğini vhd’ye çevirebiliyorsunuz. Yalnız bu aracın şöyle bir avantajı var. Microsoft’un VSS teknolojisini kullanarak, sistem bölümünü de vhd’ye çevirebiliyor. Yani bilgisayarınız açıkken, C sürücüsünün vhd’sini alabiliyorsunuz. Almış olduğunuz bu VHD dosyasını daha sonra Hyper-V üzerinde açtığınız bir VM’e ekliyorsunuz ve ilk boot işlemi sırasında gerekli sürücüler yüklenerek işletim sistemi kullanılabilir hale getiriliyor. Eğer boot işlemi sonrası sürücülerin bazıları bulunamadıysa, Hyper-V integration component’leri ile eksik olan sürücüleri de yükleyebilme şansına sahipsiniz.

disk2vhd

Bunu sadece Hyper-V için kullanabileceğiniz bir dönüştürücü olarak düşünmeyin. Windows 7 ile birlikte gelen “Boot from VHD” özelliğinden faydalanarak, VHD’ye dönüştürdüğünüz disklerinizin Windows 7 üzerinden boot edilebilmesini sağlayabiliyorsunuz. Henüz bu aracı kullanamamış olsam da P2V işlemine göre daha etkili olduğu/olacağı söyleniyor. En kısa zamanda iş bilgisayarımı sanallaştırmaya hazırlanıyorum :)

AddThis Social Bookmark Button