Unable to parse directory volume name with pct create

Discussion in 'Proxmox VE: Installation and configuration' started by zenny, Jun 23, 2019.

  1. zenny

    zenny Member

    Joined:
    Jul 7, 2008
    Messages:
    71
    Likes Received:
    0
    Hi,

    Tried to create a lxc container over command line:

    Code:
    # pct create 108 local:vztmpl/debian-9.0-standard_9.7-1_amd64.tar.gz --hostname server1.name.dom --cpulimit 1 --cpuunits 1024 --memory 512 --swap 1024 --ostype debian --onboot 1 --net0 name=eth0,bridge=vmbr0,gw=192.168.63.1,ip=192.168.63.108/24 --rootfs local:vm-108-disk-1.raw,size=12G --password
    Enter password: 
    Retype password: 
    unable to parse directory volume name 'vm-108-disk-1.raw'
    [Exit 255]
    
    Same error when trying with 'vm-108-disk-1' and 'vm-108-disk-0'.

    PVE is installed to a remote server with LVM (therefore no way to upgrade to v5) without much complexity as evident from:

    Code:
    # cat /etc/pve/storage.cfg
    dir: local
            path /var/lib/vz
            content iso,backup,rootdir,images,vztmpl
            maxfiles 0
            shared 0
    Could not figure out any relevant thread in the forum. Thanks in advance for any pointer.

    Cheers,
    /z
     
  2. sb-jw

    sb-jw Active Member

    Joined:
    Jan 23, 2018
    Messages:
    547
    Likes Received:
    48
  3. zenny

    zenny Member

    Joined:
    Jul 7, 2008
    Messages:
    71
    Likes Received:
    0
    @sb-jw: Thanks for the pointer.

    Appending the part with:

    Code:
    --storage local --rootfs volume=vm-108-disk-1.raw,size=12G
    as well as with:

    Code:
    --storage local --rootfs volume=vm-108-disk-1,size=12G
    fails to create the container with the following error:

    to comply with what pct manpage states:

    Cheers,
    /z
     
  4. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    3,611
    Likes Received:
    328
    if you want to create a new volume, the syntax is

    Code:
    --rootfs STORAGE:SIZE
    
    the syntax is a little hard to see, but it is in the documentation https://pve.proxmox.com/wiki/Linux_Container

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. sb-jw

    sb-jw Active Member

    Joined:
    Jan 23, 2018
    Messages:
    547
    Likes Received:
    48
    Instead of "--storage local --rootfs volume=vm-108-disk-1,size=12G" you should use: "--rootfs volume=ceph-customer:12". "ceph-customer" is my Storage and "12" is the Size.

     
  6. zenny

    zenny Member

    Joined:
    Jul 7, 2008
    Messages:
    71
    Likes Received:
    0
    In my OP (https://forum.proxmox.com/threads/unable-to-parse-directory-volume-name-with-pct-create.55373/), I guess I specified exactly the same to get the errror:

    Code:
    --rootfs local:vm-108-disk-1.raw,size=12G
    Also tried with:

    Code:
    --storage local --rootfs local:volume=vm-108-disk-1,size=12G
    but got:

    That made me to post here in the first count! Parsing errors. What exactly should be the name of the volumes? Just confused.

    Cheers
     
    #6 zenny, Jun 24, 2019
    Last edited: Jun 24, 2019
  7. fabian

    fabian Proxmox Staff Member
    Staff Member

    Joined:
    Jan 7, 2016
    Messages:
    3,270
    Likes Received:
    505
    the volumes are generated for you - you just need to pass in the size, e.g.:
    Code:
    --rootfs local:12
    for a 12G rootfs on the storage called 'local'
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    zenny likes this.
  8. zenny

    zenny Member

    Joined:
    Jul 7, 2008
    Messages:
    71
    Likes Received:
    0
    @fabian , Thanks for the nifty pointer.

    But there appears to be a size mismatch, created 12G:

    Code:
    # pct config 108
    arch: amd64
    hostname: hdi.loc
    memory: 1024
    net0: name=eth0,bridge=vmbr0,gw=192.168.63.1,hwaddr=42:E4:13:94:32:93,ip=192.168.63.108/24,type=veth
    onboot: 0
    ostype: ubuntu
    rootfs: local:108/vm-108-disk-1.raw,size=12G
    swap: 2048
    
    And inside the container, it only shows 4G:

    Code:
    # ip addr show | grep inet
        inet 127.0.0.1/8 scope host lo
        inet 192.168.63.108/24 brd 192.168.63.255 scope global eth0
    # df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/loop2      3.9G  2.3G  1.4G  62% /
    none            492K     0  492K   0% /dev
    tmpfs          1000M     0 1000M   0% /dev/shm
    tmpfs          1000M  284K 1000M   1% /run
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs          1000M     0 1000M   0% /sys/fs/cgroup
    tmpfs           200M     0  200M   0% /run/user/0
    tmpfs           200M     0  200M   0% /run/user/118

    Hmmm...
     
    #8 zenny, Jun 27, 2019
    Last edited: Jun 27, 2019
  9. fabian

    fabian Proxmox Staff Member
    Staff Member

    Joined:
    Jan 7, 2016
    Messages:
    3,270
    Likes Received:
    505
    the "size" parameter in the mpX/rootfs property string is informational only - changing it won't change the size of the volume, you need to use the "resize" API for that..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice