Установка windows server 2003 на proxmox

Introduction

This is a set of best practices to follow when installing a Windows 2003 guest on a Proxmox VE server. Right now it’s a work in progress. Please feel free to add to it, even if just to pose a potential best practice.

Disk

raw vs qcow2

Raw file format provides better performance while qcow2 offers advanced features such as copy on write and snapshots.

virtio storage drivers

Use virtio dirvers for best performance. See http://pve.proxmox.com/wiki/Paravirtualized_Block_Drivers_for_Windows

Note: the latest VirtIO iso do not include drivers for Windows 2003. You need to download an older version.

Network

E1000 NIC

Use e1000 NIC. It’s stable and performs well. BUT only with the latest drivers from Intel, download from intel.com! (If you use the integrated drivers, the device manager shows a working NIC, but it does not.)

Windows Server 2003 R2 SP2 ships with drivers that do work, but the ones from intel are newer.

Virtio

Use virtio driver as these are kept updated by Fedora virtio NIC drivers need to be loaded post install & can be found here : https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/ Information on install can be found here : http://pve.proxmox.com/wiki/Paravirtualized_Network_Drivers_for_Windows

Note: the latest VirtIO iso do not include drivers for Windows 2003. You need to download an older version.

Packet Capture Fix

I highly recommend to add this regfix http://www.intel.com/support/de/network/sb/cs-005897.htm (http://www.intel.com/support/network/sb/CS-005897.htm?wapkw=%284D36E972%29 in english). HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\00xx where you need to search for your network card an add a DWORD «MonitorModeEnabled»=»1». ControlSet001 can be CurrentControlSet.

KVM Network Performance

Apply the changes mentioned on the KVM Windows TCP/IP Performance page.

Miscellaneous hints

Power management

  • In order for the Windows 2003 guest to shutdown cleanly in the event of a shutdown on the Proxmox VE host you need to:
  1. enable (Start -> Run -> secpol.msc -> «Security Settings\Local Policies\Security Options»)
    1. «Shutdown: Allow system to be shut down without having to log on».
    2. «Interactive logon: Do not require CTRL+ALT+DEL»
  2. disable logon screen screensaver using regedit

REGEDIT4

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"ScreenSaveActive"="0"

  • Optional: It may also be useful to set Shutdown Warning Dialog Timeout. This can be done with the following .reg file

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows]
"ShutdownWarningDialogTimeout"=dword:00000001

Alternatively you can you can use the following adm template to apply it via GPO

CLASS MACHINE
	CATEGORY "otherSystem"
	KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows"
		POLICY "Shutdown Warning Dialog Timeout"
		KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows"
		VALUENAME "ShutdownWarningDialogTimeout"
		VALUEON NUMERIC 1
		VALUEOFF DELETE
			PART "Shutdown Warning Dialog Timeout" NUMERIC
			KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows"
			VALUENAME "ShutdownWarningDialogTimeout"
			REQUIRED
			MIN 0
			MAX 9999
			DEFAULT 1
			END PART
		END POLICY
	END CATEGORY
CLASS USER

NOTE: For this policy to be visible in the Group Policy Object Editor the Only show policy settings that can be fully managed filter must be unchecked.

Clock Drift

If you have any problems with the time on your VM drifting, please see the Guest Time Drift document.

Sources and further reading

Windows 2012 guest best practices

Windows 2008 guest best practices

www.linux-kvm.org/page/Tuning_KVM

Данная статья не откроет Америку, но позволит избежать многих проблем и курения форумов в течении пары дней.

У Windows Server 2003r2 есть проблемы с конвертацией, а именно — с драйверами VIRTIO. Не хочет данная система кушать эти драйвера как все остальные, нужны танцы с бубном и немного магии последовательности действий. Причины проблемы найти не удалось, зато методом тыка, гугла

и боли

был найден рабочий путь.

Создание пустой виртуальной машины

1) В первую очередь нужно создать пустую машину. Основной диск, приводы должны быть IDE (ни SATA, ни VIRTIO не подходят).
2) Диск виртуальной машины должен быть на 10-15% больше оригинального.
3) Добавить диск VIRTIO любого размера, главное — его не должно быть в очереди загрузки.
4) Загрузить VIRTIO драйвера версий: 0.1.52 и 0.1.100 и добавить оба в виртуальные приводы.

Передача данных в пустой виртуальный диск

Для передачи я использовал программу Selfimage. Простая программка с отличным функционалом.
Настройка проста: в верхней части программы нужно выбрать локальный диск, а в нижней — путь куда будет писаться образ. В данном случае будет использован NBD (Network Block Device) на сервере Proxmox, который по 1024 порту будет писать образ прямо в диск виртуальной машины.

На сервере Proxmox нужно запустить сервер NBD, выполнив команду:

qemu-nbd -t /mnt/pve/nfs/images/111/vm-111-disk-1.raw -p 1024

После этого в Selfimage нажать кнопку «Start». После копирования данных — готово. Но проблемы начинаются после.

Драйвера

Вот тут начинается головная боль. Если вы поставите драйвера как обычно с диска — обновил все устройства и готово, то получите BSOD 7b без возможности восстановления системы, так как безопасный режим будет приводить к той же ошибке.
Итак, имеется два диска с различными драйверами VIRTIO, последовательность действий:
1) Нужно установить Baloon драйвер версии 0.1.100, после этого перезагрузиться;
2) Установить на маленький диск VIRTIO (о котором говорилось ранее) драйвер VirtSTOR версии 0.1.100. Выключить машину. Основной диск переключить в режим VIRTIO. Включить машину;
3) Переключите настройку электропитания ОС в «Максимальная производительность» и установите драйвер контроллера версии 0.1.52. Перезагрузка.
4) После перезагрузки можно продолжать установку драйверов (с любого диска) и настройку сервера в обычном режиме.

Что не работает: Драйвер мыши не устанавливается, работать с мышью из терминала физически трудно.
Так же рекомендую данную статью, позволит провести дополнительные настройки системы.

Hello World,

In my previous post, we had a deeper look into the kvm virtual machines and settings that could be configured when creating your virtual machines.  We have mentioned that in order to improve performance, it was a good practice to use the paravirtualized drivers for Windows Operating Systems. This post will describe how you can create a windows 2003 virtual machine and taking advantage of the paravirtualized drivers.

Proxmox ve Team has described one way to use the paravirtualized drivers (or virtio drivers) when performing a windows 2003 installation (see here for original instructions).  Because we want to bring some added value, we will show another way to perform the installation. This method will be described in part 2

This post will simply will explain how you can mount  a floppy driver into your kvm virtual machine and present mass storage drivers to the windows 2003 text based setup routine.

Let’s start the process…

We will first create our virtual machine through the Proxmox Ve web interface.  You should ensure that the disk type and network Card is set to Virtio. (If you do not know how to create a kvm virtual machine, you can have a look here and here)

Click to enlarge picture

In the hardware tab, ensure that the windows 2003 iso image is mounted into the cdrom.

  

Click to enlarge picture

When you boot your virtual machine (configured to use Virtio Disks), the Windows Setup will stop because it has no information about the Virtio disks.  You will get message similar to this one

Click to enlarge picture

No Hard disks have been detected. In order to be able to perform the installation, you will need to provide virtio drivers during the text setup stage.  You will need to press the famous F6 key and pass the drivers information.  This means that you will need to mount a floppy disk drive in Proxmox VE.   This operation cannot be done via the Web interface.  We will need to issue some console commands in order to be able to mount the floppy drive. Read further to know how to perform this action..

Method 1 – Manually providing virtio drivers during Windows 2003 Installation

To perform this procedure, you will need to

  • Download the virtio iso image
  • access to the proxmox ve console or using ssh client (putty) to connect to the console

Step 1 – Download the virtio iso image and getting the virtual floppy image

You can download the virtio image from the Fedora project web site :   http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/

Click to enlarge picture

You have to mount the iso image and extract the file virtio-win-xxx.vfd

Click to enlarge picture

You will then need to copy this file onto the host.  I’ve created the following directory on the ProxMox Ve host /var/vfd and copied the file over there.

Click to enlarge picture

Step 2 – Mounting  the virtual floppy image

  • At this stage, simply start your virtual machine and access the console locally or remotely using an ssh client.  In this console, issue the following command

# ps x | grep kvm | grep <VMID> (where VMID is the ID of the virtual machine where the floppy drive needs to be mounted ).  This will give you an output similar to the following screenshot

Note: you can find the VMID of a virtual machine in the web interface.

Click to enlarge picture

  • Simply copy the output of the command starting at /usr/bin/kvm. As an example, you have something like:

