debian:virtualization-debian:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
debian:virtualization-debian:start [2017/08/10 18:22] michaeldebian:virtualization-debian:start [2017/09/09 17:43] (current) michael
Line 8: Line 8:
  
 Wenn man nun den Output **vmx** oder **svn** bekommt ist alles in Ordnung. Wenn nichts kommt kann auf diesem Host nicht Visualisiert werden. Wenn man nun den Output **vmx** oder **svn** bekommt ist alles in Ordnung. Wenn nichts kommt kann auf diesem Host nicht Visualisiert werden.
 +
 +FIXME
  
 ---- ----
Line 30: Line 32:
  
  
-Nun sollte überprüft werden, ob KVM erfolgreich seine beiden Core-Module laden konnte. 
- 
-<code> 
-# lsmod | grep kvm 
-</code> 
- 
-<WRAP center round box 100%> 
-<code> 
-kvm_intel             162153  0 
-kvm                   525409  1 kvm_intel 
-</code> 
-</WRAP> 
- 
-Stimmt die Ausgabe mit der oben aufgelisteten Ausgabe in etwa überein, so sollte nun schon alles parat sein zum Virtualisierungen. 
- 
-<WRAP center round tip 100%> 
-**Wichtig zu Beachten:** 
-Falls Redhat 7 oder CentOS 7 als minimal Installation installiert wurde, so fehlt nun noch das sogenannte x-window Pakage, welches jedoch zum anzeigen des Virt-managers unumgänglich ist. Zum nachinstallieren folgenden Befehl ausführen: 
-<code> 
-# yum install "@X Window System" xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils -y 
-</code> 
-</WRAP> 
- 
----- 
- 
-===== Starten des Virt-Managers ===== 
-Befindet man sich auf einem Server mit GUI und arbeitet auch direkt auf diesem, so kann man ganz einfach via Konsole den **virt-manager** aufrufen und das Programm wird gestartet. 
- 
-Ist man jedoch so wie ich, per **Putty** von einem **Windows System** aus verbunden, so wird dies nicht ganz so einfach funktionieren. Es muss nämlich hierzu zuerst noch ein spezielles Programm Namens: "[[https://sourceforge.net/projects/xming/|Xming]]" 
-auf dem Windows System installiert werden. **Xming** erlaubt es Grafikdarstellungen welche via SSH gesendet werden in Windows als eigenes Fenster Remote darzustellen. So können wir also dann später auch ganz einfach nur den **virt-manager** per Putty aufrufen und es sollte dann die besagte Konsole öffnen. 
- 
-==== Xming Installation ==== 
-  - Als erstes sollte wenn nicht schon passiert Xming [[https://sourceforge.net/projects/xming/|HIER]] heruntergeladen und installiert werden. 
-  - Anschliessend soll Xming gestartet werden. {{ :redhat:virtualization-redhat:xming-systray.png?700 |}} 
-  - <wrap hi>**WICHTIG:** Nun müssen alle bestehenden Sitzungen von Putty zum Hypervisor getrennt werden!</wrap> 
-  - Als nächstes müssen wir dann in Putty selber bei der Hypervisor-Verbindung das X11 forwarding zulassen. Dazu geht man beim richtigen System (Nach dem laden des Putty Profiles) Unter **Connection / SSH / X11** und setzt dort ein häcklein bei "**Enable X11 forwarding**." {{ :redhat:virtualization-redhat:putty-x11.png?400 |}}  
-  - Nun kann man die veränderten Einstellung noch in der Session speichern; Und anschliessend die Putty Verbindung neu aufbauen. 
- 
-Hat nun alle geklappt kann, jetzt auch von der Putty Session aus ganz einfach mit dem Befehl: "**virt-manager**" die Management Oberfläche von KVM gestartet werden. 
- 
----- 
-===== Starten des Virt Managers ===== 
- 
-Virt Manager is a graphical tool through which we can install and manage virtual machines. To start the virt manager type the '**virt-manager**' command from the terminal. 
- 
-<code> 
-# virt-manager 
-</code> 
- 
-{{:redhat:virtualization-redhat:virt-manger-1.jpg?nolink|}} 
- 
- 
-===== Configure Bridge Interface ===== 
-Before Start creating VMs , let’s first create the bridge interface. Bridge interface is required if you want to access virtual machines from outside of your hypervisor network. 
- 
-<code> 
-# cd /etc/sysconfig/network-scripts/ 
-# cp ifcfg-eno49 ifcfg-br0 
-</code> 
- 
-<WRAP center round box 100%> 
-**Edit** the **Interface file** and set followings: 
- 
-<code> 
-# vim ifcfg-eno49 
-</code> 
- 
-  * ''TYPE=Ethernet'' 
-  * ''BOOTPROTO=static'' 
-  * ''DEVICE=eno49'' 
-  * ''ONBOOT=yes'' 
-  * ''BRIDGE=br0'' 
- 
-</WRAP> 
- 
-<WRAP center round box 100%> 
-**Edit** the **Bridge file (ifcfg-br0)** and set the followings: 
- 
-<code> 
-# vim ifcfg-br0 
-</code> 
- 
-  * ''TYPE=Bridge'' 
-  * ''BOOTPROTO=static'' 
-  * ''DEVICE=br0'' 
-  * ''ONBOOT=yes'' 
-  * ''IPADDR=192.168.1.21'' 
-  * ''NETMASK=255.255.255.0'' 
-  * ''GATEWAY=192.168.1.1'' 
-  * ''DNS1=192.168.1.1'' 
- 
-<wrap em>Replace the IP address and DNS server details as per your setup.</wrap> 
-</WRAP> 
- 
-Restart the network Service to enable the bridge interface. 
- 
-<code> 
-# systemctl restart network 
-</code> 
- 
-Check the Bridge interface configuration, with the command below: 
- 
-<code> 
-# ip addr show br0 
-</code> 
- 
-===== Start Creating Virtual Machines. ===== 
-Now Create Virtual Machine either from the command line using '**virt-install**' command or from GUI (**virt-manager**) 
- 
-Now let’s Create a virtual machine of ''**Windows Server 2012 R2**'' using virt-manager. 
- 
-Start the “virt-manager” 
- 
-Go to the File Option, click on ''New Virtual Machine'' 
- 
-{{:redhat:virtualization-redhat:virt-manger-2.jpg?nolink|}} 
- 
-We will be using ISO file as installation media. In the next step Specify the path of ISO file. 
- 
-{{:redhat:virtualization-redhat:virt-manger-3.jpg?nolink|}} 
- 
-Click on Forward. 
- 
-Specify the Compute Resources : RAM and CPU as per your setup. 
- 
-{{:redhat:virtualization-redhat:virt-manger-4.jpg?nolink|}} 
- 
-Click on Forward to proceed further. 
- 
-Specify the storage Size of Virtual Machine, In my case I am using 25G. 
- 
-{{:redhat:virtualization-redhat:virt-manger-5.jpg?nolink|}} 
- 
-In the Next step Specify the Name of Virtual Machine and select network as **Bridge br0** 
- 
-{{:redhat:virtualization-redhat:virt-manger-6.jpg?nolink|}} 
- 
-Click on Finish to start the installation. 
- 
-{{:redhat:virtualization-redhat:virt-manger-7.png?nolink|}} 
- 
-Follow the screen instructions and complete the installation. 
- 
- 
-===== Creating a virtual Machine from Command Line: ===== 
- 
-Virtual Machines can be created from the console as well using the ''virt-install'' command. In the following example i'm going to install an virtual machine with Ubuntu 16.04 LTS. 
- 
-<code> 
-# virt-install --name=Ubuntu-16-04 --file=/var/lib/libvirt/images/ubuntu16-04.dsk --file-size=20 --nonsparse --graphics spice --vcpus=2 --ram=2048 --cdrom=ubuntu-16.04-server-amd64.iso --network bridge=br0 --os-type=linux --os-variant=generic 
-</code> 
- 
-The above **virt-install** command consitst of following options : 
- 
-  * **–name** = <Name of the Virtual Machine> 
-  * **–file** = <Location where our virtual machine disk file will be stored > 
-  * **–file-size** = < Size of the Virtual Machine, in my case it is 20GB > 
-  * **–nonsparse** = < Allocate the whole storage while creating> 
-  * **–graphics** = < Specify the graphical tool for interactive installation, in above example I am using spice > 
-  * **–vcpu** = < Number of virtual CPU for the Machine > 
-  * **–ram** = < RAM size for the virtual Machine > 
-  * **–cdrom** = < Virtual CD ROM which specify the installation media like ISO file > 
-  * **–network** = < it is used to specify which network we will use for the virtual machine, in this example I am bridge interface> 
-  * **–os-type** = < Operating system type like linux and window> 
-  * **–os-variant**= <KVM maintains the OS variants like ‘fedora18′, ‘rhel6’ and ‘winxp’ , this option is optional and if you not sure about OS variant you can mentioned it as generic> 
- 
- 
-Open now the Virt Viewer //(on Windoff)// and follow the instruction to complete the installation. 
- 
-{{:redhat:virtualization-redhat:ubuntu-16-04-virt-install.jpg?nolink|}} 
- 
-Follow the instruction now and complete the installation. 
- 
-Once the Installation is completed we can access the Virtual Machine console from ‘virt-manager‘ as shown below. 
- 
-{{:redhat:virtualization-redhat:ubuntu-16-04-virt-install2.jpg?nolink|}} 
  
-That’s it, basic installation and configuration of KVM hypervisor is completed. 
  
 ---- ----
  
 https://www.thomaschristlieb.de/virtuelle-maschinen-mit-kvmqemu-auf-jedem-linux-server/ https://www.thomaschristlieb.de/virtuelle-maschinen-mit-kvmqemu-auf-jedem-linux-server/
  • debian/virtualization-debian/start.1502382163.txt.gz
  • Last modified: 2017/08/10 18:22
  • by michael