Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-7035

prlctl set VMID --device-add hdd does not create hdd image file

    Details

      Description

      According to documentation prlctl set VMID --device-add hdd should create
      hdd image file if it does not exist.
      However seems it does not work as it described.

      Please take look at:
      https://forum.openvz.org/index.php?t=msg&th=13530&goto=53365&S=f83c832c8c93efde5084068352b92187#msg_53365

      https://docs.virtuozzo.com/virtuozzo_7_command_line_reference/managing-virtual-machines/prlctlvm.html#managing-virtual-devices
      "
          prlctl set <VM_name> {--device-add hdd | --device-set hdd<N>}
          [--image <file>] [--size <size>] [--iface <ide|scsi|virtio>]
          [--subtype <virtio-scsi|hyperv>] [--position <pos>]
          [--enable|--disable]

          --device-set hdd<N> Modifies the parameters of an existing virtual hard disk.
          Virtual hard disks are named using the hdd<N> format where <N> is the drive index number starting from 0 (e.g., hdd0, hdd1). To obtain the list of disk names, use the prlctl list command with the --info option.

          --image <file>
          Specifies an image file that will be used to emulate the virtual disk.

          If the specified image does not exist, it is created and used to emulate the virtual hard disk.
          If the specified image exists, it is used to emulate the virtual hard disk.
      "

      prlctl set VMNAME --device-add hdd --image /home/hdd/VMNAME(.hdd)
      Creating hdd1 (+) scsi:1 image='/home/hdd/VMNAME.hdd' subtype=virtio-scsi

      VM configuration validation result(s) :
      * The image file "/home/hdd/VMNAME" used by hard disk 2 does not exist.Hard disk 2 will not be connected at the virtual machine startup.
      Failed to configure the virtual machine.

      The instruction is not clear for me.
      What I did to resolve this issue:

      prlctl set VMNAME --device-add hdd
      mv /vz/vmprivate/ID/harddisk1.hdd /home/hdd/
      prlctl set VMNAME --device-set hdd1 --image /home/hdd/harddisk1.hdd

      This does not work for me with the latest version:
      If the specified image does not exist, it is created and used to emulate the virtual hard disk.

        Attachments

          Activity

            People

            • Assignee:
              igor Igor Sukhih
              Reporter:
              vvs Vasily Averin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: