1

I have a cluster of 4 Xenserver 6.2 servers, as well as one independent XenServer for a customer which have are attached to a very questionable (meaning that the drive hot-swapping causes it to break) SAN (Drobo B1200i). We are building a whole new pool of XenServers with a QNAP as the main SR, in addition to local attached storage in an adjoining rack. I have been contemplating the best way to go about this move of data, most should be easy using Xackup pool-to-pool transfer tool, however there are 2 very large disks. One of them is our shared Web Server, this server is about 700-800 gb, this is on the cluster. The other is a customer windows web server on a standalone XenServer and that VM is around 400GB, both have a virtual allocation of 2000gb.

What would be the best way to go about moving these without taking them offline for a significant amount of time? The customer server is not moving from it's hardware, just the SR.

Riley
  • 103
  • 2
  • 14

2 Answers2

4

This really should be a comment to yagmoth555's answer, but I don't yet have the rep.

I'm aware this is is old, but still posting for future reference.

according to http://wiki.xensource.com/wiki/Disk_import/export_APIs you can export and import a block-level diff between a snapshot and the current state, so the process would be:

  1. Stop the VM (briefly)
  2. Take snapshot SNAPUUID=$(xe vm-snapshot vm=$VM_NAME new-name-label=$SNAPSHOT_NAME)
  3. start the vm
  4. export the snapshot (full) xe vm-export vm=$SNAPUUID filename=$BACKUPFILE
  5. import the snapshot on other host and SR; GUI (do not start it)
  6. shut down the original VM
  7. export the delta xe vdi-export uuid=$VDI-UUID base=$SNAPUUID filename=delta.vhd format=vhd
  8. import the delta on new host and sr xe vdi-import uuid=$NEW_VDI_UUID filename=delta.vhd format=vhd
  9. Start machine on new host

Assuming that the delta will not be too large, the downtime should be minimal. A word of warning: I have not actually tried this.

If the servers are in the same pool, you can simply move the VM between SRs, even while it is running. Just did this with a 30 GB Disk (on XenServer 6.5).

TobiM
  • 131
  • 1
  • 7
1

The new server should be in the same pool, as they will share both SR and VM. Else your SR are independant and your VM too.

Disable HA, and do a pool force join (in CLI) if the new server CPU does not fit the old server. (unless you can MASK)

Without downtime it would be hard, as you can't move/copy the volume easily.

I would clone the volume with a bootable media clone software (acronis, etc..) and I would detach and re-attach the new volume from the new SR to re-dump the data. (as ti's a way to do a out of the storage backup at the same time)

Or in the console directly you can issue that to copy from the xen directly, but I didnt tested it that way;

xe vm-list

xe sr-list  (to find uuid of the destination SR)

xe vm-copy vm="server" sr-uuid=xxx-xxxx-xxxx-xxxxxx new-name-label="Copy of server" new-name-description="New Description"
yagmoth555
  • 16,300
  • 4
  • 26
  • 48
  • 1
    If I used a cloning software, the VM would have to be down for the entire time I was cloning it, this would take hours, as it is a very large disk. Have you ever tested XenServer Storage Motion? You can allegedly move a disk live, while the VM is running. – Riley Dec 09 '14 at 17:47
  • @Riley - Oh, no. I didnt know that option. Seem to only need an advance license, and be in the same pool. Can be a good way ofcourse if it work good. – yagmoth555 Dec 09 '14 at 18:04
  • Ah yes, this is something that I do not have. – Riley Dec 09 '14 at 19:24
  • @Riley - You will have to fallback to the solutions I gave then, unless someone got another method – yagmoth555 Dec 09 '14 at 21:02
  • What about snapshot export – Riley Dec 09 '14 at 21:40
  • @Riley - SAN snapshot ? they don't talk between the two SAN. Xen snapshot, it's done on the SR too.. That bring you to the same problem, while it will copy the snapshot, you can't have the VM running, the two disk will be out of sync. (it's the same as the xe vm-copy at this point) – yagmoth555 Dec 10 '14 at 15:18
  • Right. But you can export a XenServer snapshot while it's running – Riley Dec 10 '14 at 15:19
  • @Riley - Yes, but a snapshot is a snapshot at time X of what the server was having on disk, so if you let the server run, the snapshot and the other VM will not have the same data. The snapshot copy to the other SR will take time.., Same as the xe vm-copy – yagmoth555 Dec 10 '14 at 15:47
  • I was not aware you could do an xe vm copy while the vm was running. – Riley Dec 10 '14 at 15:48
  • @Riley - You can't, but exporting a snapshot, while leaving the server running, you can't, (unless you dont care the data on disk that can be write). So that will end the same way, server down – yagmoth555 Dec 10 '14 at 15:49
  • you can export a xenserver snapshot while it's running – Riley Dec 11 '14 at 02:39
  • @Riley - Yes, i agree with you, but to copy the snapshot to your other san, how much time it will take ? If more than 30m, will you stil use the snapshot copy, as you want to continue to run the VM. It was my point – yagmoth555 Dec 11 '14 at 03:28