/usr/bin/kvm -monitor unix:/var/run/qemu-server/120.mon,server,nowait -vnc unix:/var/run/qemu-server/120.vnc,password -pidfile /var/run/qemu-server/120.pid -daemonize -usbdevice tablet -name W2K3_VIRTIO_DISK -smp sockets=1,cores=1 -nodefaults -boot menu=on -vga cirrus -tdf -localtime -rtc-td-hack -k fr-be -drive file=/var/lib/vz/template/iso/Win2003_Ent_SP2_CD_VL.iso,if=ide,index=2,media=cdrom -drive file=/var/lib/vz/images/120/vm-120-disk-1.raw,if=virtio,index=0,cache=none,boot=on -m 512 -netdev type=tap,id=vlan0d0,ifname=tap120i0d0,script=/var/lib/qemu-server/bridge-vlan -device virtio-net-pci,mac=92:38:D0:C0:CC:48,netdev=vlan0d0

  • Stop the Virtual machine
  • In the console (or from your ssh client), you can paste the output from the previous command and you append at the end the following information  -fda <path_to_ vfd_image>. This command will restart your virtual machine and mount the virtual floppy as well.

Click to enlarge picture

Step 3 – Specify additional drivers during Setup of Windows

It’s time to perform our windows installation.  Open the vnc console.  If the setup of windows 2003 has already started, restart the virtual machine. When the Virtual machine reboots, press F12 and select boot from CD/DVD.  You will then see, press any key to boot from cd…. message.  Press any key and the setup wizard will sart.

When the Windows 2003 Setup starts, you have to press the F6 Key in order to be able to pass your virtio drivers to the setup routine.  You have to be fast because this screen does not stay forever.

Click to enlarge picture

If you’ve been fast enough, you will see the following screen (see below).  Press S in order to be able to pass the drivers to the setup routine

 

Click to enlarge picture

Based on your windows 2003 version, you can select the drivers that needs to be loaded into the system. Press Enter

Click to enlarge picture

Click to enlarge picture

If everything happens as expected, you will be able to perform your windows 2003 installation.  Note however that during the setup routine (the GUI part), you might see some warning display boxes telling you that the drivers are not signed. Press Yes

Click to enlarge picture

Finally, when your installation is completed, you will notice that the network card is not present within the operating system.  You will need to mount the virtio iso image and update the drivers for your network card.

Click to enlarge picture

Final Words

This post has demonstrated how you could perform a windows 2003 installation virtual machine from scratch that was configured to use Virtio Disk type and network card.  This method is working but requires a lot of small interaction with the user.  You need to copy the vfd file onto the proxmox ve server, you need to start the kvm machine from the console,… after the installation, you will need to install the drivers for the network card…. As I said, a lot of actions needs to be performed with this method…..

Because it’s becoming late…I’ll stop here for today.  But the next part of this post will show you how to create a windows 2003 iso image containing the virtio drivers and automate the installation process. With the “automated method”, you will need to prepare only once the windows 2003 iso image and you will be able to perform your kvm installation with virtio the same way you would do with IDE disk Type…

Stay tuned…. if you want to go the easy way

Till next time… see ya

 Source : http://pve.proxmox.com/wiki/Paravirtualized_Block_Drivers_for_Windows

Перенос сервера с Windows Server 2003 на Proxmox (KVM) может быть вызовом, но следуя приведенной инструкции, вы можете успешно выполнить этот процесс:

  1. Использование Disk2vhd:

    • Скачайте и установите утилиту Disk2vhd с сайта Microsoft.
    • Запустите Disk2vhd и создайте виртуальный жесткий диск (VHD) из вашего диска С: (основного диска Windows).
  2. Перенос VHD-образа на сервер Proxmox:

    • Перенесите полученный VHD-образ на сервер Proxmox с использованием SSH или любого другого удобного для вас метода.
    • Убедитесь, что у вас есть папка для хранения образов на сервере Proxmox.
  3. Создание виртуальной машины на Proxmox:

    • Создайте новую виртуальную машину на Proxmox.
    • Укажите тип дисков IDE для ваших виртуальных дисков.
  4. Конвертация VHD в формат qcow2:

    • Войдите на сервер Proxmox по SSH.

    • Запустите процесс конвертации VHD в формат qcow2 с помощью команды:

      qemu-img convert -O qcow2 /путь/к/mysrv2003.vhd /путь/к/папке/с/образами/vm-304-disk-1.qcow2

    Где /путь/к/mysrv2003.vhd — это путь к вашему VHD-образу, а /путь/к/папке/с/образами/ — путь к папке на сервере Proxmox, где вы хотите сохранить новый qcow2-образ.

  5. Запуск виртуальной машины:

    • Запустите виртуальную машину в Proxmox.
    • Если виртуальная машина успешно запущена, вы можете начать ее использование.
  6. Решение проблем:

    • Если появляется ошибка 0x0000007b, следуйте инструкциям по реанимации:
      • Загрузитесь с Hiren’s BootCD.
      • Выберите «Load Mini XP».
      • Запустите HBCD Menu -> Programs -> Registry -> Fix hard disk controller (fix_hdc.cmd).
      • Отвяжите привязки к установленным драйверам и перегрузитесь.

