Sign In
Sign In

Installing and Configuring Hyper-V Server 2019

Installing and Configuring Hyper-V Server 2019
Hostman Team
Technical writer
Virtualization
01.11.2024
Reading time: 8 min

Hyper-V is a hypervisor that provides hardware virtualization. Each virtual machine operates on virtual hardware. Hyper-V allows you to create virtual hard disks, virtual switches, and other devices that can be added to virtual machines.

Hyper-V Installation

The installation involves activating the corresponding role in Windows Server 2019 Datacenter or Standard.

  1. Launch the Server Manager.

  2. Select Add Roles and Features.

  3. Choose Hyper-V from the menu.

  4. Click Add Features to add all necessary Microsoft Hyper-V components.

  5. Next, configure the roles. This is done in three sections.

    • First, Virtual Switches: Select a network interface. It will serve as the virtual switch for the hypervisor. Do not use the primary interface for this, as you will need it for physical access to the server.

    • The next section is Migration. You can leave the default settings as they suit our purposes.

    • On the Default Stores tab, also leave the standard parameters. You can change the directories where the virtual hard disk and VM configuration files are stored at any time in the hypervisor settings.

  6. You have prepared the configuration for installation. To start it, click on Install.

Hyper-V Configuration

The next step in working with Hyper-V is configuration. But first, check the server configuration. Launch the Run window (press Win+R) and execute the command sconfig.

In response, a window displaying the configuration will appear. There is a lot of information, so pay attention to these key parameters:

  • Domain/Workgroup — specified when creating the server.

  • Computer Name — also set in the previous step.

  • Configure Remote Management — enabled by default. This feature will be useful later for management through special utilities or the PowerShell console.

  • Remote Desktop — an option that allows you to manage the machine remotely, enabled by default.

  • Network Settings — network parameters of the virtual switch. You specified these when configuring the server while working with the Virtual Switches section.

You do not need to change or configure anything further if you created virtualization servers according to the previous section. You can proceed to remotely manage the server.

Remote Management

You can manage the server in two ways. The most convenient method is through the Windows Admin Center (WAC) web interface. You can download it for free from the Microsoft website: Windows Admin Center Overview.

When installing WAC, use the default settings; there is no need to change any configurations. After installation, you will gain access to the web interface, which should be opened by the name or IP address of the remote host.

Another management method is through the PowerShell console. You enabled this capability when you installed several components along with the hypervisor. To verify that everything is working, launch the PowerShell console and execute:

Get-Command –Module Hyper-V | Measure-Object

In response, you will receive the number of cmdlets designed to manage the infrastructure. These cmdlets duplicate the capabilities of WAC. The difference is that with the web interface, you click buttons, while in PowerShell, you input commands.

For example, you can check network settings through the console with:

Get-NetIPConfiguration

The same information is displayed when connecting to the server through WAC.

Another example is checking for IPv6 support. Execute the following command in PowerShell:

Get-NetAdapterBinding -InterfaceDescription "Hyper-V Virtual Ethernet Adapter" | Where-Object -Property DisplayName -Match IPv6 | Format-Table -AutoSize

If the Enabled field shows True, then IPv6 support is enabled on the Hyper-V Server. You can try to disable it using the command:

Disable-NetAdapterBinding -InterfaceDescription "Hyper-V Virtual Ethernet Adapter" -ComponentID ms_tcpip6

After executing this cmdlet, there will be no output; it simply quietly disables IPv6 support. You can check the status with another command:

Get-NetAdapterBinding

All of this can also be done using Windows Admin Center.

The choice between WAC and PowerShell depends on the tasks you need to accomplish. For example, WAC is good for quickly changing settings, while PowerShell cmdlets are convenient for automation. Suppose setting up a virtual machine is a routine task. It can be tedious to configure another host through WAC each time. In that case, you can write a script executing the required commands through PowerShell.

Firewall Configuration

To manage the Windows Server 2019 firewall, you can use Advanced Firewall rules. It’s more convenient to configure them through PowerShell. To see the list of available requests for regulating the firewall, execute:

Get-Command -Noun *Firewall* -Module NetSecurity

Set the rules for remote access. To do this, execute the following commands sequentially in PowerShell:

Enable-NetFireWallRule -DisplayName "Windows Management Instrumentation (DCOM-In)"
Enable-NetFireWallRule -DisplayGroup "Remote Event Log Management"
Enable-NetFireWallRule -DisplayGroup "Remote Service Management"
Enable-NetFireWallRule -DisplayGroup "Remote Volume Management"
Enable-NetFireWallRule -DisplayGroup "Windows Defender Firewall Remote Management"
Enable-NetFireWallRule -DisplayGroup "Remote Scheduled Tasks Management"

You can conveniently check the status through the Windows Admin Center web interface. Launch it, connect to the server, and go to the Firewall section. The rules are divided into three tabs: GeneralInbound, and Outbound.

Creating Disk Storage

You have already created disk storage. Remember the Default Stores section when installing Microsoft Hyper-V Server? In that section, you needed to specify a folder where all the data would be stored.
If you left the default settings, that’s okay. They can be changed at any time through the web interface.
The Hyper-V settings are located in the Settings section. Here, the same two folders that were available when creating the server can be modified.

  • The first directory is the Virtual Hard Disk Path. This is the path to the folder that serves as the virtual hard disk.

  • The second directory is the Virtual Machines Path. This is where the configuration files for the virtual machines are stored.

You can specify any directories to use for storing data and configuration files.

Configuring Virtual Machines

Hyper-V virtualization is needed to create virtual server hostings on a single physical server. Let’s finally move on to this part.

Download a trial virtual machine for Hyper-V from the official Microsoft website. In it, you will find a trial version of the OS, Visual Studio, an included Linux subsystem with pre-installed Ubuntu, developer mode enabled, and a Windows terminal: Microsoft Developer Downloads.

The Windows 11 virtual machine can be created through the Windows Admin Center in just a few clicks.

  1. Launch the WAC web interface.

  2. Go to the Virtual Machines section.

  3. Create a new virtual machine.

  4. Specify the path to the extracted files of the trial image.

  5. Add the hard disk image.

  6. Click Create to start the virtual machine creation process.

You can also start the VM through WAC.

Creating Backups

For security and data preservation, it is necessary to create backups of virtual machines. Typically, the built-in utility wbadmin is used for this purpose. However, the default installation of Hyper-V does not add it to the server. To fix this, add a new role — Windows Server Backup.

  1. Open the Server Management Console.

  2. Click Add Roles and Features.

  3. Select Windows Server Backup from the list.

After adding the role, the wbadmin utility will be available on the server. To check that it is working and to get a list of all virtual machines, execute the command:

wbadmin get virtualmachines

The command will return a list of virtual machines. Note the host name for which you want to create a backup. You need to add it to the command syntax:

wbadmin start backup -backuptarget:D: -hyperv:"Windows11" -quiet

Replace "Windows11" with the name of your virtual machine. This command will initiate the backup creation process. After completing the process, a log will be saved in the backup folder.

You can also manage backups on Microsoft Hyper-V through the Windows Server Backup application.

  1. Open the Server Management Console.

  2. In the Tools menu, select Windows Server Backup.

  3. Open the Action tab and start a one-time backup — Backup Once.

  4. Select Different Options.

  5. Choose the Full Server configuration to back up all data on the server, including applications and even the system state.

  6. Specify a remote shared folder as the destination.

  7. Enter the address of the remote shared folder. Enable inheritance (the Inherit option) if you want the backup to be accessible to everyone who has access to the remote shared folder.

  8. Provide the credentials of a user with write permissions to the shared network directory.

  9. Confirm the backup configuration.

After the process is complete, open the remote shared folder you specified as the destination for the backup using File Explorer. You should see a directory named WindowsImageBackup containing the backup data.

Scheduled Backups

The utility for backups on MS Hyper-V Server can also be used to create backups on a schedule.

  1. In the Windows Server Backup application, select Backup Schedule.
  2. Specify that you need to back up the entire server.
  3. Configure the frequency of the backups. For example, you can set it to back up every day at 11:00 PM.
  4. Choose the destination; it can be a separate disk or a remote shared folder.
  5. Save the configuration.

You can flexibly configure the scheduled backup settings: change the time, store backups on separate disks, or transfer them to a network folder. The key is to ensure that the data is easy to restore. Windows Server Backup provides all the necessary tools for this.

Virtualization
01.11.2024
Reading time: 8 min

Similar

Virtualization

Installing Windows on VMware

