1

My physical server got hacked so my provider has shut down the server and booted it in Linux rescue mode. I've got full access to the file systems in Linux, however after hours of trying and searching I cannot find a way to get the VM's off of this server.

I would settle for anything, exporting the VM's, accessing their virtual drives to grab data etc..

Basically I have to re-install Xenserver on this physical server, however I want to get my data off of it first, but it seems without having Xenserver running you can't do any kind of export to save your VM's.

We do have a backup solution however I'm not 100% confident in it and wont know if it's worked until I've wiped this server clean and then restore the VM's to it.

2 Answers 2

2

You should be able to find it through:

$ cat /etc/xensource-inventory
DEFAULT_SR_PHYSDEVS='dev/sda3'

It should be using lvm. Depending on the version and the state of the volumes, you may want to run:

# pvscan

PV /dev/sdb1   VG sas01          lvm2 [558.37 GiB / 228.37 GiB free]
PV /dev/sda5   VG kvm01-vg   lvm2 [237.63 GiB / 0    free]
Total: 2 [796.00 GiB] / in use: 2 [796.00 GiB] / in no VG: 0 [0   ]

In the above (I'm running KVM, so it'll be slightly different), there's two volume groups on two SCSI devices. We store ours on SAS01 so I'd run:

# lvdisplay sas01 | grep "LV Path"

Which gives:

LV Path                /dev/sas01/fs02
LV Path                /dev/sas01/id01
LV Path                /dev/sas01/lg01
LV Path                /dev/sas01/ms01

To get those off, I'd do:

dd if=/dev/sas01/fs02 | ssh user@remotehost "dd of=/path/to/backups/fs02.img"

You can also run it through gzip first but I don't think it saves network bandwith, just file storage space.

1
  • Thank you for the reply, I had to wipe the server, re-install Xenserver then restore from backups, so I can't try it, but it's definitely the most likely to succeed :)
    – user177916
    Feb 19, 2015 at 20:28
0

Use scp and copy the VM files to another location.

1
  • 1
    But where are the VM files located? It doesn't seem as if they're just sat there on the filesystem.
    – user177916
    Feb 7, 2015 at 2:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .