Cloud-Init Docs

Discussion in 'Proxmox VE: Installation and configuration' started by XN-Matt, May 17, 2018.

Tags:
  1. XN-Matt

    XN-Matt Member
    Proxmox VE Subscriber

    Joined:
    Aug 21, 2017
    Messages:
    34
    Likes Received:
    1
    The docs for cloud-init are a little thin on the ground being such a new feature.

    What is the expected behaviour for this in proxmox? Should the cloud-init drive remain always connected? if so, after the machine is shut down and then started again, it fails with the error:

    Code:
    qemu-img: Could not open '/dev/vg-1/vm-xxx-cloudinit': Could not open '/dev/vg-1/vm-xxx-cloudinit': No such file or directory
    TASK ERROR: command 'set -o pipefail && genisoimage -R -V cidata /run/pve/cloudinit/xxx/ | qemu-img dd -n -f raw -O raw 'isize=0' 'osize=0' 'of=/dev/vg-1/vm-xxx-cloudinit'' failed: exit code 1
    If not, as proxmox knows the VM has stopped, can it not remove that automatically instead of leaving in a half broken state?

    Either way, if we know we need to delete it on a shutdown, that's OK too but would rather work with the expected process than one that we're getting right now.
     
  2. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,406
    Likes Received:
    213
    this should not happen, can you post the vm config and the storage config?
     
  3. XN-Matt

    XN-Matt Member
    Proxmox VE Subscriber

    Joined:
    Aug 21, 2017
    Messages:
    34
    Likes Received:
    1
    Where do you want the storage config from?

    VM:

    Code:
    agent: 1
    boot: dcn
    bootdisk: virtio0
    cipassword: [removed]
    ciuser: [removed]
    cores: 3
    hotplug: disk,network,usb,memory,cpu
    ide0: storage-1:vm-106-cloudinit,media=cdrom
    ipconfig0: ip=x.x.x.x/24,gw=x.x.x.x
    memory: 2048
    name: xxxxxx
    net0: virtio=xx:xx:xx:xx:xx:xx,bridge=vmbr0
    numa: 1
    onboot: 1
    ostype: l26
    scsihw: virtio-scsi-pci
    searchdomain: xxxxx
    smbios1: uuid=34b69428-f82e-4e3f-8a1f-f868d2b6769c
    sockets: 1
    sshkeys: [removed]
    tablet: 0
    virtio0: storage-1:vm-xxx-disk-1,cache=writeback,size=30G
     
  4. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,406
    Likes Received:
    213
    /etc/pve/storage.cfg
     
  5. XN-Matt

    XN-Matt Member
    Proxmox VE Subscriber

    Joined:
    Aug 21, 2017
    Messages:
    34
    Likes Received:
    1
    For where it is stored.

    Code:
    iscsi: c1-sp1
        portal x.x.x.x
        target c1-sp1
        content images
    
    lvm: storage-1
        vgname vg-1
        base c1-sp1:0.0.0.scsi-xxxxxx
        content rootdir,images
        shared 1
     
  6. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,406
    Likes Received:
    213
    what does lvs say?
     
  7. XN-Matt

    XN-Matt Member
    Proxmox VE Subscriber

    Joined:
    Aug 21, 2017
    Messages:
    34
    Likes Received:
    1
    For that cloud-init:

    Code:
      vm-106-cloudinit vg-1 -wi-ao----   8.00m
    It has been running since it was used. If I was to stop the VM and then start again, it would fail.

    Would you like the output from the command after doing that?
     
  8. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,406
    Likes Received:
    213
    yes please
     
  9. XN-Matt

    XN-Matt Member
    Proxmox VE Subscriber

    Joined:
    Aug 21, 2017
    Messages:
    34
    Likes Received:
    1
    Done:

    Code:
      vm-106-cloudinit vg-1 -wi-------   8.00m
     
  10. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    2,406
    Likes Received:
    213
    ok i could reproduce it and find the error, i sent a patch to the pve-devel list
     
    XN-Matt likes this.
  11. XN-Matt

    XN-Matt Member
    Proxmox VE Subscriber

    Joined:
    Aug 21, 2017
    Messages:
    34
    Likes Received:
    1
    Great thanks. Will wait for that to be pushed out to an update. :)
     
  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