I had an Ubuntu 10.4 VM running on another Ubuntu KVM host. I'd like to clone this VM but with a new IP address? I know that I would have to stop my VM, clone it, somehow give it a new IP address and then start both. How can I do so without having to SSH into the VM? Would I need to change any other parameters apart from the IP address?
When you have cloned that VM, BEFORE you turn it on. Mount the LVM of your clone to a folder and edit the /etc/network/interfaces in that folder.
Next unmount the LVM.
Start your machine.
profit.
If you use a VM as a base image for other VMs, I would keep it as an non-active VM. Ie, you create the base image, make sure it works, then set the IP address to something you know and never use it again (the IP address or the image), except to create other VMs.
That way, when you need a new one, you can clone the base and fire it up knowing that the IP address won't conflict with anything. Then change its IP address during commissioning.
if you're cloning the VM you'd need more than just change the IP - drop all network configs, ssh keys, fqdn-tied certs etc. in RHEL/Fedora this can be done using
sys-unconfig
or by placing a file name .unconfigured in / Maybe Ubuntu can do something similar