User Tools

Site Tools


virtualization:xenserver:xenserver_storage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualization:xenserver:xenserver_storage [2017/05/08 10:47]
gcooper
virtualization:xenserver:xenserver_storage [2020/05/14 09:48] (current)
gcooper
Line 30: Line 30:
 ll /var/run/sr-mount/ ll /var/run/sr-mount/
 </file> </file>
 +
 +===== Move a Storage Repository =====
 +
 +https://www.xenlens.com/move-lvmohba-shared-storage-repository-between-different-pools-or-hosts-with-vm-metadata-backup-and-restore/
  
 ===== Add a USB disk as a local SR ===== ===== Add a USB disk as a local SR =====
Line 45: Line 49:
 ===== Expose Unattached VDIs ===== ===== Expose Unattached VDIs =====
  
-:!: Careful! The last time I ran this, all disks were detached besides running VMs!  8-o+:!: **Be careful! The last time I ran this, all disks were detached besides running VMs!**  8-o
  
-Run this command and rescan the SR to see if it illuminates deletion candidates:+Run this command then rescan the SR to see if it illuminates deletion candidates:
  
 <file> <file>
-for uuid in $(xe vdi-list sr-uuid=<SR-UUID> | grep uuid | grep -v sr-uuid awk '{ print $5 }'); do xe vdi-forget uuid=$uuid; done+for uuid in $(xe vdi-list sr-uuid=<SR-UUID> --minimal tr ',"\n"); do xe vdi-forget uuid=$uuid; done
  
 xe sr-scan uuid=<SR-UUID> xe sr-scan uuid=<SR-UUID>
Line 63: Line 67:
 :!: Creating a full copy of a VM will also have the effect of consolidating all its virtual disks (parent-child). :!: Creating a full copy of a VM will also have the effect of consolidating all its virtual disks (parent-child).
  
-:!: To move a VHD to a new SR, copy then delete the original when you are sure the new copy is working well.+:!: To move a VHD to a new SR, copy, attach, then delete the original when you are sure the new copy is working well.
  
 <file> <file>
Line 143: Line 147:
 </file> </file>
  
-===== Detach a VHD from the Control Domain ===== 
- 
-List out the VBD (connector object between VM and VDI) based on the VDI UUID: 
- 
-<file> 
-xe vdi-list | grep -B1 -A5 -i "part-of-vm-name" 
- 
-xe vbd-list vdi-uuid=<UUID of VDI> 
-</file> 
- 
-Once done, you want to first try to make VBD inactive (it may already be inactive), 
- 
-<file> 
-xe vbd-unplug uuid=<UUID of VBD> 
-</file> 
- 
-Once done, you can then break the connection: 
- 
-<file> 
-xe vbd-destroy uuid=<UUID of VBD> 
-</file> 
- 
-Done! 
virtualization/xenserver/xenserver_storage.1494262077.txt.gz · Last modified: 2017/05/08 10:47 by gcooper