[PVE-User] Moving VM from one server to another

Ed Groth ed at boxpopuli.com
Tue May 31 22:25:45 CEST 2011


Hello Bruce,

Supposing your the VEID of your guest server on the old (dead) host
was $OLD_VEID and you want to move it to $NEW_VEID:

Copy the files from /old_hdd/var/lib/vz/private/$OLD_VEID into a
/var/lib/vz/private/$NEW_VEID, and copy
/old_hdd/etc/vz/conf/$OLD_VEID.conf to /etc/vz/conf/$NEW_VEID.conf and
you should be able to start the server.

The conf files are fairly self explanatory, or once the server is
copied you can use "vzctl --set ..."

I like to use globally unique VEID's to avoid this issue.

Ed

On Tue, May 31, 2011 at 8:41 AM, Bruce B <bruceb444 at gmail.com> wrote:
> Thanks Diaolin and Timh.
> I am going to get to it now and in the mean while are the .conf files very
> complicated or anything I have to watch for to change or not change in
> them?
>
> Just posing the question as I work.
> Thanks,
>
> On Tue, May 31, 2011 at 3:55 AM, Timh B <timh at shiwebs.net> wrote:
>>
>> Hey,
>>
>> The openvz containers are usually stored in /var/lib/vz/private/<VMID>/.
>> Modifying and copying the config, data from /etc/vz/conf/<VMID>.conf,
>> /etc/qemu-server/<VMID>.conf, /var/lib/vz/private/<VMID> and
>> /var/lib/vz/images/<VMID> to a new machine "should" work. There might be
>> some extra work with getting networking etc to run but you should be able
>> to figure that out from there.
>>
>> BR,
>> Timh
>>
>> On Tue, May 31, 2011 07:00, Bruce B wrote:
>> > Hi Robert,
>> >
>> > Thanks for the input. It's not bad HDD. It's just a dead motherboard. No
>> > backups were run. Where are the contents of a VM saved? I can see that
>> > the
>> > /var/lib/vz/images/ includes all of the KVMs but not VMs.
>> >
>> > Regards,
>> >
>> > On Mon, May 30, 2011 at 10:45 PM, Robert Fantini
>> > <robertfantini at gmail.com>wrote:
>> >
>> >> were backups run on that server?
>> >>
>> >> if they happen to be on the bad hdd, then recover the backup.
>> >>
>> >> how is the bad hdd getting accessed?
>> >>
>> >>
>> >>
>> >> On Mon, May 30, 2011 at 10:13 PM, Bruce B <bruceb444 at gmail.com> wrote:
>> >> > Hi everyone,
>> >> > I have a proxmox server that is down. So, I only have access to HDD
>> >> and I
>> >> > can retrieve data from it. I want to move some VMs over to the new
>> >> server
>> >> > but there is a conflict of ID. So, can I simply change the ID number
>> >> of
>> >> the
>> >> > VM that I am moving over to the new server and then turn it on with
>> >> the
>> >> new
>> >> > ID and expect everything to be fine?
>> >> > ***Note I am not using vzctl or any other utility as old server is
>> >> dead.
>> >> I
>> >> > only have access to HDD.
>> >> > Thanks
>> >> > _______________________________________________
>> >> > pve-user mailing list
>> >> > pve-user at pve.proxmox.com
>> >> > http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>> >> >
>> >> >
>> >>
>> > _______________________________________________
>> > pve-user mailing list
>> > pve-user at pve.proxmox.com
>> > http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>> >
>>
>>
>> --
>> //Timh
>>
>
>
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>
>



More information about the pve-user mailing list