[PVE-User] Manpage qm
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Oct 12 15:54:19 CEST 2016
On Wed, Oct 12, 2016 at 03:42:19PM +0200, Karsten Becker wrote:
> Hi,
>
> we are currently sitting here in the advanced training and try to create
> a VM from commandline according to the manpage of qm.
>
> We are reading this in the manpage:
>
> > -virtio[n] [file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>]
> > [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>]
> > [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>]
> > [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>]
> > [,werror=<enospc|ignore|report|stop>]
>
> but this will not work:
>
> > qm create 101 -memory 1024 -name CLI-test -ostype l26 -sockets 1
> -cores 2 -numa 1 -net0 model=virtio,bridge=vmbr0,queues=2 -net1
> model=virtio,bridge=vmbr1,queues=2 -virtio0 local,size=5,format=qcow2
> -ide2 local:iso/debian-8.6.0-amd64-netinst.iso,media=cdrom
>
> You will have to use this instead:
>
> > qm create 101 -memory 1024 -name CLI-test -ostype l26 -sockets 1
> -cores 2 -numa 1 -net0 model=virtio,bridge=vmbr0,queues=2 -net1
> model=virtio,bridge=vmbr1,queues=2 -virtio0 local:5,format=qcow2 -ide2
> local:iso/debian-8.6.0-amd64-netinst.iso,media=cdrom
>
> What do we overlook? Or is the manpage simply wrong?
the regular syntax (for VMs) is either
- "mystorage:volumeid" (for existing PVE managed volumes) or
- "/path/to/physical/block/device" (for pass-through of existing
physical block devices not managed by the PVE storage layer)
there is a special case for allocating and assigning volumes in one go,
by giving either "N" or "mystorage:N" as "volume", this will allocate a
volume of size N GB (on "mystorage" or on "local" if omitted).
>
> The fact that <volume> means the storage device is not really obvious.
> That the size=5 is not working is not understood by us.
the size property tells you the size, not the other way round. the full
man page / documentation tells you this:
size=<DiskSize>
Disk size. This is purely informational and has no effect.
>
> Some more comments/examples for such an important command (in case of
> automation) would be very nice in the wiki.
I agree. There is the new reference documentation which already contains
a lot more in-depth information about various areas of PVE:
http://pve.proxmox.com/pve-docs/
some parts of it are also available on the wiki in the category
"Reference Documentation".
contributions / feedback always welcome, see
http://pve.proxmox.com/pve-docs/pve-admin-guide.html#_improving_the_proxmox_ve_documentation
More information about the pve-user
mailing list