Virtualization is a technology for creating virtual versions of physical resources, enabling diverse, isolated virtual machines to run. A hypervisor is a software or hardware that plays a key role in virtualization, allowing the creation and management of virtual machines on a physical computer or cloud server. A type-2 hypervisor (hosted) runs on top of an already installed operating system called the host OS. Examples include: Oracle VirtualBox Parallels Desktop VMware Workstation This article provides a step-by-step guide to installing Windows 11 on VMware. By reading it, you'll learn: How to install VMware Workstation on your computer How to correctly configure the installed hypervisor How to create a virtual machine with Windows 11, and much more System Requirements for VMware Workstation System requirements for VMware Workstation can vary depending on the program version and operating system. The minimum system requirements are as follows: Processor: 64-bit processor with a clock speed above 1.3 GHz and virtualization support (Intel VT-x or AMD-V) RAM: Minimum 2 GB, but 4 GB or more is recommended Free disk space: At least 2.5 GB of free space for installation OS: VMware Workstation supports various versions of Windows and Linux For the latest system requirements for a specific version of VMware Workstation, refer to VMware's official resources or the software documentation. Downloading VMware Workstation Since VMware has been bought by Broadcom, the first thing to do is register an account at broadcom.com. Go to broadcom.com and click "Register". Enter your email address and then the verification code sent to your email. Provide your details to complete the registration and create an account. Now let’s proceed to downloading VMware. Log into your Broadcom account. In the product drop down list select "VMware Cloud Foundation". Search for "VMware Workstation Pro." Click on the link: Scroll down to “References” and click on the first link: Click on the version you need. In this article case, we will use the latest Windows version for personal use. This version is provided for free. With it, you will receive a fully functional product without needing to buy a license for or activate VMware Workstation 17 Pro. Check the "I agree to Terms and Condition" box and click on the "Download" button on the right. The system will prompt you to go through an extra verification step. Agree and fill in your data. Click on the download button again. The download will begin. Installing VMware Workstation Now we can start installing the software. After download is complete, run the installer file. You should see the VMware Workstation Pro setup window. Click "Next." In the next window, check the box next to "I accept the terms in the License Agreement" and click "Next”. The installer then prompts you to specify the installation path for VMware Workstation and provides two options: Enhanced Keyboard Driver: This option offers additional functionality for working with the keyboard in virtual machines, enhancing key processing and security and allowing extra key combinations between the host and guest OS. Add VMware Workstation Console Tools to System Path: This option automates certain aspects of hypervisor operation. Select these options based on your needs and preferences. We will include both in the installation. In the next window, the installer offers two options: Check for product updates on startup Join the VMware Customer Experience Improvement Program We skip this step by leaving the checkboxes empty and click "Next." Finally, you will be prompted to create desktop and Start menu shortcuts. Select these options based on your preferences. After specifying all parameters and options, click "Install." This completes the VMware Workstation installation. Now, we proceed to launch it and run our first virtual machine on Windows. Launching VMware Workstation and Creating Your First Virtual Machine Now, we'll work in the VMware Workstation environment, perform basic configuration, and prepare a virtual machine for installing Windows 11. You will need the original Windows 11 ISO image for VMware, which you can download from the official Microsoft website or other trusted sources. After installing VMware Workstation, launch it. The hypervisor's main window will open. First, configure the directory where all virtual machines will be stored. Open the "Edit" tab and select "Preferences…". In the "Workspace" tab of the opened window, you can change the path to the virtual machine storage directory. Now we can create our first virtual machine. Go to the "File" tab and select "New Virtual Machine…". The New Virtual Machine Wizard will open. Select the first option, "Typical installation," which automates much of the setup process. The second option, "Custom installation," involves manually configuring various hardware types, but you can do this after creating the virtual machine. Next, specify the installation type for the guest OS. The system offers three options: Install from a physical disk Install from an ISO image Install the operating system later We choose the second option and add the previously downloaded Windows 11 ISO image using the "Browse…" button. The system then prompts you to name the virtual machine and specify its storage location. Leave the default settings and click "Next." In the next window, the wizard prompts you to configure virtual machine encryption. A TPM (Trusted Platform Module) module is required for the guest OS to function correctly. All your files will be encrypted using a password, which you need to enter in the respective fields. The system offers two types of encryption: Encrypt all virtual machine files Encrypt only the files necessary to support TPM We chose the second type of encryption and checked the box to save the password in the credential manager. Next, the wizard will ask for the required disk space for the OS and the file storage method. Leave the default settings and proceed to the next step. You will see the preliminary parameters of the virtual machine. These can be changed by clicking "Customize Hardware…," or left unchanged. The virtual machine is created and ready to launch. The next section describes installing and configuring Windows 11 in VMware. Installing and Configuring Windows 11 in VMware Workstation After creating the virtual machine, you can start installing Windows 11. To install Windows 11 in VMware Workstation, select the previously created virtual machine from the list and click the start button in the top menu. When starting the virtual machine, you may encounter the following error: This error indicates that the first requirement from the "System Requirements for VMware Workstation" section has not been met, specifically the lack of virtualization support. To fix this, enter the BIOS settings and enable the SVM Mode parameter. After starting the virtual machine, you will be prompted to boot from CD or DVD. Switch to the active window area to boot from the installation image and quickly press any key on the keyboard, such as "Enter." The standard Windows 11 installation process will begin, which is the same as installing on a physical computer. First, select the installation language, time and currency format, and keyboard layout. Next, choose the required operating system type and accept the license agreement. Then, the system will prompt you to choose the installation type. Since we are installing the system for the first time and not upgrading, we select the second option. The penultimate step of the installation is choosing the disk space. We select the created 64 GB disk, which will later have the necessary system partitions created. Click "Next" to start the Windows 11 installation process. The final step is the initial setup of the installed OS. This includes: Choosing the region and language Configuring the keyboard layout and input method Setting up a Microsoft account Selecting privacy settings and other configurations After completing this step, the Windows 11 desktop will appear. This signifies the completion of Windows 11 installation on the virtual machine. Installing VMware Tools VMware Tools is a software package provided by VMware that is installed inside virtual machines to ensure more efficient operation and integration between the host system and the virtual machine. To install VMware Tools, click the "VM" tab in the menu and select "Install VMware Tools…". This will add a virtual DVD drive with installation files to the guest OS. Select "setup64" among the files and start the installation. After completing the installation, restart the system. Conclusion In this article, we have detailed the installation of Windows 11 on VMware Workstation, covering all steps from downloading VMware Workstation on the host system to installing Windows 11 on the created virtual machine. Virtualization through VMware allows for flexible use of your computer's resources, ensuring isolation and efficient management of virtual machines.
27 August 2024 · 8 min to read
Virtualization

Clustering in Proxmox VE

The Proxmox Virtual Environment (Proxmox VE) is a platform designed for clustering servers. This product allows you to deploy multiple virtual machines with various operating systems on a single computer. Additionally, it allows centralized management of an organization's IT infrastructure. This approach saves resources, easily protects critical services, and quickly recovers them after failures. Use Cases for Proxmox VE High-Availability: Ensuring fault tolerance. Load Balancing: Distributing workload. High Performance: Increasing performance. Distributed Computing: Performing distributed computing. Clusters consist of a group of servers connected by a high-speed communication channel. The system administrator sees them as a single entity, which provides access to the aforementioned functionalities. Each scenario has specific requirements for the elements forming a resilient cluster, so you should select servers based on their technical specifications. For example, pursuing high performance requires systems with high floating-point operation speeds and low network latency. In any case, a server with high availability is needed. These virtualization clusters differ from grid systems, which, although they combine servers similarly, have a heterogeneous structure and no specific availability requirements for individual nodes. How the Platform Works Proxmox VE's popularity stems from its open-source nature. The software can be used as-is or modified according to specific technical requirements. The platform is built on Debian Linux with an RHEL kernel, so finding a developer with relevant experience is usually not an issue. Even in its original form, it has powerful functionality. Things to keep in mind when using ProxmoxVE: It offers two types of virtualization: full virtualization with KVM and containers with LXC. You can add up to 32 physical machines per cluster. It's preferable to use the same release of Proxmox on all active hosts. Proxmox HA (High-Availability) mode requires at least three nodes in the cluster. Nodes use UDP/5404, UDP/5405, TCP/22 ports. Network latency between nodes should not exceed 2 milliseconds. We recommend downloading the distribution only from the official website. The software is available as ISO files for direct download or as a torrent. Other sources may offer edited versions with added functionalities but may be less manageable. Installation Connect to the server and mount the previously downloaded image. Select the disk for software installation from the dropdown in the GUI. The Options section allows additional partitioning parameters, including region settings. Set the ROOT authorization password and the email address of the Proxmox cluster system administrator. Enter the full domain name, server IP address, subnet mask, primary gateway, and DNS server address in the next window. Reboot the server by clicking the Reboot button to apply the changes. You can now access the system's web interface at https://IP_address:8006. Before using it, update the release to the current state and install protective software like Fail2Ban to guard against brute-force attacks. Subsequent steps include setting up storage and deploying virtual machines and operating systems. Creating a Test Cluster Before combining servers into a cluster to host critical data, it's recommended to launch the system in test mode. We'll do this with three servers of identical configuration (2 CPU cores and 2 GB of RAM each). Initially, each server operates in Standalone Mode upon OS installation. Create a new Proxmox cluster: Click Create Cluster in the Proxmox Cluster section. Name the future cluster and select the appropriate network connection. Click Create to generate a 2048-bit security key. The message "TASK OK" confirms the process is complete. Rechecking the status will show the Proxmox Node is now operating in cluster mode. Connecting to the Cluster To join a cluster: Open Join Information in the Cluster section. Copy the information from the Join Information section, which includes the server address and its fingerprint. Click Join Cluster, paste the copied data, enter the ROOT password for Node #1 Proxmox VE Cluster, and click Join. Repeat this process to connect the remaining nodes, resulting in a fully operational cluster on three servers. High Availability Setup Proxmox VE supports HA functions in both KVM and LXC virtualization modes. The ha-manager utility detects errors and failures, switching from a failed host to a functional one. This provides full automation of node fault tolerance. To achieve this, an NFS storage (example: 192.168.88.18) must be set up. Set Up Storage Add NFS Storage: In the GUI, navigate to Datacenter – Storage – Add – NFS. Enter the storage ID and server IP address. Select the desired directory from the Expert dropdown. Specify the data type in Content. Click Add to connect the storage to all active nodes. Configure HA Create an Ubuntu Container: Go to Datacenter – HA – Add. Enter the container ID, maximum restart attempts, and movement between hosts. Click Add to notify active cluster hosts to control the container with the specified ID in case of failure. Test Failure Response To test the protection mechanism: Power off Host #1. This guarantees a failure registration. The interface will show the system's reaction; the virtual machine resumes within 120 seconds from "freeze". To test quorum enforcement, use the command pvecm expected 1. This verifies that the HA mechanism switches the VM to Host #3. Reconnecting the first two servers restores the cluster, ready to handle any failures. The third node remains active, but can be manually switched. Conclusion This example illustrates Proxmox VE's High Availability mechanism in KVM virtualization and LXC container usage. Once activated, the system operates automatically and can be managed from any internet-connected computer. Ensuring sufficient machine power is crucial, as high-speed connections are typically available in data centers.
13 August 2024 · 5 min to read
Virtualization

