Connecting The Dots Seeing things past it's face value

5Feb/100

VirtualIron to Xen Migration Good to Know…

This week I have been migrating a customer that was on a Single User edition of Virtual Iron... Some of you may remember that Virtual Iron as lame as it was, would never support you in a production environment with this config. However we did it all the time as it was perfectly safe for the small business user.

So back to the goods, We now standardize on XEN mostly because of its tremendous support in the opensource community and due to the many features you get for free.

 But how do you go from one virtualization platform to another?
Easy, Xen (and some others) have tools that allow you to do a V-V migration. This tool is called Xen Convert. Located here:
http://www.citrix.com/English/ss/downloads/details.asp?downloadId=1857892&productId=683148

 A little about the environment first.. Being this was a Virtual Iron Single edition server this means the server is being used and we dont want to disrupt business to much during transfers and you want to CYA if the transfers dont work!! So we used another server that was spare to act as the new xen temporary host. After we transfer and test for a few days we will kill the VI server all together. Install XEN and redo the storage repositories, then transfer from the temp machine to the new primary.

Once you have XenConvert you can simply install this in your virtual machine and tell it to convert "This Machine" to the xen server. You will need a workspace (area for it to copy files prior to transfer to the xen host) I just used a buffalo nas drive on Gigabit.

 NOTE*** with some virtualization systems you should uninstall the virtual tools from the Virtual Machine FIRST!! However with Virtual Iron I left them in place as it made the transfer speed fast. Once you have transfered, boot the virtual server into safemode and disable the Virtual Iron Tools. Boot back into normal mode uninstall the tools, install xen tools etc.... Now once you have successfully transfered your servers you may have to re-activate. We also noted that some database files needed to be transfered from a backup. Probably due to the fact SQL was running at the time and volume shadow services could not release the file for the transfer, this was no problem for us as we HAD GOOD BACKUPS.

 Ok so now we need to transfer out of the temporary server and back to the new Host, two ways you can do this. Again you can use the buffalo, OR if you want to get this done faster use an external USB hard drive, here are the Detailed steps:

 

1. Acquire a USB Harddrive

 a. if it is formatted with NTFS you will need to format it as an EXT3 partition.
 b: Here are these steps:

1. Plug in your hard drive to the XEN Host
2. Terminal into your XEN Host using Putty or using the console mode in XenCenter
3. type: fdisk –l (that is the lower case letter L) This will list all the drives in the machine.
4. The Drive you will be looking for (As long as you only have 1 usb drive plugged in) will be labeled with (e.g. /dev/sdg)
5. type: fdisk /dev/sdg to partition the RSB HDD
6. Assuming you have created /dev/sdg1 partition you need to format it using the mkfs.ext3 command.
7. Type: mkfs.ext3 -m 0 -v /dev/sdg1
8. Mount the new partition so that you can start the export routine.
9. Type: mount /dev/sdg1 /mnt

2. Export the machines to the hard drive. This must be done while the virtual machines are turned off, also you cannot do this via the XenCenter Console yet.

  • This is where putty comes in handy, as we can launch multiple putty instances to connect to
  • the same Xen Host.
  • Type: xe vm-list (Use this command to look up your UUID's of each Virtual Server) use notepad and your trusty copy paste for this
  • Type: xe vm-export uuid= filename=/mnt/.xva (xe vm-export uuid=721d0f80c-35e2-dsf1b-c7ce-3dadccddff12 filename=/mnt/Dcserver.xva)
  • Open another Putty session and start another copy.
  • You can use XenCenter to view the status of the copy (its about 1 GB/min)
  • After your copies are done, you can type ls /mnt to view your files
  • Type: unmount /mnt this unmounts the volume.

3. Lets move this drive to the newly formated and installed XenHost.

1. Type: xe vm-import filename=/mnt/.xva
2. Open another putty session to your server and copy a few more vm's at the same time.
 
NOTE: Something else that may help as we had a server with 8 drives. We had 1 raid container that had the install of Xen, and we did not allow the installer of xen to use the second raid container during the install otherwise this would cause the Xen host to see both containers as 1 large spanned volume. We wanted to use the second container as a second set of spindles for files and or other VM's If your wanting to use a few different Storage Repositories you should follow these steps:
 
1. During the install of Xen, DO NOT place a check box in your second disk.
2. After Xen is installed go to the shell command and follow these steps:
a. type: fdisk -l (again to see all attached volumes)
b. If you only have 2 internal hard drives or containers you should only see /dev/sda and a /dev/sdb
3. type: pvcreate /dev/sdb (This creates a partition)
4. type: ls -l /dev/disk/by-id/ (This will list all the Disk Id's that will be used for the next command.)
5. type: xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/ name-label=”Any Name Volume Label”
(Example: xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-36001c230d3b2330012fdd683626c004d name-label=”LOCAL SR-LG”)
6. Thats it your done, look in your XenCenter and you will see the additional SR.
 

When your importing your VM's if you want to import them into a specific SR you can by following these simple steps:
1. Type: xe sr-list (This lists out all the SR's and the sr-uuid's for the next command)
2. Type: xe vm-import filename=/mnt/dcsever.xva sr-uuid=2bce2593-f6ed-a39d-a027-9d7b38ce19ea 

I think that about does it.. Once all the VM's are imported just start them up.
Two hours later we were done and in time to go grab a bite to eat and some hang time.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.