После этих шагов ваша Windows Server 2003 должна успешно работать в качестве виртуальной машины на Proxmox.

So I’ve had this Microsoft Virtual Server 2005 install that has been chugging along since.. Well 2005. On hardware we scrounged around at work from 2000. So as you can gather, it’s getting OLD. Real old.

So now after a panic, we are finally at the crossroads of what to do from here.

Now most people would expect us to just “migrate” the server to Hyper-V but there is some major shortfalls I’ve had with Hyper-V. First you can’t remotely manage it very easily. God help you if you are on the road, on a notebook, or even… On your parents computer. The idea that you must be on a domain, and install some 300MB+++ file is totally insane, and completely unacceptable.

The other catastrophic issue we’ve had is that running the x64 version of OpenBSD has been met with failure so that enterprise is virtually over.

So, let’s revisit Proxmox VE.

Now to start small, I’m going to migrate the 2003 domain controller. Luckily it’s configured for IDE disks (phew!) and basically doesn’t do anything else other then act as a DC. The steps to do this in a quick and easy manner is something like this:

1 Remove those blasted MS extensions! You can ONLY do this while you are under MS Virtual Server. Really. I expect this also holds true for Hyper-V.

2 Next run the mergeide.reg, file which will tell 2003 (probably 2000 and above…) to enable all the IDE controller types on boot, so you don’t get locked out…

3 Next download and install this GREAT program, selfimage (sorry for the lame download thing), and go ahead and run it.

Make sure you set the source to being a WHOLE DISK, not a partition… Start with the C drive. (I always try to get the OS going before going after data drives & whatnot….).

Next you can set the target to NBD and point it to your proxmox server, and set the port to 1024.

I didn’t know this, but NBD is a network block device! So instead of playing with intermediate disks, formats, and all this other painful crap, we can instead basically dd from one disk to another over the network, with little effort. I would imagine for the WindowsPE crowd this would be a massive win, to say image disks out of other servers, or even LIVE servers.. Although if it were SQL I sure would shut down the database server at this time.

On the proxmox server go ahead and create a ‘destination’ VM, that you will copy the VM into. It’s recommended you make the destination disk larger then the source disk, so there isn’t any nasty rounding errors.

Now putty into the proxmox machine, and then you have to launch the nbd server. The syntax is something like this:

qemu-nbd -t /var/lib/vz/images/xxx/vm-xxx-disk.qcow2

The filename may be slightly different, so don’t sweat it too much, but basically you are telling qemu-nbd to ‘serve’ this virtual disk.

With all of this in place, you can now hit the start button on the SelfImage application and it’ll start to block copy!

I have a slow network where I’m doing this so it took me about an hour to do 32GB.

Once it is done, you can terminate qemu-nbd with a Control+C, then try to start up the VM on Proxmox.

Two things I ran into:

Some error about processor.sys, and a 0x000000CE error code. For me the easy way out of this is to shut down the VM, and re-configure it to disable KVM. In this mode it will be SLOW. But once booted up, you can issue the following from a command prompt:

sc config processor start= disabled

Shut down the VM, turn on KVM, and start it up again. Also the start= isn’t a typo, it really is entered that way.

The other error I had was a INTERNAL_POWER_ERROR blue screen. I tried playing with the ACPI, and some other stuff to no avail. The only way to seemingly ‘fix’ it was booting up again with KVM disabled, and when I tried to login, windows immediately started to shutdown.. Re-enabling the KVM option then let me boot normally. I’m still a little lost as to what this was all about.

So with all the little stops here & there, my VM is now running on Proxmox VE.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Чем распаковать архив tar в windows
  • Как поставить аватарку на рабочий стол windows 10
  • Планшет intel atom windows
  • Как приостановить обновление windows 10 навсегда
  • Как запустить файловый менеджер windows