KVM virtual machine move...

Markus Schönhaber ubuntu-users at list-post.mks-mail.de
Mon May 11 09:20:00 UTC 2009


WipeOut:

> I didn't copy the XML files and the old system is no longer around.. :(
> 
> Looks like I may have to reinstall them I guess because it seems they 
> cant be regenerated by virt-manager on existing disk images..

What you could do as an (a bit awkward) workaround is the following:
- use virt-manager to create a new VM with the desired settings (RAM, OS 
type, nuber of CPUs etc.) and specify a completely new image file as disk.
- There's no need to let the installation really run. Simply force the 
VM off when the CD's installation prompt appears.
- Remove the hdd image from the VM.
- Add a new hdd with the old image you want to use.

That way, you'll end up with a newly created VM config that uses the old 
disk image.

There are, very likely, more straightforward ways to do this, for 
example using the libvirt command line tools, but I didn't bother to check.
OTOH: if you already have *any* config file on the new machine 
available, you could copy and adjust it manually in a text editor of 
your choice. At least the <name>, <uuid>, <disk> and <mac> values should 
probably be changed.

-- 
Regards
   mks




More information about the ubuntu-users mailing list