Changes

Workaround Attach Additional Disk to VM

16 bytes added, 13:13, 22 July 2013
/* Step by step */
== Part I ==
* Expand the VM entry for the VM you want to add an additional disk to and note the UUID below VM name ('''$VMUUID''')* Use <code>uuidgen</code> and generate a new UUID ('''$DISKUUID''')* Calculate the size of the new disk in bytes: <code>N * 1073741824</code> for N gigabyte ('''$DISKSIZE''')
* Open the URL http://YOURSTONEYCLOUD/phpldapadmin/ and login using <code>dc=Manager,...</code>
* Navigate to: <code>sstDisk=vda,ou=devices,sstVirtualMachine='''$VMUUID''',ou=virtual machines,ou=virtualization,ou=services,dc=foss-cloud,dc=org</code> using the tree structure on the left* Click on <code>Copy or move this entry</code> and choose <code>sstDisk=vdb,ou=devices,sstVirtualMachine='''$VMUUID''',ou=virtual machines,ou=virtualization,ou=services,dc=foss-cloud,dc=org</code> as <code>Destination DN</code>
* Replace:
** the UUID in <code>sstVolumeName</code>
** and the same UUID in <code>sstSourceFile</code> with '''$DISKUUID''' (warning: in <code>sstSourceFile</code> are at least two UUIDs, replace only the one matching <code>sstVolumeName</code>)** the value in <code>sstVolumeCapacity</code> by '''$DISKSIZE'''
* Click on <code>Create</code> and confirm with <code>Commit</code>
* You should get: <code>Creation successful!</code>
* Note the first UUID in the attribute <code>sstSourceFile</code> ('''$POOLUUID''')
== Part II ==
* Login to the VM node on which the VM is/was running
* Run the following command as root: <code>virsh vol-create-as '''$POOLUUID''' '''$DISKUUID'''.qcow2 '''$DISKSIZE''' --format qcow2 --allocation 0</code>* You should get <code>Vol '''$DISKUUID'''.qcow2 created</code>* Run: <code>chown root:vm-storage /var/virtualization/vm-*/'''$POOLUUID'''/'''$DISKUUID'''.qcow2</code>* Run: <code>chmod g+rw /var/virtualization/vm-*/'''$POOLUUID'''/'''$DISKUUID'''.qcow2</code>
* Switch to the stoney cloud webinterface again and shutdown the VM (if not already done)
* Click first on the <code>edit VM</code> icon and then <code>save</code> (without changing anything)
Bureaucrat, administrator
425
edits