Friday, August 29, 2014

Proxmox First Server Installation Guide

This will be like an ultimate guide (guideline) to get an optimal running Proxmox on your first server. We will assume a Windows VM (MS Windows 2012 with GUI) be installed on this proxmox installation.

We won't go in detail like creating network bridges, resource pools, etc.

This guide will be work in progress.

Any tips to add in this guide would be appriciated. Please leave a comment.



1) Prerequisites
- Download Proxmox VE 3.x or 4.x here.
- Download the latest iso image of VirtIO drivers here.

- Burn the Proxmox VE iso file on cd or create a bootable USB stick.


2) Installation
- Power on the server you wish to install proxmox on.
- Go into the BIOS of the server and make sure Virtualisation is enabled.
- If you want to use RAID then configure RAID too. (in this guide i asume
   there will be 1 RAID Volume.)

- Put in the just created Proxmox CD or Bootable USB stick and boot from it.

  * Proxmox 3.3 or earlier: 
     When the Proxmox logo appears you can type the following to adjust
     partition sizes, etc:
     linux ext4 maxroot=10 swapsize=20
     Press ENTER key to continue installation.
           
  * Proxmox 3.4 or higher:
     - Go through the License Agreement.
     - When you can select the disk you want to install proxmox on select
       "options" next to it:
       - Partition:   ext4
     - Root:        10
     - Swapsize:  20
  The rest of your drive will be used as VM Store.    

- Change the regional accordingly and press next.
- Fill in the password for your proxmox login
  Fill in desired e-mail address where things like backup logs will send too.
- Adjust the hostname and network settings accordingly.
- When the installation is finished press "Reboot".
- Remove the CD or USB stick and boot from the drive where Proxmox is
  installed.

3) Configuration of Proxmox
- Open your webbrowser and go to https://your_proxmox_ip:8006
- Login with username: root and password: your_password
- Click on "hostname of your Proxmox server".
- Click on "Shell" in the right upper corner to go to the console of your
  Proxmox server.

  * Configure SMTP Server:
      - type: nano / etc/postfix/main.cf
      - Look for relayhost
        relayhost = ip_address_smtp_server
      - Press CTRL+X to exit
        Press Y  then ENTER to save

  Configure RAID Tools:
     - LSI / Intel RAID controller locally see this post.
     - LSI / Intel RAID controller with MegaRAID Storage Manager see this post.

  Configure UPS:
     - For APC / MGE UPS see this post.

4) Configure VM's (MS Windows)
-  Click on "Local" on the left and then go to Tabblad "Content" 
- Next click on "Upload" to upload your VirtIO iso you downloaded in step 1.
- Upload also your iso of your OS.
- When finished click on "Create VM" in the upper right corner.
- I will use general settings, you should change depending OS and purpose.
  * General:     Node: proxmox
                       VM ID: 100
                       NAME: WIN7 (name like you want)

  * OS:             Check which one you will install

  * CD/DVD:    Storage:     Local
                        ISO Image: wininstall.iso

  * Hard Disk:  Bus / Device: VIRTIO / 0
                        Storage:        local
                        Disk Size:      250GB
                        Format:         qcow2
                        Cache:          Default (no cache)

  * CPU:            Sockets:       1
                        Cores:          2
                        NUMA:         Unchecked
                        Type:           Default (kvm64)

  * Memory:     Fixed Size:    8192MB

  * Network:    Bridged mode
                           Bridge:      vmbr0
                           Model:       VirtIO
                        Leave the rest default.

- Confirm and it's done. First VM is created.
- Click on your just created VM and click on "Hardware" Tab.
- Click on "add" and then "CD/DVD Drive".
- Now add the VirtIO iso like you added your iso of your os.
  Use device number 3 or 4.
- When your done click in the upper right corner on "Start" and then "Console".
- Now install your OS and when your harddrive isn't there, load your
  VIRTIO drivers.

- As soon as your windows is installed, install the missing drivers through 
  Device Manager. Drivers are located on the VirtIO iso that is mounted.

- Now we make some adjustments so when you press "shutdown" in proxmox
  your windows vm will be nicely shutdown. 

  * For MS Windows 2008 and 2008R2
     Start - Run - gpedit.msc - ok - open "Computer 
     Configuration" then "Policy" then "Administrative Templates" then "System".
     In the right pane,
     double click on 'Display Shutdown Event Tracker' and select 'disable
     and OK.

     Control Panel - System and Security - Power Options - Edit Plan
     Settings - Turn off the display: Never 

  * For MS Windows 2012R2  
     launch "regedit.exe" and set value of HKLM\Software\Microsoft\
     Windows NT\CurrentVersion\winlogon and change 
     "ShutdownWithoutLogon" to 1

     go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power
     \PowerSettings\7516b95f-f776-4464-8c53-06167f40cc99
     \8EC4B3A5-6868-48c2-BE75-4F3044BE88A7 and set 
     "Attributes" value to 2   

    go to "Control Panel" - "system and Security"-
    "Power Options" and then - "Change plan settings" on choosed power plan
    - "Change Advanced Power Settings" - "Display" and set 'Console lock
    display off timeout' to 0 to disable it.

5) Backup 
- See post here to create backups to a CIFS share.


6) Final Words

  This guide is not finished yet, but all the main items are covered.
  It will get you in the right direction.

  I will update this guide and add stuff to it.

  Any suggestions please leave in the comments below.

 

No comments: