create kvm vm using qm command

lozair

Member
Nov 4, 2008
89
0
6
Hi all,
i attempt to create new vms in proxmox using command line.
Reading man and some posts on the forum but i encounter a problem with vm disk storage.

I use an LVM storage in proxmox, the name of this storage is "guests" in the web interface.

I launch the following command :

qm create 104 --memory 1024 --sockets 1 -ostype l26 --onboot yes --keyboard fr --name test104 --acpi yes --kvm yes --vlan3 virtio=00:16:3E:45:68:23 --virtio0 'guests:vm-disk-104-1' --virtio0 8

But the command always create the vm disk to the default "local" storage.

Thks for your help
 
create the VM via web interface and the log will show you the right command. now, delete the VM and execute the command on the console.

here is an example:

Code:
qm create 103 --cdrom nfs-iso:iso/debian-6.0.1-amd64-BD-1.iso --name squeeze-bd --vlan0 virtio=62:57:BC:A2:0E:18 --virtio0 tbdisk:10,format=raw --bootdisk virtio0 --ostype l26 --memory 512 --onboot no --sockets 1
 
create the VM via web interface and the log will show you the right command. now, delete the VM and execute the command on the console.

here is an example:

Code:
qm create 103 --cdrom nfs-iso:iso/debian-6.0.1-amd64-BD-1.iso --name squeeze-bd --vlan0 virtio=62:57:BC:A2:0E:18 --virtio0 tbdisk:10,format=raw --bootdisk virtio0 --ostype l26 --memory 512 --onboot no --sockets 1

Hi, where does one look for this command? which log file? where it is?
 
in console root@host-02:~# man qm all the info in there.

Can't find any logging that lists the qm create command in both the Proxmox aswell as in the Guest... could you be more specific in the log file location??
Would be nice if I could create similar KVM's from the command line, instead of using the GUI..

Thanks!
 
  • Like
Reactions: imranrazakhan

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!