Skip to content
SecBytes
Menu
  • Home
  • Sumit Shrivastava (@invad3rsam)
  • Contact Me
Menu

Guide to Creating Virtual Machines from Proxmox Templates

Posted on January 6, 2025January 6, 2025 by Sumit

I have showed how to create VM templates in my blog earlier – Creating VM Templates in Proxmox – SecBytes. In this blog, I will walk you through a quick guide on how to create the virtual machines from the templates. This blog is a generalised version for creating virtual machines from the templates, which I shall refer to in my upcoming blogs wherever I need to clone the virtual machines in my environment.

The only prerequisite here is to have a template ready for your `machine

Follow the below steps to create a virtual machine from the template

  1. Select the template, right click and then select ‘Clone’.
    Clone the VM
  2. Add the required details as mentioned below.
    • VM ID: A unique numeric identifier for your VM
    • Name: Name for your VM
    • Mode: Full Clone (this creates an independent VM i.e. any changes to the template will not impact the VM)
      virtual machine details
  3. Once the above details are added, click on the ‘Clone’ button on the dialog box and wait for the cloning process to finish which can be seen in the ‘Tasks’ section on the lower bottom of the Proxmox manager screen. Once the cloning is done, the cloning task will show an ‘End Time’.
    VM Cloning in Progress
    Cloning process completed
  4. Once, successfully cloned, you should now see your VM on the right-hand side ‘Server View’ of the screen. Click on the VM and navigate to ‘Hardware’ section as shown in the diagram below. Change the required hardware and then boot the virtual machine. Please note, when you resize your hard disk, it adds the space added by you to the hard disk. In case if you need to shrink the space, then follow the section below. You can remove the existing hard disk and add the new hard disk as per the steps given below. Your virtual machine should be initialized quickly in few minutes and your bare minimum Ubuntu server (or any other OS as per the template) is now up and running.
    Edit Hardware

Steps to shrink hard disk space in the virtual machine (before initial boot)

In case you need to shrink the hard disk size, you can follow the below steps. The steps to download an Ubuntu cloud-init images is described in Creating VM Templates in Proxmox – SecBytes. Now if you have an Ubuntu minimal 24.04 server cloud-init image which you have resized to 64 GB and now need to be reduced to 32 GB, you can run the following command.

# cp ubuntu-24.04_64G.qcow2 ubuntu-24.04_32G.qcow2

# qemu-img resize --shrink ubuntu-24.04_32G.qcow2 32G
Image resized.

# qm importdisk <VM_ID> ubuntu-24.04_32G.qcow2 <VM_VOLUME_NAME>
importing disk 'ubuntu-24.04_32G.qcow2' to VM <VM_ID> ...
transferred 0.0 B of 32.0 GiB (0.00%)
transferred 331.0 MiB of 32.0 GiB (1.01%)
transferred 675.0 MiB of 32.0 GiB (2.06%)
transferred 1006.0 MiB of 32.0 GiB (3.07%)
transferred 1.3 GiB of 32.0 GiB (4.08%)
transferred 1.7 GiB of 32.0 GiB (5.20%)
.
.
.
transferred 30.8 GiB of 32.0 GiB (96.15%)
transferred 31.1 GiB of 32.0 GiB (97.16%)
transferred 31.4 GiB of 32.0 GiB (98.17%)
transferred 31.7 GiB of 32.0 GiB (99.18%)
transferred 32.0 GiB of 32.0 GiB (100.00%)
transferred 32.0 GiB of 32.0 GiB (100.00%)
unused0: successfully imported disk '<VM_VOLUME_NAME>:vm-<VM_ID>-disk-<DISK_ID>'
resize disk
hard disk resize 2

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook

Related

Post navigation

← Self-Hosted Kubernetes Cluster in your Home Lab
Setting Up Wazuh Server – Part 1 (Wazuh Indexer) →

Recent Posts

  • Setting Up Wazuh Server – Part 3 (Wazuh Dashboard)
  • Setting Up Wazuh Server – Part 2 (Wazuh Manager)
  • Setting Up Wazuh Server – Part 1 (Wazuh Indexer)
  • Guide to Creating Virtual Machines from Proxmox Templates
  • Self-Hosted Kubernetes Cluster in your Home Lab

Categories

  • Application Security Assessment (2)
  • Capture The Flag (1)
  • CVE (1)
  • DevSecOps (4)
  • Lab Solution (1)
  • Metasploit (2)
  • Miscellaneous (5)
  • Network Penetration Testing (3)
  • Phishing (1)
  • Tips and Tricks (8)

SecBytes

  • GitHub
  • Twitter
  • Facebook

RSS Exploit DB Update

  • [local] Microsoft Windows 11 Pro 23H2 - Ancillary Function Driver for WinSock Privilege Escalation May 9, 2025
    Microsoft Windows 11 Pro 23H2 - Ancillary Function Driver for WinSock Privilege Escalation
  • [local] VirtualBox 7.0.16 - Privilege Escalation May 9, 2025
    VirtualBox 7.0.16 - Privilege Escalation
  • [webapps] WordPress Depicter Plugin 3.6.1 - SQL Injection May 9, 2025
    WordPress Depicter Plugin 3.6.1 - SQL Injection

Legal

  • Disclaimer
  • Privacy Policy
  • Cookie Policy

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

© 2025 SecBytes | Powered by Minimalist Blog WordPress Theme
 

Loading Comments...