Command line promox

naturlight

Member
Jan 2, 2011
65
0
6
First , hello everybody !
I'm new on promox and i have some questions

- I read a lot of about KVM , it's possible to create "template" to create the server ?
For example i created a windows 7 with KVM and it's work perfectly, i would like create the same without each time to the install it's possible ?

- If i create a KVM vm with qm, promox will see it ?

Could you provide me the ligne code used by promox to create this server :
name: test.com
ide2: local:iso/windows7-pro_x86.iso,media=cdrom
vlan0: rtl8139=02:00:00:D1:E0:DF
bootdisk: ide0
ostype: other
ide0: local:103/vm-103-disk-1.raw
memory: 2048
onboot: 1
sockets: 1

I read the QM info on the promox wiki, but i'm not sure .. promox create automatically a image.raw before not ?

Thanks in advance,
Regards
 
I suggest you do a backup/restore. check the options for qmrestore (man qmrestore). you can also create multiple VM´s from one backup.

Code:
qmrestore(1)                                                                                             Proxmox Documentation                                                                                             qmrestore(1)

NAME
       qmrestore - restore QemuServer vzdump backups

SYNOPSIS
       qmrestore [OPTIONS] <archive> <VMID>

        --info                    read/verify archive and print relevant
                                  information (test run)

        --unique                  assign a unique random ethernet address

        --storage <STORAGE_ID>    restore to storage <STORAGE_ID>

        --prealloc                never generate sparse files

        --repeat <number>         repeat the restoration process with
                                  VMID numbers incremented per run

DESCRIPTION
       Restore the QemuServer vzdump backup <archive> to virtual machine <VMID>. Volumes are allocated on the original storage if there is no "--storage" specified.

SEE ALSO
           vzdump(1) vzrestore(1)

1.1                                                                                                            2010-12-06                                                                                                  qmrestore(1)
 
template: no, or better, think about it as a phisical computer. You can clone the hd, but the "template stuff" can only depend on your scripts or 3rd party ones, if exist. For the Win7 problem, you can "clone" (copy) the raw image produced by proxmox to a different raw image of a new created VM. Then you have to change some stuff that have to be unique to each machine, like mac address or M$evil stuff.
Have a look at http://pve.proxmox.com/wiki/Duplicate_Virtual_Machines
command line: when you create a vm, you can then know how proxmox will run that kvm vm with this:
qm showcmd vmid
(i.e. qm showcmd 101)
but the creation part is shown in the web interface itself during creation (look at it carefully...).
And yes, when you create a vm from proxmox web interface, it creates the .raw too under p { margin-bottom: 0cm; }/var/lib/vz/images/ (this is a simplification, because with LVM storage it can create a LVolume instead... but consider this "advanced topic" for now).
 
pls no empty postings. if you have any further question to this topic just ask - if you have a new question just open a new thread.
 
Sorry.
I tried : /usr/bin/kvm -monitor unix:/var/run/qemu-server/105.mon,server,nowait -vnc unix:/var/run/qemu-server/105.vnc,password -pidfile /var/run/qemu-server/105.pid -daemonize -usbdevice tablet -name vm05.net -smp sockets=4,cores=1 -nodefaults -boot menu=on -vga cirrus -tdf -k fr -drive file=/var/lib/vz/images/105/vm-105-disk-1.raw,if=ide,index=0,boot=on -drive file=/var/lib/vz/template/iso/ubuntu-10.04-dvd-amd64.iso,if=ide,index=2,media=cdrom -m 2048 -netdev type=tap,id=vlan0d0,ifname=vmtab105i0d0,script=/var/lib/qemu-server/bridge-vlan -device rtl8139,mac=02:00:66:2F:7F:D1,netdev=vlan0d0 -id 105 -cpuunits 1000

But i get an error like /var/lib/vz/images/105/vm-105-disk-1.raw does not exist ..
Which operations did promox before the QM command ?
If i create VM from QM , will i see it under the promox panel ?

Regards,
 
If you create a new KVM the command is displayed on the web interface.
 
In promox i only see :
/usr/sbin/qm start 103
VM 103 started

Which operations did promox before the QM command ?
If i create VM from QM , will i see it under the promox panel ?

Regards,
 
create a NEW KVM guest via the web.

if you want the see the command used starting a ALREADY created KVM guest.

Code:
qm showcmd VMID

(replace VMID with your VM number)
 

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!