Introduction to Proxmox VE

Cloud server technologies allow deploying several fully functional virtual machines on a single physical server and using any operating system on them without any limitations. Software products like Proxmox significantly simplify centralized virtualization management. Additionally, they save company resources since the system administrator can view all VMs from a single workspace. What is Proxmox? To explain virtualization in simpler terms, it's worth mentioning that the hypervisor acts as a controller. The program distributes hardware resources and priorities between VMs and emulates the necessary components following the standards adopted in the installed operating system. With Proxmox VE, the choice of operating system (Windows, Linux, etc.) is not restricted. Key Terms Hypervisor: Special programs designed for creating virtual machines, configuring them, launching, backing up, restoring, and transferring them to another server. Proxmox uses KVM and LXC as hypervisors. Virtual Machine: A system that represents a software server with its own set of "hardware" (processor, RAM, storage, network card, etc.). During operation, it takes up some of the physical server's actual resources. Such systems are commonly abbreviated as VMs. Virtualization Host: The physical server on which the virtual machine or multiple VMs will be deployed. Its parameters determine how powerful the logical computers will be. For example, if it has a 24-core processor, it can create the same number of 1-core systems. A mandatory requirement for hosts is that their processor must support at least one virtualization technology: Intel VT or AMD-V (hardware support for resource allocation to logical computers). An interesting feature of this system is direct access to all available "hardware" from any VM. At the same time, they remain isolated from each other and have individual settings. Things to keep in mind: Critical failure or errors in one VM do not affect the others. Scaling is done by simply copying the virtual server. Hardware failure does not affect the system's integrity, provided a backup exists. The same VM can be easily deployed on a server from any manufacturer. The latter significantly simplifies the task of upgrading data center equipment. The provider can change any "hardware" to more modern ones without considering software compatibility. By using disk arrays like RAID 5, Proxmox won't even notice the replacement of one or several drives. Virtualization of physical servers works seamlessly to ensure the declared availability level of Tier 3 (at least 99.9%). There are several popular hypervisors: VMware ESXi, Microsoft Hyper-V, Oracle VM VirtualBox, and Open Virtualization Alliance KVM. Each product has its own features and different costs. Price plays an important role when comparing, and KVM, as part of a ready-made solution based on Debian Linux—Proxmox Virtual Environment or Proxmox VE—definitely wins. This is partly because it is completely free and also open-source. Installing Proxmox VE The Proxmox installation procedure usually does not raise any questions. The installer works through a standard graphical interface, and the user only needs to select the necessary settings from drop-down lists or manually enter names, passwords, etc. It is recommended to download the disk image with the new version of the program from the official website. Then it can either be mounted from the KVM console or deployed on any external drive. Steps to Install: Order a dedicated server. Mount the downloaded image as a removable disk. Select the disk where Proxmox will be installed. Set additional parameters in the Option section (if necessary). Enter regional settings. Set a password for superuser authorization and specify the email. Specify the domain, server IP address, subnet mask, main gateway, and DNS server. Reboot. If deploying the system from an ISO image based on Debian rather than installing it with the Proxmox Debian Install file, the last step is mandatory. In any case, it is better to do this to exclude possible failures due to other software installed in the same session. Launch Proxmox and proceed with configuring the virtual machine. The web interface address looks like this: https://IP_server_address:8006. Initial Setup Before getting started with Proxmox, update to the latest version and configure security settings. This will ensure the availability of all the functions the developer provides and minimize possible problems. Updating the Application The first thing to do is to disconnect the paid repository from the system. It is installed by default but requires purchasing a paid subscription. Without it, the user will see an error when downloading new package sources. You can disable it by performing the following steps: Open the apt configuration file for editing: nano /etc/apt/sources.list.d/pve-enterprise.list Add the symbol # before the only line in it: #deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise Exit the editor using the key combination <CTRL + X>, answering Y to the prompt to accept changes. Now you can update the package sources: apt update It is recommended to download the new versions of all available packages: apt -y upgrade Network Connection Security The next step is to ensure the security of the Proxmox Virtualization Environment. VMs are most often used by companies with a lot of information that should be kept out of public access (commercial, personal client data, etc.). At a minimum, you need to protect the system from password brute-force attacks. Statistics show that within just 7 days of operating a server with an open port 22 and an external IP address, up to 5,000 password guessing attempts are made. To handle this, you can use the Fail2Ban utility. It allows you to control the number of authorization attempts. If someone exceeds the specified limit, their IP address is blocked. The system administrator specifies the number of attempts and the ban period in the configuration file. Steps to Install Fail2Ban: Update the package sources: apt update Install the program: apt install fail2ban Open the configuration file for editing: nano /etc/fail2ban/jail.conf Change the variables bantime (ban period in seconds for the attacker's IP address) and maxretry (number of authorization attempts). This is done separately for each service. Exit the editor, saving the changes. This operation is performed by pressing <CTRL + X> and confirming with the Y button. Restart the service: systemctl restart fail2ban Now, you need to check the current status of the utility. This can be done by getting the statistics of IP address blocks from remote hosts attempting attacks. The check is available after entering the command: fail2ban-client -v status sshd The response looks like this: root@hypervisor:~# fail2ban-client -v status sshd INFO Loading configs for fail2ban under /etc/fail2ban INFO Loading files: ['/etc/fail2ban/fail2ban.conf'] INFO Loading files: ['/etc/fail2ban/fail2ban.conf'] INFO Using socket file /var/run/fail2ban/fail2ban.sock Status for the jail: sshd |- Filter | |- Currently failed: 4 | |- Total failed: 4327 | `- File list: /var/log/auth.log `- Actions |- Currently banned: 0 |- Total banned: 516 `- Banned IP list: Getting Started Proxmox software is immediately ready to virtualize machines based on Windows Server, Ubuntu, or other platforms. However, there are a few settings to configure before deploying the first VM. For example, it's wise to store the program and virtual machines on different drives. This step increases the system's fault tolerance and improves performance. Configuring Disk Storage The same applies to storing backups. It is important to keep them separately from other files, allowing you to quickly restore VMs even in the case of serious hardware failures on the physical server. Such failures are almost excluded when you use disk arrays like RAID 5 and 10, but it's better to provide additional protection against data loss risks. We suggest you test this configuration on a platform that yet has no important data. As an example, let's take a system with two disks, with the Proxmox hypervisor installed on /dev/sda and /dev/sdb remaining empty for future deploying of the virtual machines. When configuring the partitioning, it is recommended to connect the storage as a regular directory. Steps to Configure: Partition the disk by creating a new partition on it: fdisk /dev/sdb This opens the editor, where you need to press the N key, select the primary partition, specify its number and size, then press the W button. Create a file system: mkfs.ext4 /dev/sdb1 Create a new directory and mount the file system on it: mkdir /mnt/datamount /dev/sdb1 /mnt/data Automatically mount the file system after each restart by adding the following line to the /etc/fstab file: echo "/dev/sdb1 /mnt/data ext4 defaults 0 0" >> /etc/fstab Go to the web interface and add the created storage in the web interface: Datacenter -> Storage -> Add -> Directory. In the Path field, enter the new mount point /mnt/data. Creating a Virtual Machine First, you will need to download the ISO image with the required operating system. Then, mount the image in the system through the Storage menu. In it, you need to click Content – Upload, then select the file and click Upload. The next steps: Click Create VM. Fill in the parameters: name, ISO Image, size and type of hard disk, number of processors, amount of RAM, network adapter. After filling in the specified fields, click on Finish and make sure that the newly created virtual machine appears in the list. Select it and click Start. Go to the Console section and install the operating system in the same sequence as when installing on a physical server. This procedure can be repeated as many times as necessary to create the required number of VMs with the needed operating systems. After launching any of them, there will be an opportunity to install the necessary application programs, and upload user files to the internal storage. Adding Network Drives If you decide to add a network drive from a NAS or similar storage device to the Proxmox system, the settings slightly differ. But, with the initial setup and basic administration skills, you won't need much time for this operation. It is important to remember that on some devices, you must manually permit the protocol. For example, in some versions of the popular Qnap NAS, only NFS v4 is enabled by default, but Proxmox works only with version 3. Configuring a NAS Network Storage Example: Connect to the server console via a browser or SSH. Install the NFS package (if not already available): apt install nfs-common Create a mount point: mkdir /mnt/nfs Add the following line to the /etc/fstab file: echo "192.168.0.2:/nfsshare /mnt/nfs nfs defaults 0 0" >> /etc/fstab Replace the IP address and /nfsshare with the actual values of your NAS. Manually mount the file system or reboot the server: mount -a Advanced Virtualization with Proxmox VE Proxmox VE provides powerful features for creating and managing virtual machines and containers. Through the web-based management interface, you can configure resource allocation, set up backup schedules, and monitor system performance. Moreover, Proxmox supports clustering, enabling the management of multiple Proxmox servers from a single web interface, simplifying the administration of large-scale virtual environments. Clustering with Proxmox VE To create a Proxmox cluster: Install Proxmox VE on multiple servers. Ensure all servers are in the same network. Choose one server as the master and configure it to manage the cluster. Use the following command to create a cluster on the master server: pvecm create mycluster Replace mycluster with your desired cluster name. Add the other servers to the cluster by running the following command on each node: pvecm add IP_of_master_node Replace IP_of_master_node with the IP address of the master server. Setting Up HA (High Availability) Proxmox VE also supports High Availability (HA) configurations to ensure critical virtual machines remain available even if one of the nodes fails. To set up HA: Configure a shared storage accessible by all cluster nodes. Define the resources (virtual machines or containers) that require HA. Use the Proxmox web interface to enable HA for these resources. With HA enabled, Proxmox automatically detects node failures and restarts the affected virtual machines on another node within the cluster. Conclusion Proxmox Virtual Enviroment offers a robust and flexible solution for virtualization, catering to both small-scale deployments and large enterprise environments. Its open-source nature, combined with an extensive feature set, makes it a preferred choice for many IT administrators and businesses looking to optimize their server infrastructure. By understanding the installation process, security configurations, and advanced features like clustering and HA, users can effectively leverage Proxmox VE to meet their virtualization needs.
13 August 2024 · 11 min to read

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support