Linux server and windows server 2008 r2

Installing Ubuntu 10.04 on Windows 2008 R2 Hyper-V

The purpose of this article is to help people install Ubuntu 10.04 on Windows 2008 R2 Hyper-V.

Some of the issues many people face in installing Ubuntu 10.0.4 on Hyper-V are the following:

1. No Network Connection
2. No Mouse functionality when using Remote desktop

First of all let me make it clear that when installing Ubuntu 10.04 you do not need the Linux Integration Components download from Microsoft. That’s for earlier versions, not for Ubuntu 10.04.

You will also need to run the install from the server box and not remotely unless you are using the keyboard keys only. The mouse will not work if you do it remotely. That will come later on in this article.

The first thing you must do is setup up your Virtual Machine correctly. That’s pretty easy because the only thing different you’ll be doing is setting up the Network Adapter. Instead of the regular Network Adapter that’s normally used in creating Windows VM’s, you’ll want to use the Legacy Network Adapter which is what will work correctly with Ubuntu 10.04.

Once you add that hardware in, you can boot Ubuntu from the CD or ISO. If you’re going to boot from the CD, create the VM first and select to install the OS later. Once you have the VM created, go back to your settings and on the DVD Drive selection, select “Physical CD/DVD Drive”

Once the installation is complete, it’s time to configure the Network Connection.
You can choose to use DHCP or Static. I chose Static because I am installing it as a dedicated server.

Configure the interfaces file by typing in the following command in the terminal:

$ sudo gedit (This opens the editor so that you can make changes in files)
(Enter in your password when prompted)
When gedit opens, go to /etc/network/interfaces
To setup a static IP address you’ll want to add the following (Use your own IP address, netmask, network, etc, what I’m showing is just an example):

Читайте также:  How to learn to use linux

Auth eth0
iface eth0 inet static
address 10.0.8.170
netmask 255.255.255.0
network 10.0.8.0
broadcast 10.0.8.255
gateway 10.0.8.1

Save it and then add the same settings to your network connections which is on the top taskbar. Select Manual and add the IP, subnet, gateway, dns, and domain if you have one.
Once that is finished go to the terminal and type in the following:

sudo /etc/init.d/networking restart

Make sure that the network connections icon on the top taskbar is enabled.

Now for the mouse issue. Instead of remote desktop, we’ll use RealVNC Viewer for Windows which is free and can be downloaded here:

Once that is installed, go to the Ubuntu Desktop, select “Select” then “Preferences” and “Remote Desktop”

Select “Allow other users to view your desktop” and “Allow other users to control your desktop”. For security select “Require the user to enter this password” and select your own password.

If you select “You must confirm each access to this machine” then when you remote in you’ll only see a black screen because on the server end it is waiting for you to approve the connection.

And that’s it. You should now have Ubuntu 10.04 installed and working on Windows Server 2008 R2 Hyper-V.

Источник

Windows Server и KVM на Linux

kurazhov's blog

Сегодня постараюсь описать все трудности в пути установки операционной системы (ОС) семейства Windows (а конкретнее Windows Server 2008 R2) на виртуальную машину KVM (используется qemu-kvm) в ОС Linux (а именно Debian 7)

Сложностей с установкой kvm возникнуть не должно

Далее необходимо скопировать установочный образ операционной системы куда-нибудь на диск. К примеру можно скопировать в ~/kvm.

sudo dd if=/dev/cdrom of=Window_Server_2008_R2.iso

Самое необходимое: скачайте драйвера virtio, без них установка будет очень-очень долгой.

Затем создадим папку для файлов виртуального жёсткого диска

И сам файл виртуального жёсткого диска, где 25G — его размер

qemu-img create -f qcow2 WIN2K8R2.qcow2 25G

и самое главное — запуск самой виртуальной машины.

qemu-system-x86_64 —enable-kvm -m 2048 -boot d -drive file=WIN2K8R2.qcow2,if=virtio -cdrom Win2K8X64R2Ent.iso -drive file=virtio-win-drivers-20120712-1.iso,media=cdrom -net nic,model=virtio -net user

, где -m 2048 — объём оперативной памяти для неё, WIN2K8R2.qcow2 — файл виртуального жёсткого диска, созданного ранее, if=virtio — источник драйверов для подключения жёсткого диска к виртуальной машине, Win2K8X64R2Ent.iso — образ операционной системы.

