Educational ICT Virtualisation Specialist

Twitter LinkedIn E-mail
Precedence Technologies Ltd
Technology House, 36a Union Lane
Cambridge, CB4 1QB, United Kingdom
T: +44 (0)8456 446 800 / +44 (0)1223 359900
F: +44 (0)8456 446 899 / +44 (0)1223 359459
E: enquiries@precedence.co.uk
XenServer-MoreDisks

Jump To: Support > KB > Citrix > XenServer > MoreDisks

Adding more virtual disks to a VM that says 'You have reached the maximum number of virtual disks allowed for this virtual machine'

The maximum number of virtual disk devices (a.k.a. VBDs) is set by the template that was used when the VM was created and is not alterable. However, you can add more disks from the command line.

Firstly get the UUID of the VM:
[root@xen01 ~]# xe vm-list name-label='My VM'
uuid ( RO)           : c4009665-2769-6d50-8de3-606cc636cf1c
     name-label ( RW): My VM
    power-state ( RO): halted
Next get the UUID of the virtual disk image (VDI) you wish to attach:
[root@xen01 ~]# xe vdi-list name-label='datastore 1'
uuid ( RO)                : 4dd2e2bc-32e9-4261-a090-d22d5597ad72
          name-label ( RW): datastore 1
    name-description ( RW):
             sr-uuid ( RO): b1004a56-3b07-cb91-71df-df67dc22624f
        virtual-size ( RO): 2168958484480
            sharable ( RO): false
           read-only ( RO): false
If you have not yet created the virtual disk image, you can do it through the GUI on the Storage tab of the desired storage repository, or you can do it from the command line if you know the Storage Repository's UUID. This will return the VDI UUID it has just created:
[root@xen01 ~]# xe vdi-create sr-uuid=1f0fa251-8ee4-b94c-36a7-3aef396f4d97 virtual-size=2168958484480
        type=user name-label="more data"
4dd2e2bc-32e9-4261-a090-d22d5597ad72

Finally, look at the storage tab on the VM and pick the next available number in the Position column.

In this case it is 9. Create the VBD to attach the disk image to the VM (the VBD UUID is returned):
[root@xen01 ~]# xe vbd-create vm-uuid=c4009665-2769-6d50-8de3-606cc636cf1c bootable=false
        type=Disk mode=RW device=9 vdi-uuid=4dd2e2bc-32e9-4261-a090-d22d5597ad72
ec691f09-11d1-51a8-f9aa-e7b5f115f29a
If the VM is halted, it will attach when the VM is started. If the VM is already running, you can attach the virtual disk immediately using vbd-plug and the VBD's UUID:
[root@xen01 ~]# xe vbd-plug uuid=ec691f09-11d1-51a8-f9aa-e7b5f115f29a
© Copyright Precedence Technologies 1999-2021
Page last modified on May 02, 2021, at 05:24 PM by sborrill