search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Linux Server, Virtual Machine Manager | 13 Comments | 27,145 views | 07/01/2011 23:29

I created a new kernel image for Debian x86 (32 bit). If you have to use 32bit OS for your application needs, you can use this deb packages to upgrade your kernel. Also you will have integrated shutdown feature.

1) Install a clean Debian 5.0.6

2) Do following:

apt-get update
aptitude update
wget -c http://www.yusufozturk.info/linux/linux-image-2.6.36-hyperv-debian.i386.deb
wget -c http://www.yusufozturk.info/linux/linux-headers-2.6.36-hyperv-debian.i386.deb
apt-get install build-essential
dpkg -i linux-image-2.6.36-hyperv-debian.i386.deb linux-headers-2.6.36-hyperv-debian.i386.deb
echo -e "hv_vmbus\nhv_storvsc\nhv_blkvsc\nhv_netvsc" >> /etc/initramfs-tools/modules 
update-initramfs –u –k 2.6.36-hyperv

That’s it. Reboot your server with new kernel.


Posted in Linux Server, Virtual Machine Manager | 24 Comments | 45,804 views | 07/01/2011 16:51

If you have a kernel image for your Linux virtual machine, it’s easy to upgrade your kernel for Hyper-V support.

1) Install a clean Debian virtual machine (Use emulated Ethernet card and 1 vCpu)

2) Use commands below to update your virtual machine:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
nano /etc/apt/sources.list (edit your source list if it needs)
apt-get update
aptitude update
apt-get install openssh-server (for ssh support)
apt-get install build-essential 
apt-get install ncurses-dev kernel-package fakeroot
apt-get install linux-headers-`uname -r`
apt-get install linux-source-`uname -r | awk -F"-" '{print $1}'`
cd /usr/src
wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.36.tar.bz2
bzip2 -d linux-2.6.36.tar.bz2
tar xf linux-2.6.36.tar
cd linux-2.6.36
cp /boot/config* ./.config
make menuconfig

At menuconfig, go to:

Device Drivers -> Stagging Drivers

Now choose Microsoft Hyper-V Client Drivers

After that you can enter to exit with saving changes.

Use commands below to continue:

1
2
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-hyperv kernel_image kernel_headers

After this process, you will find your two .deb files in /usr/src directory.

Possible problems:

1) You may get this error when you try to compile kernel.

1
2
3
4
5
6
This is kernel package version 11.015.
The UTS Release version in include/linux/version.h
"" 
does not match current version:
"2.6.26-hyperv" 
Please correct this.

Please check this page to fix this issue:

2) You may get this error when you try to compile kernel.

1
2
3
4
lguest.c:21:25: error: sys/eventfd.h: No such file or directory
lguest.c: In function ‘create_thread’:
lguest.c:1021: warning: implicit declaration of function ‘eventfd’
make: *** [lguest] Error 1

Please check this page to fix this issue:

If you get different problems, please report to me.


Posted in Windows Server | No Comment | 4,771 views | 24/03/2009 01:20

As you know Hyper-V supports VSS so you don’t need to shutdown or save state virtual machine when you want to backup them. But If want to backup virtual machines with Windows Server Backup utility, we need to do small registry trick. You should do some registry changes to support Hyper-V on Windows Server Backup. I created small reg files to do that:

1
2
3
4
5
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}]
"Application Identifier"="Hyper-V"

Save as HyperVBackup.reg then use this command to import:

1
reg import "C:\HyperVBackup.reg"

You can find an article on Microsoft about backing up by Windows Server Backup (KB958662)


Posted in Virtual Machine Manager | No Comment | 6,517 views | 20/03/2009 20:32

You may get this error when you try to clone a vm. Solution: If you are using SCVMM, simply delete vm then re-clone it. Be sure, all vm files are deleted before cloning process.

Error (12700)
VMM cannot complete the Hyper-V operation on the hyperv02.contoso.fabrikam.com server because of the error: Failed to import the virtual machine from import directory ‘E:\Hyper-V\W2K8WEB’. Error: One or more arguments are invalid(0x80070057)

Import file format error: E:\Hyper-V\W2K8WEB\Virtual Machines\0D6B7434-D1B3-4BF7-A414-8E29FE56D496.exp.
(Unknown error (0x8005))

Recommended Action
Resolve the issue in Hyper-V and then try the operation again.

If you are doing this on Hyper-V, there is a good solution:

http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/5b731f1a-f495-4d88-a875-0eea77ecd6b4

Posted in Virtual Machine Manager | No Comment | 6,701 views | 18/03/2009 20:21

You have a working template but you want to install new windows updates and re-template it. You installed updates then started to update step. But what is that? Sysprep hangs on %49. Then SCVMM gives this error:

Error (680)
Timeout occurred while waiting for Sysprep to finish processing on the virtual machine.

Recommended Action
Ensure you are using the version of Sysprep binaries that match with virtual machine’s Windows version, and then try the operation again.

Unfortunately you can’t sysprep a Windows Server 2008 with SCVMM more than 3 times. Your licence does not accept sysprep after 3 syspreping. This is really bad but you don’t have any another way. You should create a new machine and then you should make it template. I don’t know what the exact number is, but Vista supports only 3 syspreping.


Posted in Virtual Machine Manager | No Comment | 2,378 views | 08/03/2009 01:38

SCVMM üzerinde Intel işlemcili sunucudan Amd işlemcili sunucuya live migrate yapamamaktasınız. Transfer işlemini gerçekleştirmek için Hyper-v üzerinden Export/Import işlemi gerçekleştirebilir ya da direk vhd dosyasını, Hyper-v üzerinden attach edebilirsiniz.


Posted in Virtual Machine Manager, Windows Powershell, Windows Server | No Comment | 3,806 views | 06/03/2009 12:13

SCVMM üzerinden yönettiğimiz tüm sanal sunucuların “Running”, “Saved” ya da “Stopped” gibi durumlarını, Powershell üzerinden html çıktısı olarak alabiliriz. Böyle bu Powershell scriptini, zamanlanmış görev olarak eklediğinizde, size belirli aralıklarla güncel durumları iletecek bir monitoring sayfası yapmış olacaksınız. Sonuç olarak sürekli birinin SCVMM üzerinden sunucu durumlarını izlemesi gerekmiyor.

1
get-vm | sort-object -Property VMHost -descending | convertto-html -Property Name, Status, VMHost > .\status.html

Yukarda görebileceğiniz gibi tüm VM’leri VMHost sırasına göre sıraladık ve sadece Name, Status ve VMHost’u gösterecek şekilde html’e attık. Property’leri get-vm yaptığınızda karşınıza gelen çıktıdan alabilirsiniz. Fakat örneği her makinayı incelemek istemiyorsunuz. Belki de sürekli stopped kalacak makinalar var. Sadece belirli prefixlere sahip sunucuları monitoring etmek istediniz, o zaman ne yapacağız?

1
get-vm | where-object {$_.Name -match "VM*" } | sort-object -Property Name | convertto-html -Property Name, Status > .\status.html

Son durumda sadece işimize yarar sunucuların gösterilmesini sağladık. Yukardaki senaryoda, çıktı olarak karşınıza sadece VM ile başlayan makinalar çıkacaktır. Bunu da -match ile sağlıyoruz. Dikkat ederseniz burada VMHost’a göre sıralamayı kaldırdık, isme göre sıralandırdık. Ayrıca sadece isim ve durumları bastırdık. Powershell üzerinden neredeyse hayal ettiğiniz her şeyi yapabilirsiniz. Bir sonraki yazıda yukardaki çıktıyı biraz renklendireceğiz ve bir nevi Argus yapmış olacağız. Yukardaki kodları sadece SCVMM için değil, Windows servisleri için de uyarlayabilirsiniz. O yüzden bu yazıyı Windows Server içersine de ekliyorum. Kolay gelsin.