Читайте также:  Linux makefile include directories

К сожалению, мне пришлось подключаться к удалённому рабочему столу, потому что по ssh установить Windows не удавалось, система требовала графический интерфейс.

Для запуска qemu под юзером производим следующие шаги:

Редактируем /etc/libvirt/qemu.conf, чтобы виртуальные машины работали у нас от непривилегированного пользователя:

user = «username»
group = «libvirt»

Поскольку у нас будут использоваться tun-устройства, нужно выставить capability CAP_NET_ADMIN, сделать это можно как для отдельного исполняемого файла, так и для пользователя в целом, или настроить чтобы libvirt не сбрасывал нужные права для qemu/kvm.

Выставляем для отдельного файла:

sudo setcap cap_net_admin=ei /usr/bin/kvm

Или выставляем для пользователя в целом в файле /etc/security/capability.conf:

Или выставляем соответствующую настройку в /etc/libvirt/qemu.conf:

Добавим пользователя в группу libvirt и kvm:

Установка Windows Server проста до безобразия, если знать когда подсунуть файлы драйверов для жёсткого диска.

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

  • Нажимаем Install
  • Выбираем тип ОС
  • Соглашаемся с лицензионным соглашением
  • Выбираем Полная установка
  • Щёлкаем по ‘Загрузить драйвер’
  • Обзор
  • Выбираем диск с драйверами Virtio. дисков должно быть два: один с Windows, другой — с драйверами.
  • Выбираем ‘Virtio Drivers’ => STORAGE => SERVER2008R2 => AMD64
  • OK
  • Драйвер ‘Red Hat VirtIO SCSI controller’ будет выбран. Если его не видно, значит что то пошло не так 🙁
  • Жмакаем Далее. Драйвер загрузится и вернёт на экран выбора дисков для установки ОС. Если размер не меняли, то там будет 25 Гб.
  • Щёлкаем на пустом диске и жмём Далее. Всё. Установка идёт стандартным путём.

Единственная трудность случилась в конце установки, когда нужно придумать пароль для учётной записи администратора. Через RDP почему то не печатались иностранные символы, пришлось воспользоваться экранной клавиатурой.

Потребление памяти и утилизация процессора в пределах нормы и не превышала пары процентов при простое системы. Проц — Celeron G1620 🙂

Теперь осталось пробросить эту машину во внешку и подключится к ней по RDP, минуя RDP хостовой системы. Это пока не решено.

Читайте также:  Install latest java linux

Источник

Linux in Windows Server 2008 R2 + Hyper-V Environment

Also, I would like to ask, if Microsoft said not supporting Linux distributions other than RHEL & SUSE Enterprise, will other Linux distributions like Ubuntu Server edition and Debian be supported in later stage? Does anyone know what is the reason behind not supporting other Linux distributions (solely business consideration?) ?

2 Answers 2

Microsoft, like any company, responds to pressure from customers. Unfortunately, for a while there they were in a big fight with Red Hat during which they weren’t even responding to customer demands for Red Hat support but that has been resolved. Microsoft claims that SUSE and Red Hat are the primary distros that people are asking for and indeed the two of them make up a huge chunk of the distros in large companies (the ones that most easily get Microsoft’s attention). Given how long it took and how painful it was to get Microsoft to support these two, I wouldn’t hold my breathe waiting for another distro.

Technically, the issue is performance. You can build a VM on Hyper-V and run any distro you want and it will work if you use the legacy NIC and normal IDE storage controller. The problem you’ll find is that the performance of the VM with the legacy NIC and the IDE controller without better drivers is poor. With the release of Hyper-V R2 (and Windows 2008 R2), Microsoft released the Linux Integration Components Version 2. Once installed, you can use the synthetic NIC which is much better and you’ll find that the IDE controller performs on par with a Windows VM. Microsoft’s testing and documentation for the integration components was done only with SUSE and Red Hat but many people have been able to get them succesfully installed in other linux distros and they are working fine. You just can’t call Microsoft for help if something breaks or acts strange. The Integration Components were also released under GPL so other distros might themselves choose to integrate them to make things even easier.

Источник

Оцените статью
Adblock
detector