WANT TO CONVERT A PHYSICAL MACHINE TO VIRTUAL MACHINE

Abhijit Roy

Member
Jul 23, 2019
50
2
13
42
want to convert a Physical Machine based on Centos 5.5 with RAID1
configured to a proxmox VM on a different hardware, can you please
provide me the steps actually existing physical machine hdd has bad
sectors, so I want convert it to a VM as soon as possible, I also
want to know that if I want to bypass existing physical hardware
dependency by converting it to a VM, am I thinking correctly or I mean to say that
is it possible to bypass physical machine hardware dependency by converting it to a VM.

Please help me in this regards
 
Hey!

This is what Google throws as first result for backing up CentOS: https://serverfault.com/questions/120431/how-to-backup-a-full-centos-server. What is a more interesting topic - how is the system being used. I expect that you have a stack that serves a particular purpose.

Maybe it'd be nice to upgrade to CentOS7. Are there any constraints for doing so?

Maybe you don't need the backup of the whole system, but only some vital data?

IMO it's always better to start fresh, especially in the production environments, so i'd rather rebuild the stack than migrate the one from a failing storage.

Take care and best of luck!
 
  • Like
Reactions: guletz
Vladimir has a very valid point, but if you are *really* sure you know what you're doing, you can simply 'dd' your existing installation to a raw image file and boot a VM with this file set as it's root disk.

E.g.:
  • Boot from a live disk
  • Attach a big enough external storage
  • Run 'dd if=/dev/sdx of=/mnt/image.raw status=progress' with sdx being your original installation (the RAID-1) and your temporary target mounted on /mnt
  • Create a VM with correct settings, but don't start it - just remember the VMID
  • Import the image.raw file onto a PVE storage (for example: attach your temporary storage to your Proxmox Host, mount it, then run 'qm importdisk <vmid> /path/to/image.raw <target-storage>')
  • You can now attach the raw disk image as a drive to your VM and boot from it
 
  • Like
Reactions: guletz
Thanks for your reply, but another concern is after migration to VM, is it possible to bypass that bad sector which was in physical machine in newly converted vm
 
You can append 'conv=noerror' to the dd command to ignore bad sectors or try using a special tool like gddrescue.

Whatever you choose to do though, the data from the bad blocks will not be recovered just by converting the disk to a VM image. The image will not contain errors though, it will just have zeros/garbled data at those locations.
 
And that migrated VM will run properly if I ignore the data in bad sector, as the machine is running now in new hdd as a VM right?
 
Hey!

This is what Google throws as first result for backing up CentOS: https://serverfault.com/questions/120431/how-to-backup-a-full-centos-server. What is a more interesting topic - how is the system being used. I expect that you have a stack that serves a particular purpose.

Maybe it'd be nice to upgrade to CentOS7. Are there any constraints for doing so?

Maybe you don't need the backup of the whole system, but only some vital data?

IMO it's always better to start fresh, especially in the production environments, so i'd rather rebuild the stack than migrate the one from a failing storage.

Take care and best of luck!

Actually we have an customize application running on that machine, so we want to exactly clone that application without hampering any feature with same version and paths with environment, so if you can suggest me regarding that it will be nice
 
Hi,

Much better, insted of dd or alike, you can use clonezilla(where you can use a improved dd, aka ddrescue, who can write null value for any unreadable block)
And after your image is done, then using the same livecd you can restore on a PMX VM. 2 month ago I have do this kind of migration using a comparable linux distro (suse from the time where it was centos 5.x, who was using also a md raid1)
Maybe you will need to adjust your fstab for md raid, because mybe is using uuid or other mapping convention. Also take in account that centos 5.x maybe can not use a scsi/sata controller. In my case only IDE was working.

Good luck.
 
Hi,

Much better, insted of dd or alike, you can use clonezilla(where you can use a improved dd, aka ddrescue, who can write null value for any unreadable block)
And after your image is done, then using the same livecd you can restore on a PMX VM. 2 month ago I have do this kind of migration using a comparable linux distro (suse from the time where it was centos 5.x, who was using also a md raid1)
Maybe you will need to adjust your fstab for md raid, because mybe is using uuid or other mapping convention. Also take in account that centos 5.x maybe can not use a scsi/sata controller. In my case only IDE was working.

Good luck.



Yes I was also thinking that, what I have to use in fstab or how do I write my migrated fstab to boot 5.5 properly
 
Hi,

Much better, insted of dd or alike, you can use clonezilla(where you can use a improved dd, aka ddrescue, who can write null value for any unreadable block)
And after your image is done, then using the same livecd you can restore on a PMX VM. 2 month ago I have do this kind of migration using a comparable linux distro (suse from the time where it was centos 5.x, who was using also a md raid1)
Maybe you will need to adjust your fstab for md raid, because mybe is using uuid or other mapping convention. Also take in account that centos 5.x maybe can not use a scsi/sata controller. In my case only IDE was working.

Good luck.

my another challenge is I can not down the server to make dd i have to go with live server
 
Finally I able to migrate centos 5.5 Physical machine to vm, bu there is error regarding eth0 activation, it said hardware address not set as require, though i have change ifcfg-eth0 file with new mac address of VM but still throwing same error, can u please help.

Thanks for all of your support
 
Hi, could you post relevant logs and ifcfg-eth0?

Try to change MAC addr in the PMX web interface at the Hardware options and not in ifcfg-eth0!
 
Can anyone tell me that that if I am planning to migrate all our physical server to proxmox VM to bypass hardware dependency for lifetime, am I thinking the right way, or is their any such drawback of proxmox VM in long run.
 
@Abhijit Roy
You are thinking correctly - with VMs you will be able to migrate seamlessly from one server to another. I foresee no drawbacks as the loss to the hypervisor is around 3% and you aren't likely to notice it. The benefits, on the other hand, are resource optimisation across the infrastructure, reliable backup and snapshot system, ability to create a cluster (HA, Ceph), etc.
 
If there is any problem with any of VM id is there any procedure to repair or recover it instantly or if there will any problem with proxmox (hypervisor) filesystem also is there any option to recover/repair that.
 
I have migrated one physical machine built in centos 6.4 to a proxmox vm, on the physical machine arch was i686, is it possible to convert it on x86_64 in new VM, actually I want to increase hardware resources of the converted Physical Machine in Proxmox VM.
 
While increasing the hardware resources is possible, migrating from a 32 bit to a 64 bit OS is most likely not, or at least non-trivial (if you want to try, follow the general instructions for doing so - nothing about this is PVE or VM specific, all QEMU VMs use 64-bit by default, as long as the host supports it). You'd probably be better of reinstalling your VM though, potentially also using a more recent version of CentOS.
 
I do want not want to change application environment running on that converted vm instead of upgrading the architecture, can you please tell what is the maximum number of ram i can allot on that converted vm, it is i686 arch and uname -r is 2.6.32-358.11.1.el6.i686.
 
A 32-bit OS can only address 4 GB of RAM, so adding more would be a waste.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!