[TUTORIAL] Proxmox Beginner Tutorial: How to set up your first virtual machine on a secondary hard disk.

ProxmoxHHS

New Member
Oct 9, 2019
3
6
1
25
One day when troubleshooting a problem with Proxmox, we realised a lot of guides on the internet are out of date. We also noticed many of them use techniques that we would do different ourselves, like using the shell for certain things when they can also be done using the Proxmox UI. For new users, the shell can be intimidating and confusing. This is why we are writing this tutorial.

In this tutorial, we are going to cover a basic Proxmox set up for beginners who have no prior experience with Proxmox. We will be explaining how to install Proxmox and how to set up a virtual machine. Besides this, we will be covering how to split your physical hard drives for certain tasks. For example, one hard drive for the Proxmox installation, one hard drive for uploading operating system ISO images to, and one hard drive to create virtual machines on. We think this is a great set up for beginners with small servers because it distributes the load over many drives, reducing drive failure and improving performance. Please note that this is not a solution against data loss in case of an actual drive failure.

Table of Contents:
  1. What is Proxmox?
  2. Why another tutorial about a widely discussed topic?
  3. What will this tutorial achieve?
  4. Prerequisites to following this tutorial.
  5. The installation of Proxmox.
  6. Initializing a physical hard disk for uploading operating system ISO’s.
  7. Initializing a physical hard disk for creating virtual machines.
  8. Creating a virtual machine.
  9. End Result.
  10. FAQ.
  11. Last words.
This written tutorial was also made in the form of a video. You can view the video here: https://youtu.be/I-e1_CTa4s0

1. What is Proxmox?
Proxmox is a complete open source server virtualization management solution. Proxmox offers a web interface accessible after installation on your server which makes management easy, usually only needing a few clicks. Proxmox was developed by Proxmox Server Solutions in Austria[1].

2. Why another tutorial about a widely discussed topic?
While troubleshooting a problem with a Proxmox instance, we discovered that a lot of tutorials on the internet are out of date, or mostly tend to use the shell for certain tasks, even tutorials meant for beginners. We think this is not the right approach, as the shell can be confusing and intimidating for new users. This is the reason why we decided to write a tutorial without the use of the shell window. We know that at some point when using Proxmox regularly, it is a good idea to learn basic Linux and shell commands, but we think tutorials for beginners should not require these.

We want to make the setup as easy and understandable as possible. It will only use the Proxmox GUI and avoid the use of the shell whenever possible. This will be easier to follow for new users. Please note that if you need to reformat an already used hard drive, please see the FAQ.

3. What will this tutorial achieve?
Once you have completed all the instructions, your situation will be as follows:
  • Your Proxmox instance will be installed on one physical hard drive.
  • You will have a second physical hard drive with a working virtual machine on it.
  • You will have a third physical hard drive to upload operating system ISO images to (This is optional).
This tutorial also includes the installation of Proxmox.

4. Prerequisites to following this tutorial.
By following this tutorial you must have a physical server with at least two physical hard drives in it. In this tutorial, we are going to use three, but if you only have two hard drives you can skip step 6 and upload ISO images to the boot drive.

A note for more advanced users:
Proxmox is not meant to be installed in a virtual machine, but if you are more experienced with virtualization, and are planning to install Proxmox virtualized for learning purposes, this is possible too. You will have to add two or three virtual disks to your virtual Proxmox VM (Virtual Machine). We will not be doing a step by step tutorial on this, but the most important thing you need to know is that you have to turn on “Virtualize Intel VT-x” (in, for example, VMware), otherwise Proxmox will not perform at it’s best, and some features may not work properly.

5. The installation of Proxmox.
First off, we are going to install Proxmox. We assume you will be doing this on a physical server for this tutorial. You can install Proxmox virtualized, but please read the note for more advanced users above before doing this.

An album with all of the following screenshots can be found here: https://imgur.com/a/lSg9Lzt
  1. The first step to installing Proxmox is downloading the installation ISO (https://i.imgur.com/76OXSL2) from their website (https://www.proxmox.com/en/downloads), and make a bootable USB stick out of it. For this tutorial, we assume you know how to do this.
  2. Make sure virtualization support is turned on in the BIOS of the server. The Intel version of this is called VT-d or VT-x. The AMD version is called AMD-V. If your server for some reason does not support this, you can unfortunately not make use of the full power of Proxmox. Unfortunately, this is probably the hardest part of the tutorial. Turning virtualization support on will be different on every server/motherboard thus making it very difficult for us to show how this is done. Usually this option is turned on by default, but it is a good idea to check this. You can google “[motherboard name] virtualization bios” to see how to do this for your specific motherboard.
  3. Insert the earlier created bootable USB drive into the server and boot from it. You should see this (https://imgur.com/tHEP7u8) screen.
  4. Now press [Enter] on “Install Proxmox VE”. After a few seconds you should see a screen with the user licence agreement (https://imgur.com/B02f7a3). After reading the User Licence Agreement, press “I agree”.
  5. Now select the physical disk you want to install Proxmox on next to “Target-Harddisk”. We recommend NOT installing Proxmox on a USB device. Unlike some hypervisor operating systems you may have heard of, Proxmox does not run from memory. This means that if you install Proxmox on a USB drive, it will cause a lot of wear, and your USB drive might fail sooner than expected[3]. Press “Next” after selecting the right hard drive. (https://imgur.com/cNC3S9U)
  6. Enter your Country, Time zone and Keyboard Layout accordingly. Press “Next”. (https://imgur.com/UI5lyoN)
  7. Enter a password for your root account with a valid email address. This email address will be used by Proxmox for important notifications. Press “Next”. (https://imgur.com/tmJmwJa)
  8. Enter your preferred network settings. Proxmox should automatically detect these settings, so you can press “next” without changing anything, and it should work fine. (https://imgur.com/vyjH51z). For now, we will not make any changes to these settings.
  9. The next step of the installation will be a summary of your settings. Make sure they are all ok and then press install. ProxMox will now install itself on the selected hard drive (https://imgur.com/0g3BDLr).
  10. The last screen of the installation should say that it was a success. Press “Reboot”. (https://imgur.com/h1TIMXo)
  11. After the system reboots, you will see a blue screen with several startup options. Do not press any button. Proxmox will continue to boot normally after a few seconds. (https://imgur.com/Vy5O8oe)
  12. The next screen should be a console showing the IP address chosen during the installation of Proxmox. To access the Proxmox UI, use a browser on a different computer on the same network to navigate to the IP Address and the specified port as shown on the Proxmox server. Make sure to use “https” as well. (https://imgur.com/G8TzBkf)
  13. Once you access the Proxmox UI on another computer in the same network you will be greeted with a login screen (https://imgur.com/5zFcC0I). Log in with the username “root” and the password you chose during the installation. Congratulations, your Proxmox install is now complete and working.

Please note that after these steps, if your drives do not show up properly in Proxmox, you may have to format them and create a partition first. Please check the FAQ on how to do this.
 
  • Like
Reactions: LHS1 and marcelprox

ProxmoxHHS

New Member
Oct 9, 2019
3
6
1
25
6. Initializing a physical hard disk for uploading operating system ISO images.
Your current situation should be as follows:
  • One drive in your server is now used for your Proxmox installation.
  • Two drives are left unused.*

  • If you only have one unused drive left, please skip this step and upload your operating system ISO’s to the installation drive by going to Datacenter > pve > local (pve) > Content > Upload.
If you have at least two unused drives left, we are now going to dedicate one drive to uploading operating system ISO images to it. We recommend using a relatively “small” hard drive, let’s say 60 to 256 GB. This should be plenty for all your ISO files.

An album with all screenshots of the following steps can be found here: https://imgur.com/a/TGEFY1I
  1. Navigate to Datacenter > pve.
  2. Next to the “Disks” option there should be a little arrow to expand the menu, like shown here (https://imgur.com/5xXu4sE). Make sure to expand the menu. Then navigate to the “Directory” menu that becomes visible.
  3. We are going to create a directory on one of the two unused disks to upload ISO images to. Click on “Create: Directory”.
  4. A pop up should appear with several settings. Let’s talk about all of them.
  5. Expand the menu on “Disk:”. This should list all unused physical hard drives in your system. Choose the hard drive that you want to use to dedicate to ISO images. (https://imgur.com/jt6PGI9)
  6. For this tutorial we are going to skip the “filesystem” option and leave it on the default. In our case this is “ext4”.
  7. Give your disk a name so you can easily recognize it. You will see this name appear in several places throughout Proxmox. I will name it ISOs. (https://imgur.com/UvgkxkH)
  8. Make sure to check the “Add Storage” option.
  9. Click on the blue “Create” button.
  10. You have now initialized your hard drive to upload ISO images to. You should see your storage entry appear in the main Proxmox menu on the left. (https://imgur.com/0SYLC7f)
  11. You can upload ISO images to this drive by clicking on the storage entry with the name you just created, then going to “Content”, and then pressing “Upload”.
    (https://imgur.com/eJqRcT1)

7. Initializing a physical hard disk for creating virtual machines.
We are now going to initialize a physical hard drive to create virtual machines on.An album with all of the following screenshots can be found here: https://imgur.com/a/wa75Dpj
  1. To initialize the hard disk, we are going to navigate to Datacenter > pve.
  2. Next to the “Disks” option there should be a little arrow to expand the menu, like shown here. Make sure to expand the menu. Then navigate to the “LVM” menu that becomes visible. (https://imgur.com/qzVNCSt)
  3. We are going to create a so-called “volume group” on the last unused disks. Click on “Create: Volume Group”.
  4. A pop up should appear with several settings. Let’s talk about all of them.
  5. Expand the menu on “Disk:”. This should list all unused physical hard drives in your system. Choose the hard drive that you want to use to dedicate to virtual machines. I recommend using a big capacity drive (1 TB+) because virtual machines can take up a lot of storage. Please ignore the small capacity as shown in the screenshot. This is a Proxmox instance set up just for this tutorial. (https://imgur.com/CxQlmJr)
  6. Give your disk a name so you can easily recognize it. You will see this name appear in several places throughout Proxmox. I will name it VMs1. (https://imgur.com/FSuEO7o)
  7. Make sure to check the “Add Storage” checkbox.
  8. Next, click the blue “create” button.
  9. You should see a “Done!” text in the pop up like (https://imgur.com/Tkcefb8).
  10. Your LVM menu should now look like this (https://imgur.com/2TLTojv).
8. Creating a virtual machine.
After the set up of your ISO storage and VM storage, we can now make a virtual machine using these two drives. For this tutorial I am going to create a CentOS 7 virtual machine, but you can follow these steps with any operating system. Make sure you have uploaded it to your ISO drive (or your proxmox drive if you skipped step 6). You can upload your operating system ISO’s to the installation drive by going to Datacenter > pve > local (pve) (Or your created directory) > Content > Upload.

An album with all the screenshots about creating a VM can be found here: https://imgur.com/a/p4nIE8v
  1. Navigate to “pve” in the main Proxmox menu on the left.
  2. In the top right corner of the screen, click on the blue “Create VM” button. (https://imgur.com/GbtTJOP). A pop up should appear like this.
    (https://imgur.com/osusmVw)
  3. We will be going over all settings that are necessary for this tutorial. If you want to know more about a certain option, you can press the “help” button in Proxmox.
  4. Give the virtual machine a name and click next. We don’t have to change anything else on the first page of the pop up. (https://imgur.com/osusmVw)
  5. On the “OS” tab, make sure “Use CD/DVD disc image file (iso)” is checked.
    (https://imgur.com/AcTBQma)
  6. For “storage” select the ISO storage disk that you just created. If you skipped step 6, select “local”.
  7. Once you have selected the right storage option, you can select your uploaded ISO image in the “ISO image:” menu. (https://imgur.com/AcTBQma)
  8. Make sure the “Guest OS” options to the right are okay. Proxmox should set these automatically, and you should not have to change anything, but it is always a good idea to double-check these. They should be self-explanatory.
  9. Click next to go to the “System” tab. We will not be making any changes here. Click next again to go to the “Hard Disk” tab.
  10. We want the hard disk of the virtual machine to be on the physical hard drive where we created the LVM setup. Do this by selecting the created LVM at “Storage”. In my case, it is called “VMs1”. (https://imgur.com/Qd3hOqF)
  11. Make sure to assign an appropriate virtual disk size. This should not be larger than the size of the physical disk your VM is on, but make sure to leave enough space for the selected operating system to install. Once you’re done click “next”.
  12. On the CPU tab, enter the number of cores and physical CPUs you want the virtual machine to have access to. Also, make sure to change the CPU type. We strongly recommend you really consider your CPU type as this has a high impact on the performance of your VM. In most cases, selecting “host” will result in the maximum performance[2]. For more information about CPU types, please visit the Proxmox wiki[3]. Once you are done click “next”. (https://imgur.com/c1KJJHR).
  13. On the “Memory” tab enter the amount of ram you want to assign to the VM, then click “next”. We will be using 4 Gigabytes, but you can assign less to CentOS if you want. Remember that different operating systems have different memory requirements. Once done, click next. (https://imgur.com/6NCURyw)
  14. On the network tab, you can configure advanced network configurations for your VM. For simplicity of this tutorial, we will not be changing anything here. Your VM should have networking capabilities, and get it’s own IP address in the network (Bare in mind: in CentOS, the OS we are using, there are some commands needed to get an IP address). Click “next” once you are done. (https://imgur.com/aCEXIwu)
  15. Check if everything is set up correctly. Then click “finish” once you are sure that everything is correct. You can still change settings later, but it is better to have them right on the first attempt.
  16. Now, wait until the virtual machine is created. This can take some time depending on the performance of your server. You will know it’s done when the Status of the “VM ### - Create” task at the bottom of your screen shows ‘Ok“, and when it appears correctly in the main Proxmox menu on the left. (https://imgur.com/e1oROyX)
  17. Congratulations! You’ve just created your first VM in Proxmox. It should have appeared in the menu on the left. (https://imgur.com/zVvfJPL)
To start up the created virtual machine, select the VM, and click “Start” in the top right. Then you can go to the “Console” section after still having the VM selected, and you should see the screen of the machine. (https://imgur.com/CkfE9hh)

9. End result.
Your situation should now be one of the following:
  1. Situation one:
  • You have installed Proxmox on one physical hard drive.
  • You have assigned a second physical hard drive to upload ISO images to, and have uploaded at least one.
  • You have assigned a third physical hard drive and created a virtual machine on it using the uploaded ISO image.
  1. Situation two (if you skipped step 6):
  • You have installed Proxmox on one physical hard drive.
  • You have uploaded at least one ISO image to the boot drive of Proxmox.
  • You have assigned a second physical hard drive and created a virtual machine on it using the uploaded ISO image.
 

ProxmoxHHS

New Member
Oct 9, 2019
3
6
1
25
10. FAQ.
I have more than three drives in my system. What do i do with the rest?

If you have more drives than we used in this tutorial, you can use the remaining drives for anything you want. They can be dedicated to more virtual machine storage by repeating chapter 7 for your remaining disks, used for network storage, and turning your server into a NAS (Network-Attached Storage) in your network. You can search on google for information about the full potential of Proxmox. It can do much more than we covered in this tutorial.


I have heard the ZFS filesystem is better to use in Proxmox, is this true?

Most people will say this is true. However, with this tutorial we really wanted to stick to the basics. ZFS is more complicated to get working and also has several (hardware) requirements. We did not want to go into detail about this because it would make the tutorial much more advanced. We recommend doing some research before using ZFS on Proxmox. See the following link for more information: https://pve.proxmox.com/wiki/ZFS_on_Linux


I think it is better to do x and y. You should have done that instead!

There are many ways to set up Proxmox. In this case, we assume the user is a complete beginner and we wanted to provide a powerful set up that reduces drive failure and improves performance by spreading the load on multiple drives. We think this setup is great, but of course, there are other setups you could use.


My disks are not showing up in Proxmox!

For us, this was not necessary, but you may need to format your hard drives first. While we tried to avoid it, unfortunately the only way to do this is by using the shell. Check the device name on the node > disks. For example, it can be something like “/dev/sdb”. Open the Proxmox shell and use the following command where “/dev/sdb” is your device name:

> root@pve:~# fdisk /dev/sdb

Then type “n” for a new partition:

> Command (m for help): n

Select partition type P, then use the default value for Partition Number, First Sector and Last Sector. You can leave them blank and press [enter]. Next, save the partition with “w”.

> Command (m for help): w

The drive is now ready.
Source: https://www.hostfav.com/blog/index.php/2017/02/01/add-a-new-physical-hard-drive-to-proxmox-ve-4x-5x/


11. Last words.
You have reached the end of this tutorial. We hope you were able to follow all steps without any problems but if you have any questions, please ask them in the comments below and we will do our best to help you further.

This tutorial was also made in the form of a video. You can find it here: https://youtu.be/I-e1_CTa4s0

If any of the linked screenshots have been removed, please let us know in the comments.

References
  1. Proxmox Server Solutions Gmbh (2019, July 4). Main Page. Referenced 16 September 2019, Retrieved from https://pve.proxmox.com/wiki/Main_Page
  2. LnxBil (2017, November 29). Install Proxmox 5.1 on USB Flash Drive?. Referenced on September 23, 2019, Retrieved from https://forum.proxmox.com/threads/install-proxmox-5-1-on-usb-flash-drive.38348/
  3. Proxmox Server Solutions Gmbh (2019, July 16). Qemu/KVM Virtual Machines. Referenced on October 2, 2019, Retrieved from https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!