xenserver you have reached the maximum

Create and Attach Virtual Disk from XE CLI

copy-paste


[root@node-x ~]# xe sr-list name-label="Local storage"

uuid ( RO) : a384983-1e83-f937-.......... <---- copy this uuid for the SR name-label ( RW) : Local storage name-description ( RW) : host ( RO) : hostname.example.com type ( RO) : lvm content-type ( RO) : user [root@node-x ~]#

Get the UUID of the VM you want to attach the disk to: xe vm-list


[root@node-x ~]# xe vm-list name-label=[whatever name-label you gave the vm]

uuid ( RO) : 6c5b2133-fb91-a6......... <---- copy this uuid for the VM name-label ( RW) : vmname power-state ( RO) : running [root@node-x ~]#

Create the Virtual Disk (VDI) xe vdi-create


[root@node-x ~]# xe vdi-create sr-uuid=[the uuid of the sr you copied above] \
name-label=[whatever you want to call the VDI. Quotes if spaces.] \
type=user virtual-size=536870912000 <---- this was about 500GB 5a210b22-459e-5a71-2c6b398e93a7 <----- it returns uuid of the VDI, copy this [root@node-x ~]#

Create the Virtual Block Device (VBD) that the connects the VDI to the VM. xe vbd-create

In XenCenter, you can see the last "Position" I got on virtual disks was 6. So when I add this next block device, I will put it at position 7. In the vbd-create, device=[x] is that "position".


[root@node-x ~]# xe vbd-create vm-uuid=[uid of the vm copied above] device=[next position] \
vdi-uuid=[uid of vdi copied above] bootable=false mode=RW type=Disk

174ca333-36c5-916a-4be3153b01e <---- it returns uuid of the VBD. copy this. [root@node-x ~]#

Plug the VBD into the VM. aka "Activate". xe vbd-plug

At this point, the new disk will show up in XenCenter, but "Active" will say "No" and the Activate button will be available. You should be able to activate just fine here. This actually runs the xe vbd-plug command. You could run this command manually too.


[root@node-x ~]# xe vbd-plug uuid=[the uid of vbd copied above]

[root@node-x ~]# <-- doesn't return anything, just back to shell prompt.

Going back to XenCenter, you can see the virtual disk is now Active : Yes.

Done!

Запись опубликована в рубрике overminds с метками . Добавьте в закладки постоянную ссылку.

Добавить комментарий