Hi,
i want to recreate KVM virtual machines based on their existing LVM logical volumes. To explain this in more detail i will first describe my setup: I have a server with 2 HDD's in it. On the first one the host operating system and cloudmin is installed. On the second HDD there is a LVM group with 3 logical volumes. Each logical volume belongs to a KVM virtual machine. Last week the first HDD crashed deeply and had to be replaced. The second HDD with the 3 LVM volumes is fine. What i want to do now is to recreate my 3 virtual machines. But as far as i see i can only create NEW KVM guests in cloudmin, based on images or some install media. What i need is an option to create a new KVM system based on an existing LVM volume. How can i do that?
Would be nice if anyone can point me in the right direction.
Best regards Jochen
Comments
Submitted by JamieCameron on Mon, 06/23/2014 - 15:06 Comment #1
You could try this :
Create a new VM with a different name.
After creation, shut it down.
Detach the primary disk from the VM (on the Manage Disks page).
Attach the device for the old LV, and then boot it up.
Submitted by jopebw on Tue, 06/24/2014 - 00:28 Pro Licensee Comment #2
Thanks! That works. At least the VM ist booting from the old LV.
But now i have another problem: It seems the VM cannot setup it's network interface correctly. What i found about that is, that this might happen because of a changed MAC address.
The VM is running a Debian wheezy. I tried to put the MAC address of the new VM into the /etc/network/interfaces with "hwaddress ether 02:54:00:36:4D:A4". But that doesn't help.
Does someone know WHERE debian wheezy stores the MAC address of interfaces so that i can change it for eth0 ?
Submitted by JamieCameron on Tue, 06/24/2014 - 01:14 Comment #3
Is the MAC set in /etc/network/interfaces ?
Submitted by jopebw on Tue, 06/24/2014 - 01:30 Pro Licensee Comment #4
I have found the problem. Yes - Mac address is set and everything works now as expected. Thank you very much for your help!
Best regards Jochen Peters
Submitted by JamieCameron on Tue, 06/24/2014 - 12:43 Comment #5
Great!