List of steps to create a new vm starting from scratch exclusively via CLI.

treje

Member
Sep 20, 2019
2
0
21
42
Hi, I'm trying to create vm, on my proxmox test cluster with ceph storage, virtual machine exclusively via cli.

I understood that I have to use the qm command, but I did not understand where in the command the hard drive is created like when I create it from the GUI.

Could some of you guide me "in translating" everything that is usually done via GUI in CLI or if you have example links for the various cases?

This is my starting point where I got stuck:

qm create 105 --name vm1 --autostart 1 --balloon 2048 --memory 2048 --sockets 1 --cores 1 --smp 1 --keyboard it --numa 1 --ostype l26 --start 1 --storage cephsdata_storage --cdrom cephfs:iso/Centos7Kickstart.iso --scsihw virtio-scsi-pci --scsi0

the iso image is "cooked" specifically with kickstart, it is a centos 7, so that once started it installs in "unattended" mode.

I am also attaching the screenshots of all the steps I take via the GUI.

cephfs is the storage part of the ceph cluster dedicated to ISOs,
while cephfs_data_storage_data is the part dedicated to storing the VMs inside the ceph cluster.

BR !
 

Attachments

  • Immagine 1.PNG
    Immagine 1.PNG
    44.8 KB · Views: 18
  • Immagine 2.PNG
    Immagine 2.PNG
    49.7 KB · Views: 18
  • Immagine 3.PNG
    Immagine 3.PNG
    42 KB · Views: 9
  • Immagine 4.PNG
    Immagine 4.PNG
    78.8 KB · Views: 10
  • Immagine 5.PNG
    Immagine 5.PNG
    97.2 KB · Views: 10
  • Immagine 6.PNG
    Immagine 6.PNG
    39.7 KB · Views: 9
  • Immagine 7.PNG
    Immagine 7.PNG
    47.9 KB · Views: 11
  • Immagine 8.PNG
    Immagine 8.PNG
    60.8 KB · Views: 14
Do you also know if there is a log on proxmox that can be enabled or that it is already enabled that "record" all parameters given by gui or command line when creating vm?

BR
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!