How to create a Debian VM in Proxmox and configure networking
This tutorial will teach you how to create a virtual machine on a freshly installed Proxmox VE server. You will learn how to upload an ISO of your choice from Debian. Lastly, you will also learn how you can configure basic networking in order to connect your VM to the internet.
- A Dedicated Server from Snel.com with Proxmox VE operating system installed.
- ISO image file of Debian OS. You can download the file from the Debian website or you can purchase it at Snel.com.
Step 1: Log in to the Proxmox web GUI
primary IP address of your server in the
service details page of your My.snel.com client area.
Open your browser and navigate to
https://your-ip-address:8006. If you wish, you can also use the auto-generated server domain name instead of using the IP address. This can be found on the same page. Eg.
Don’t forget to type
https because Proxmox GUI is only available over a secure connection. It is possible that you will see a warning that says that the certificate is unreliable. If this occurs, you can click on
advanced, and then proceed in the Proxmox web interface.
In the Proxmox GUI login page, type
root as username and the password from the
service details page that can be found in your My.snel.com client area. Leave the
Linux PAM standard authentication in the dropdown and click to the
Login button in order to log in.
Step 2: ISO upload to Proxmox VE
After you’re logged in, on the panel on the left side, you will see the node managed by Proxmox. Enlarge the node to see the list of attached local disks.
After this step, you can click on the
local disk from the panel and then click on the
Content tab to view the list of ISO and container images. You will not see ISO images on a new and fresh installation.
Click on the
Upload button from the content section.
ISO image from the content drop-down. After this, you can select the ISO file that you would like to upload. Click the
Upload button in order to upload the ISO file.
Once the uploading is finished, you will get the see the ISO file in GUI.
Step 3: Creating a VM
Now that we uploaded the ISO file, click on the
Create VM button from the top.
Then a pop-up will open to create a virtual machine.
On the tab
General provide your Virtual Machine a
Name . You are allowed to use the default values for the other fields as well. Click
Next to go on to the OS tab. After that, select
local storage and choose the ISO image that you uploaded. On Guest OS type, select
5.x-2.6 Kernel in the version dropdown.
Leave the default settings under the
System tab and click
Hard Disk tab, choose a storage disk, it doesn’t matter which one you choose. Make sure you give the guest Virtual Machine disk size in GB. Check the
Discard option, this will make sure that a TRIM action in the guest OS will remove the storage space used by deleted files.
You also have the option to choose Raw disk image(raw) or QEMU image format(qcow2). Raw is a little bit faster than qcow2 as it has very little overhead and no associated metadata. Where qcow2 offers extra features such as compression, AES encryption, and incremental backups. Choose based on your use-case.
Next to go to the CPU tab.
CPU tab, select the amount of CPU cores you want to give to the Virtual Machine.
Memory tab, provide the amount of RAM you want to give to the guest Virtual Machine.
Network settings, leave the default settings, and click
Next to go to the Confirm tab.
Review the Virtual Machine configuration once more and click the
Finish button. You will see that the Virtual Machine is created and available on the panel at your left.
Step 4: Install the OS on your VM
Start the Virtual Machine by clicking on the
Start button which can be found at the top of your virtual machine summary interface.
If the Virtual Machine is running, you can click on
Console and then select
A virtual console will be opened which will allow you to install the OS of your choice. Follow the instructions accordingly.
There’s a chance your operating system installer will warn you about a failed automatic networking configuration. You can go on with the installation without a working network interface. We will configure the network after the operating system is installed.
Restart your system after the operating system is installed.
Once your server has restarted, login into your Virtual Machine again using the noVNC console. Click on the
Console dropdown button on top of your virtual machine summary interface and select
noVNC. You should see the login screen of your Virtual Machine.
Log in with the username and password you chose while installing your operating system.
Step 5: Configure Networking
Find out the IP address connected with your server by going to the
IP management page of your server in the Snel client area.
Make a note of any IP address other than the primary IP address of the host.
We’re going to need the
Network Mask, and
Nameservers in the next steps.
On the noVNC terminal, look up the name of the ethernet device by running
ip add. It should show you two interfaces, one
lo, which is the loopback interface. Ignore this one and note the name of the other interface in format
Edit the network configuration file.
Add this following line at the end.
auto ens18 iface ens18 inet static address 128.204.192.xxx netmask 255.255.255.0 gateway 188.8.131.52 dns-nameservers 184.108.40.206 220.127.116.11
Make sure to change
ens18 to your ethernet device name. Also, replace the appropriate values that you got from the
IP Management page of your server in the Snel client area.
Save the file and close the editor.
Bring the device up by running
ip link set ens18 up
Restart the network by running the following command:
systemctl restart networking
resolvconf is not installed, you will need to add nameservers to
resolvconf is not installed by running:
apt -qq list resolvconf
Not getting an output means that the package is not installed on your server. If you do get some output then it means that the package is installed so this allows you to proceed to Step 6.
/etc/resolv.conf file using:
Make sure your add these lines into the file:
nameserver 18.104.22.168 nameserver 22.214.171.124
Save the file and close the editor.
Step 6: Test the Network Connectivity
If you have successfully configured your networking, ping
google.com to see if you are connected to the internet.
You should see a successful response.
In this tutorial, you have learned how to create a VM with Debian in Proxmox VE. This tutorial has also guided you in how to upload the ISO file before creating the Virtual Machine. Furthermore, you have learned how to connect your VM to the internet.