XenServer restore live CD question

See the solution to the problem below in the Edit section :

Hi there,
I’ve been trying out UrBackup with great interest, but I have hit a bit of a wall when it comes to restoring through a XenServer VM (6.5)

I can load the live CD in from ISO just fine, and restore without issues, however, without XenTools installed, the VM uses the Xenserver emulated Realtek 8139 network card (100 mbit), instead of 1 GB Citrix PV Adapter it could be.

Now i’ve tried setting the VM parameters to use eliloader and pygrub, but eliloader doesn’t want to start (problems recognizing the vmlinuz and initrd file, and pygrub does load the VM and start the ISO, but it bypasses the grub menu, starts the vmlinuz and initrd and loads, but dumps me at the debian login prompt, not auto logging in to user urbackup.

The first thing i would like to try is if the network card is actually found and runs at 1 GBps, but for that I need to get in debian, but without the username and password of urbackup/admin or root and starting the recovery client using /root/start.sh, that’s not going to work. Or i’ll need to create a debian live CD that includes the Xenserver Tools, but doing that in debian and creating a live CD from it is a fair bit out of my comfort zone. I’m fairly knowledgeable in CentOS, but Debian is a whole new ballgame.

I’m almost afraid to ask, but would anyone mind sharing the login credentials for the live ISO? Or perhaps someone else who has experience with UrBackup bare metal restore in XenServer?

[EDIT]:

For those interested, to get a XenServer VM to work with a Xen Net pv adapter, just create a new VM based on the Debian 7.0 (32-bit) Wheezy template and put the UrBackup restore ISO in the virtual machine’s DVD drive. Now open up a SSH console to your Xenserver, and adjust the bootloader to pygrub and erase other bootloader options with this command:

xe vm-param-set uuid= PV-bootloader=pygrub
xe vm-param-set uuid= PV-bootloader-args=""

The vm-uuid is found in Xencenter, on the general tab of the virtual machine, or from SSH console using: xe vm-list

Now there’s a bit of a downside, that is that UrBackups live CD auto starts and auto logs in from a tty console. When you make this adjustment, the pygrub bootloader will use another console, namely hvc0. Instead of auto logging in, it will present you with a debian login prompt ones the restore CD is done booting.

Just login to the CD with:
Username: urbackup
Password: live

then run the command: sudo /root/start.sh

Now you can run the restore as normal, but with a Xen PV Network adapter that should run at 1 or 2 Gbps instead of the default HVM emulated Realtek 8139 network card (100 mbps).

Another small point to keep in mind, the vm template you used, adds a small 8 GB hard disk to the VM. Dont remove that one, you can edit it to make it bigger for the size of the restore you want to do, or add additional disks. If you remove the drive, the VM will not boot anymore. This must be a parameter in the VM somewhere that i havent found yet.

Another thing to consider, after the restore of a Windows image, you can’t just reboot and start Windows, pygrub doesn’t seem to want to start a windows restore and gives the error: Internal Error, there is no bootable device. To solve this, just create a new VM with the right template (windows 2012 R2 template for example), after creation, delete the new disk drive that you don’t need. Detach the disk(s) from the restore VM and attach them again in the new Windows template you just created, and voila, it boots normally. You should be able to convert the VM metadata from Paravirtualized (PV) back to Hardware-assisted Virtualization (HVM), but i haven’t found the correct commands to do so, i keep getting inaccessible boot device BSOD’s when I try. The attaching of the disk in a new VM works fine though.

Very long winded explanation, but this is the way I found out to use a GB adapter for restores in XenServer, instead of restoring at 100 mbit. Waiting for 43 minutes for a 30 GB machine to be restored using a 100 mbit network card might be ok for a private pc, but I can imagine not so much in a commercial setting…

Ok small update, I managed to get in. I’ll share the password for the user urbackup if i’ll get permission. I dont think it’s a super secret, but I don’t want to rub anyone the wrong way.

Anyway, after getting in and running: sudo /root/start.sh the program starts up. using a simple wget test i’ve been able to find a throughput of at least 270 mbit. Which is more then 100 mbit :slight_smile: I’ve downloaded from a slow server, but it should run at 1 Gbps now. I’ll do some more tests and update the top of this topic with my steps ones it’s all figured out.

Can you tell me the debian packages that you installed? I’ll include them with the next build.

The live cd has some kernel parameters that configure which user it logs in (boot=live config username=urbackup). Maybe those missing causes it to not work?

Hello Uroni,

The nice thing is, I didn’t modify the ISO file at all. I modified the VM parameters in XenServer so it starts the VM in paravirtualized mode instead of the HVM mode that seems to be the default for Windows VM’s for example. This way, it was offered the XenServer network card and disks out of the box and is able to use them. The downside is that it takes control of the boot process, not allowing grub to do it, but reading the grub config and starting the vmlinuz and initrd itself. This works, but like you suspected, it’s not reading all the parameters, like “boot=live config username=urbackup”. I’ve been trying to include it in the (pygrub) parameters, but to no avail thus far. Another downside is that after restore, you have to create a new VM from template and transfer the the restored virtual disk from my restore vm to the new VM (or change the VM parameters again so the VM starts in HVM mode instead of PV mode… which requires a few commands on the shell of the XenServer…)

I’m not done testing yet, but i’ve been able to confirm that the VM’s network card is now able to run at at least 600 mbit, so that seems to work fine. And restoration of a VM with a 17 GB of diskspace now took 26 minutes instead of the 47 minutes it took in the HVM (100 mbit) test from yesterday.

Still seems like it’s a bit slow though, could be that the QNAP i’m storing the backups on (in compressed form) is having a hard time decoding the data, but I would assume such a VM should be able to be restored in 3 or so minutes, at a rate of 100 Mb/sec (give or take some overhead). I’ll keep testing.

You’ll want to use pv-grub instead of pygrub. Also I don’t think there should be a performance difference between HVM and PV anymore. Amazon AWS is migrating to exclusive Xen HVM VMs for example. Maybe you’ll have to change the virtual network device or something.

I’m afraid pv-grub isn’t installed on XenServer (6.5) by default. I’ll be stuck on pygrub for now. It works fine apart from it starting a serial console session (hvc0) instead of a tty. I still see the original tty1 console started up normally (with the start.sh script). Just can’t switch to that without modifying the Xenserver configs. to be honest i’d like to come up with a workable solution that doesn’t involve changing the default Xenserver configuration.

I don’t think there’s really much performance difference between PV and HVM in my case. Just that HVM emulates a Realtek 8139 network card through qemu, which is not very fast.

Hello everyone, I just included the steps needed to adjust the XenServer VM metadata in the Edit section in the top of this topic. Hopefully it will help others out that have the same question.