Converting a Physical system to a Proxmox VM
Vložit
- čas přidán 15. 06. 2024
- I go over 4 ways to convert a physical computer to a Proxmox VM. This can be used to replace ageing systems with virtual infrastructure or to migrate from another hypervisor to Proxmox.
00:00 Intro
00:18 OverView of the Process
01:28 Creating a VM for the data to be migrated into
03:58 Methods or migrating data to the VM
05:52 Using CLonezilla for migration
09:28 Using Disk2Vhd for migration
13:39 Using a Linux live USB and DD for migration
15:40 Using the Proxmox host to create a image
18:37 Conclusion - Věda a technologie
Dude, I like the way you relay the info without too much fluff. You make it easy to follow and you are very knowledgeable! Thank you for creating this video!
Man... really thankful for your will to share knowledge from a hands-on perspective. Straight to the point with no long theory preludes.
Dude, thank you for another vid! I wish all the luck to you and your channel as you make really nice structured content I value a lot. Please post more.
Thanks for taking the time to come up with multiple methods - which often happens when dealing with old hardware
Man.. this guy knows his STUFF!! I'm a newbie, but i wanna learn proxmox :D
Thanks for your brilliant content mate. Your videos have helped me learn more than any other CZcams videos for my home lab setup.
Glad the videos have been helpful for you.
Thanks for your brilliant content mate. Your videos have helped me learn more about configuring my home lab, than any other CZcams videos.
This is a great resource. Thanks for posting! I've used Clonezilla in the past to create VMs from a physical system by creating a Clonezilla backup and then restoring from the backup image in a VM but I've never tried doing the network cloning approach you demonstrated. I'm looking forward to trying it out next time I migrate a physical system to a VM.
Great, concise and touching the right spots as usual. Thank you.
Thanks bro/ You are one of three people who really have helped me to get my proxmox off the ground. Headless and Passthrough-- It was a journey but now I have things the way that I want. I am planning on buying a Dell EMC PowerEdge R930 with 24bays and 384 GB of Ram. I hope that I can manage it. I just graduated from college and I want to have a nice multi-platform Proxmox server or try ESXi but first proxmox since it's so nice the GUI and the mobile app are amazing.
Another cool use of qemu-img and dd is you can use qemu to convert an ESXi vmdk disk image into a raw format (over the network using sshfs even!) and then use dd to write that raw image into a zfs zvol disk. I used this to migrate a VM from ESXi to Proxmox and that VM was previously a physical box about 10 years ago I converted using either p2v or likely dd/nc and similar techniques you describe here. Next I'll migrate the services in the VM to LXC containers.
Yep. I've moved few VMs from vmWare to ProxMox using the qemu convert tool and then copy the cow2 file directly on top of the existing vm disk inside ProxMox. Worked pretty well.
This is very thorough and easy to follow. Thanks!
cant wait to test this methods
dude you always nail it water clearly ! thanks for sharing your knowledge with us !
Excellent presentation!
Cool video ! I like installing the virtio-tools and then do the image so I can use the already installed drivers
Wow! Great stuff, guy! Helps me a lot! Tank you very much!!!
10/10 video! It's amazing that this is even possible
Pretty complete instructions. Thanks.
Thank you for posting. Been looking for how to do exactly that for a long time.
Excellent video... thank you so much...
Brilliant video! Thanks for the help and keep up the great work!
Hey man , I'm so glad that i have been subscribed to your channel and your videos are very informative, i will try to make you more popular over youtube. I don't have any channel but i will put your link to everyone who has a channel like this, thanks for the info and i will try to do that.
Glad my videos are informative and can help others. Thank you for sharing these videos to others they may be able to help.
@@ElectronicsWizardry Can you do the same but with a Linux physical drive or its the same ?
Great vid and instructions man! Very helpful and sub'd
dd is so nice.
Great video 👍
best explanation i´ve ever seen.
great technical info... thanks man
Nive video 👍Always used the dd and also conversion.
Never tried the Disk2vhd or Clonzilla with Proxmox.
Thank you very much for the ideas and techniques shared, I am planning to virtualize all my home servers now that I have a mini PC with plenty of resources, it is time to move from some of those old systems I have at home, it hurts to see them go, but they do take a long time to do everything 😉 I might use them for bitcoin core nodes and bitcoin lightning network nodes though. Thanks again and I will definitely let you know how it went. Appreciate all you do!
Worked like a charm for windows 11
Based info. Much appreciated. 👍
thanks, this was very helpful
If you already have created a VM, you could directly dd to the destination hard disk below /dev/pvm/ and latest with USB 3.0 the blocksize can be increase safely to 15M and more even for a cheap USB thumb drive and you don't need the spare storage for the intermediate image...
Great work my man!
That’s a great video, thank you!
One small tip: make sure to remove noise from your videos before uploading.
Good explanation
Thanks for this!
Great... Thanks for this Video
Good work on showing multiple methods and how they work! Next video is on how to setup a cloneserver in proxmox to reclone machines on the network quickly? 😁
Mylar you liked the video. Thanks for the idea of a cloning server video. I’ll work on planing that video now.
I dont know how fucked up is the google/youtube search engine, i have been searching for this gold for 2 days...
Very informative and educational fun video! Liked and subscribed !
super helpful!
You rock man !
Excellent vid! I've got some systems with a 1TB drive, but they're only useing maybe 10% of it. Will these methods reduce the file size, or create a full 1TB file? I know DD does this when you specify the block device /dev/sdx (without the number).
My company usually migrates between Hyper V and VMware, but the principles are interestingly similar.
The Clonezilla trick is clever.
quite literally a god
Subbed, been trying to use a vhdx that i converted to a Qcow2 that i was running on a physical machine and going to see if this has my answer.
thanks again for your content
well done! Thank you
Wow, very detail video as always. Maybe p2v startwind for next video tq.
Small voice over mistake in 16:30: The if= parameter in dd specifies device /dev/sdo (letter o) not 0 (number zero). The command shown is correct though.
Btw instead of dd you can also use buffer, does the same but is supposedly a bit faster.
If you need to do the same and migrate to a Mac, Parallels does an amazing job too!
You looks like a wizard!
Great Video....Subscribed ;)
Your videos are very professional and informative, speaking about reviews and so on, I think you are on top.
But to attract new people you should consider to take care of better sound and maybe add some notes etc(example: networkchuck).
Anyway thnx for videos and move ff ;)
Can you explain more about taking better care of sound? Was there some audio issues that you noticed?
@@ElectronicsWizardry czcams.com/video/V-nbvAnq65I/video.html divide by 100 and you will hear that dirt or is it just me? Remember those times than we had analog television.
Everything made sense up to 11:00. There you show you have SSHed into a directory file structure of Proxmox. But there is no "/sam/vmFiles/images/xxx" path, and if there were, how would the M6600.VHDX file get there?
I have the same problem. lost me here not found this
Greate guide - I have been translating local proxmox qcow2 images small ssd to be on my nfs file server but it did timeout, then I tried to use raw and it was working with no timeout. I am not really sure how qcow2 compares to raw but having the images on my nfs nas does make it quick to move a running system to anothor proxmox node.
Very good explanation of all possibilities and really amazing tutoring!
Could you make a follow up video about keeping the dns/dhcp settings of the original machine or the additional steps required in proxmox so that the new proxmox pc is also almost identical in terms of plugging it in?
Sure I’ll add that to my possible video list. But one way to do this is to tell proxmox to use the same MAC address as the old physical system. Then the dhcp server will see it as the same computer and hand out the same ip.
thanks for your guidance so many options but I keep getting a BSOD on just a simple laptop to vm migration. Tried qcow2 and raw images as well. I'm sure I'll get it just new to Proxmox coming from ESX migration was so easy.
Another option is using Acronis or easetodo backup to backup those images and create a recover image, then boot from the recover pe on proxmox vm, and recover the backup step by step. Great video though!
That's a good point. Most other backup or imaging software products can be used to move a physical system or another VM.
Thanks!
Have been looking for this exact method. Trying to change an old widows box to proxmox.
Thanks man!
thank you
This what I need to do, I have a 3 node proxmox 8.0 set up as a cluster, and I'd like to upgrade the ssd drive from 256g to 2tb, was watching this video, and was thinking of following your instruction for clonezilla, and run it in a vm on another node, and then connect the ssd thru a usb dongle to the source vm, and let it copy directly, or wasn't sure if I should just use a disk duplicator, and then resize the partition when I reinsert into my tiny server
Hello, thanks for all theses videos, do you know some information about keep hostid using clonezilla to clone windows server ? thanks
Is b_SamFile a Directory or LVM? I cant find my lvm-thin in the directoty structure in your video. Also, thanks for another great video. You alone are helping survive migrating to Proxmox!
Samfile is directory storage in this video. Glad I could help.
Nice job, thanks. Isn’t there a way to specify a file on the server to be vm disk image? Other than editing the config file?
The Proxmox web gui only allows selecting a Proxmox storage repository for disks. You need to edit the config file to use a full path.
Thank you. I need to do this.. LOL :-)
For disk2vhd, mountdrive X: /S required on windows for efi drive? A lot of guides uses this and qm importdisk
CloneZilla (actual version) failed when I tried to migrate Ubuntu 12.04 i386 to PVE VM. But dd over netcat worked perfectly :)
what's the dell or hp machine 0.29 I have few ive used in the past for Proxmox. I was just interested what you are using yours for. Love the vide btw great channel
That system is a custom build on a old hp case that had a dead motherboard. I’m currently used it for drive endurance testing with a am1 motherboard.
@@ElectronicsWizardry Ahh cool thanks for the reply. Great channel I always check to see if there is anything new. I've just set up my old ubuntu machine for VMware. I was having trouble passing Gpu though in Proxmox so has to go another route. I'm an open-source guy but I've been setting up hyper v lately to learn that more as well.
I tried using the dd method, but I'm a bit lost with where to place the raw file. It's currently sitting in my root directory, I don't know where proxmox stores its raw files for the VMs. My default one that I'm trying to replace is in local-lvm but I don't know how to get the raw file from root to local-lvm. Also does it matter what you name the raw file?
I also noticed you used sata devices for your drives, mine are virtio drives, does that matter? I'm also trying to copy linux mint btw instead of windows if that makes any difference.
Cool, thank you. Where appropriate, can you install the VirtoIO drivers for Windows onto the original physical device, before you copy the clonezilla image? I would have thought that would make using VirtIO drivers later much easier.
I have never tried installed the virtio drivers before the migration, but I don't think it would matter when its installed. I find it easier to install the drivers after the migration as I can easily add a ISO CDROM to the VM. I don't think when the drivers are installed should affect performance or stability of the VM.
@@ElectronicsWizardry It won't make any difference after it's installed. The only difference is the accessibility of devices from initial startup of the migrated VM.
I had issue with installing Proxmox to a R340 server. It wouldn’t allow MBR/BIOS or legacy boot.
Thank you for all the detail in your video.
Can you confirm whether a Windows instance will be automatically activated if its 'lifted' from disk by Disk2Vhd and then 'dropped' into a VM on Proxmox, as you show here?
I just purchased a refurbished Dell T7820 with 'Win10 Pro for w/s' and want to make it a Proxmox box, but with a Win10 Pro VM.
Of course I don't have the original Win product code - hence my question about 'automatic activation'.
I expect it should work, as the motherboard is the same - and licence is tied to mobo, right?
Just be nice to hear it confirmed from the wizard 😃
Thank you.
I can't confirm the license will stay interact when moving the vm, and I'd guess the license may have issues as its tied to the hardware and windows detects a hardware change. There are multiple ways that windows can be activated though, so I can't be fully sure what would happen here.
@@ElectronicsWizardry Thank you for the quick reply. I was thinking that if it all happens to the same box, there is no change to hardware.
Anyhow, I found a way to identify the product key and how to 'remove' the licence, so I should be covered.
At 11:41 what would you put as option -0 to output it as raw instead of qcow2? I mean the whole command not just the .raw suffix
the -O options for a raw file would be raw. So the full command would be qemu-img convert -O raw inputDisk.vhdx outputDisk.raw
Sorry, but I am stuck again: I have the qcow file in a from me created directory in /etc/vhdximages/ .
At 12:19 you mention to add the sata disk you gonna link the repository. How do I find out what my version for b_SamFile would be?
Have a little problem while migrating my physical windows to proxmox server. " Error found No bootable device " Hope for a response. Thanks!
Hello, at timestamp 10:58 you use the program “qemu-img”. How did you get that program onto your Promox machine? Please explain. Thanks.
Qemu-img should come pre installed on proxmox. Try running it and if you get an error about not enough arguments it’s in there.
This is a great video but where is /sam/vmFile/images shown at 11:00? Where do you actually copy the converted qcow2 disk image to on the proxmox host? I'm using the default local-lvm that I have a feeling a lot of people reading this are also using.
I have found it easiest to make a temp location for the qcow2/raw file, then use the move disk function in proxmox to move the storage to LVM. In your setup running off a single boot drive this is what I'd do
-Enable disk image storage on the local file storage
-Copy the qcow2 file to the local file storage location, this is /var/lib/vz/images/VMID/. You may need to make the VMID folder.
-Use the move disk function in Proxmox to move the storage form the Qcow2 storage to LVM. Then remove the Qcow2 file.
@@ElectronicsWizardry Thank you for the stupid fast reply. My proxmox host is on a 1TB NVME drive and the installer created the "local" storage as only 100GB so my 150GB disk image won't fit. Is there a way to copy to local-lvm instead? Also forgive another noob question but don't I need to already have the disk attached to a VM to use the move disk function?
For some reason I was way overthinking this. Copied the image to a network storage that proxmox has under the images/###/ folder. Created a VM with the same ID, did a qm rescan which picked up my copied disk image. Added it to the VM and then moved it to my NVME storage. I now have the converted disk image attached to my VM. Thanks!
Hello,
This is answer many of my questions. I was wondering if I could use the physical disk as the boot disk for my VM without making any copy? That would save time and reduce possible error.. and would that increase performance of the VM afterward?
Thanks,
Martin!
You should be able to use a disk passthrough and boot from it. So in the config file for the vm set it to the path of the drive, like /dev/side for example
I like you tutorials, but sometimes missing the cleanup stage afterwards. I know this is 9 months later, but once you have attached the image file and are booting from it. do you need the 240GB Sata0 drive you originally created to run the VM up? Thanks.
Yeah, I got lost there too... if you're booting directly from the image file, why even have the 240GB sata drive? nowhere does it show that you copied the image file to the 240GB drive. So why even create it if you're just going to run the VM directly from the image file?
I just thought of something. Would this allow me to use an older version of Windows I use for Video Editing?
If the USB does work? That would be great! I use an older Pinnacle Video editing rig, and would LOVE to use the hardware and software features it has for old VHS video tapes I come across.
This would be a game changer as I could get rid of the old machines I have around. And just keep the hardware that I need for the physical transport of the signal to digital.
Converting those old systems to VMs should work and usb passthrough has worked fine with all the devices I can remember using. There might still be some weird issues but I’d give it a shot and see if works here and I think your chances are good.
How to add all drives to proxmax.. I can't see my HDD but only see ssd in which proxmox is installed? How to contact u?
tried the DD method straight from disc into local proxmox zfs. getting an error "TASK ERROR: unable to parse zfs volume name 'myVM.raw'. triple checked your instructions not just how to move forward. thanx for vid anyway :)
What gets me is that you created an efi system which needs to set efi disk, didn’t use tpm which also needs tpm disk, i see neither of these in the setup menus, and when you change the disk to use the converted image there is no mention of what happens to the efi and tpm, does it just happen to work within the new disk image as if it was a passthrough?
IIRC there's a fTPM option that you can spoof into any vm in proxmox. But that's going off of my imperfect memory, so I might be strong.
How that syncs with a ported-over ISO file, . . . I don't have any details.
Good luck, friends! 👍
is the same the command with qemu in windows : qemu-img convert -f raw -O qcow2 \\.\PhysicalDrive0 c:\file.qcow2 ?
I haven’t tried that exact command but it seems like it would work. I’d make sure the drive isn’t mounted as it can cause issue when a drive is being used and backed up at the same time.
Can you use disk2vhd and make a live backup of a 2022 server for Disaster Recovery Procedures? Need to make a backup of a new server i installed in work but be able to restore it in case of any major problems. Thanks
Yea you should be able to make an image for recovery with disk2vhd but I’d probably use backup software instead if possible. Veeam has a free version I like which some additional features like a bootable tool to restore backups.
@@ElectronicsWizardry Will go take a look at Veeam, thx for reply.
Is thefe a way tobuse proxmox with a VM windows on one box without using another machine to login using a browser? If so would it make a good workstation solution provinding the hardware is good. I have a Minisforum MS01 with i9 13 gen and 64gb ram
You should be able to install Proxmox on an existing Debian OS, or the other way around for a Linux desktop OS with full Proxmox hypervisor functionality. I might make a video about this in the future. The Proxmox Wiki has some guides about how to install Proxmox on an existing Debian install.
I need your help. I have a SSD from my old PC. I connected it to Proxmox server and created IMG and then renames to RAW. But I have only single file. When I create VM I select UFI and it create 2 discs. I do not know where I connect my disk.
I’d skip the efi part and it should work with one partition. Most oses will work with no separate efi disk and when installed on metal they use a efi partition for efi data.
Does this work for a physical to virtual raspberry pi?
Anyone attempt the Disck2vhd method? I converted the file to a qcow2 file and put it in a drive. Getting an error saying the file doesn't exist when I attempt to start the vm.
This seems like a issue with proxmox not seeing the drive. I’d try adding the full path of the qcow2 file to the config file the. Moving it in the proxmox gui to where you want the file.
@@ElectronicsWizardry Turns out I'm dumb. I was telling proxmox the wrong location of the drive so it was right about it not existing.
This is great, would love to see how to import a qcow2 file to the local-zfs
Once the drive is added as qcow2 the easiest way to move to local zfs is to use the move storage to move from the qcow2 to zfs.
@@ElectronicsWizardry Awesome! was able to to use qm importdisk local-zfs
I had converted using the Disk2VHD and then used the qemu-img convert -f vpc -O qcow2 -progress
I was doing it over network not phsyical after i had it converted I ended up using rsync to the /tmp folder on proxmox and imported it from there. Only issue I really had after that was having to attach the disk as IDE to get windows 2012r2 to boot then install the virtio drivers, attatch a SCSI disk and verify it was recognized then i could shutdown, detach both disk and re attatch the main disk as virtio scsi. Seriously though your videos were fantastic! Thanks for replying and keep up the videos really enjoying your series on Proxmox.
Does this work for Linux on a arm system?
You can’t migrate between architectures. This video was made for x86 as proxmox is made for x86. You can likely use these steps if moving an arm system to an arm vm but I haven’t done that.
how tf do I get the vhdx file from the external harddrive to the right directory in proxmox???
You can use the cp command in the terminal to do this. CP /path/from/external/hdd /path/top/copy/to/
I am sorry, I am somewhat new, where do I find the external drive? does it need to be in a certain filesystem type? @@ElectronicsWizardry
I still dont understand how a virtual machine would have better performance than the actual host itself. What would be a scenario to use virtual machines?
A VM on the same hardware will typically be a bit slower than the physical hardware. I don't think I said in the video a VM would be faster(let me know the time if I did). VMs give you many other advantages like snapshots and backups. VMs are also much easier to move to newer faster hardware. Hopefully this clears up any confusion.
@@ElectronicsWizardry that makes sense. When hosting multiple vms like windows servers and windows OS what hardware spec should you be looking at for performance? Cores or rams?
@@joejoe2452 It really depends on your workload, but typically ram get used up much faster with running VMs than CPU. I'd take a look at your exisitng systems to see how much CPU and RAM is being used. I find many of my VMs are sitting with low CPU most of the time.
... or just use NVMe drive in the first place, PCIe passthrough it to a VM and boot from it with 0 modifications and boot it baremetal again at any moment in the future :D
proxmox vm to a physical system can you do this
Snapshot is not working message not supported
Where do you see this message? Are you on a storage format that supports snapshots? Check the PVE wifi page on storage and see if the storage type your using supports snapshots pve.proxmox.com/wiki/Storage.
He say's he's going to add the VHD vile to the Proxmox VM, but doesn't say how to do that.