May 29, 201511 yr Can i 'convert' my existing WIN7 desktop to run as a VM? If so, how? I've a copy of Acronis TrueImage on the pc, would that produce an image file that can be fed into the vm creation? Pretty noob questions but would be ace if i could just 'move' away from the existing hardware although thinking about it, maybe not??
May 29, 201511 yr Ive never done a physical to KVM, but a quick google comes up with this: https://syneto.eu/knowledgebase/how-to-convert-physical-machine-to-kvm-virtual-machine/
May 29, 201511 yr Yes this is doable and I'll be documenting a procedure for the wiki on this that will let you so this entirely from unRAID.
May 29, 201511 yr Author Yes this is doable and I'll be documenting a procedure for the wiki on this that will let you so this entirely from unRAID. As soon as you can then jonp
May 31, 201511 yr Author As a complete linux and kvm 'non-expert' i would be ideally placed to test any proposed script ... if it works for me then it's safe to assume that it'll work for others. I have a relatively straightforward Win7 Ultimate setup which i'd like to 'mirror' as an unRaid vm for obvious reasons. It would be my daily workhorse so non-specific in terms of usage and seems a good starting point to prove the concept.
June 1, 201511 yr If anyone wants to give this a go, a simple way to image would be this: qemu-img convert -p -O /dev/sdX /mnt/cache/domains/vdisk1.img For the first path of /dev/sdX, replace X with the device letter for the physical disk you want to convert to virtual. For the second path I provide, make sure you have a user share set to cache only called domains. I'll be testing this out next week for myself.
June 1, 201511 yr Author If anyone wants to give this a go, a simple way to image would be this: qemu-img convert -p -O /dev/sdX /mnt/cache/domains/vdisk1.img For the first path of /dev/sdX, replace X with the device letter for the physical disk you want to convert to virtual. For the second path I provide, make sure you have a user share set to cache only called domains. I'll be testing this out next week for myself. I'll need to wait for your testing jonp. I've only got a win7 pc separate form my unRaid server and you seem to be advising how to 'image' ?? I dont know how i would image my pc but do have a copy aof Acronis TrueImage installed so was wondering if the output from this would be of any use?
June 1, 201511 yr If anyone wants to give this a go, a simple way to image would be this: qemu-img convert -p -O /dev/sdX /mnt/cache/domains/vdisk1.img For the first path of /dev/sdX, replace X with the device letter for the physical disk you want to convert to virtual. For the second path I provide, make sure you have a user share set to cache only called domains. I'll be testing this out next week for myself. I'll need to wait for your testing jonp. I've only got a win7 pc separate form my unRaid server and you seem to be advising how to 'image' ?? I dont know how i would image my pc but do have a copy aof Acronis TrueImage installed so was wondering if the output from this would be of any use? What you should be able to do is detach the HDD from your PC and install it in your unRAID server. From there, you can identify the disk letter for the device and run the qemu-img convert command to convert that physical disk to a virtual disk in a storage location you specify. Acronis TrueImage I think outputs images to tib files, which I do not believe are recognized as virtual disks, but I think acronis may have a method of outputting to virtual disk format. If so, you should be able to clone your physical disk over the network to unRAID as a virtual disk. That's the first step. The next steps involve adding the VM and tweaking the bus settings for the XML (which I will document in the wiki soon).
June 2, 201511 yr If anyone wants to give this a go, a simple way to image would be this: qemu-img convert -p -O /dev/sdX /mnt/cache/domains/vdisk1.img For the first path of /dev/sdX, replace X with the device letter for the physical disk you want to convert to virtual. For the second path I provide, make sure you have a user share set to cache only called domains. I'll be testing this out next week for myself. I tried this today but had an error: qemu-img: Must specify image file name. Not sure what I did wrong, but I removed -O and was able to image my laptop's HDD and boot successfully to Linux Mint KDE. This particular system was a dual boot Linux Mint / Windows 7. I setup the VM as Linux and played around with it out of curiosity to see if I could boot Win7. Win7 begins to boot but soon it fails with BSOD and restarts to the GRUB bootloader. Just wondering as a matter of testing and trying new things if the added complexity of a dual boot system is never possible with KVM?
June 2, 201511 yr Windows will just need to have the virtio drivers loaded before it will boot. I posted the steps to installing those in another thread in here very recently.
June 2, 201511 yr Author I'll give it ago. Acronis can image to Windows format. also. I assume thats what is meant.
June 2, 201511 yr Author I've now got a .vhd file within Windows, what's next? Do I need to further convert this (bit of a long winded exercise but i'm not able to physically move the drive between servers due to its location) to another format (iso?). How's this going to happen? As you'll have guessed i'm just stumblin' along in the almost dark (to me). All good fun tho ...
June 2, 201511 yr This particular system was a dual boot Linux Mint / Windows 7. I setup the VM as Linux and played around with it out of curiosity to see if I could boot Win7. Win7 begins to boot but soon it fails with BSOD and restarts to the GRUB bootloader. A dual booting VM... That's an interesting concept.
June 2, 201511 yr Windows will just need to have the virtio drivers loaded before it will boot. I posted the steps to installing those in another thread in here very recently. I changed the VM boot order and booted from the Win7 Install ISO and attempted to load the drivers but so far have been unable to as Win7 install error returns with unable to find image (or storage) device. But I will keep trying. Maybe I need to try other Virtio drivers as well. This particular system was a dual boot Linux Mint / Windows 7. I setup the VM as Linux and played around with it out of curiosity to see if I could boot Win7. Win7 begins to boot but soon it fails with BSOD and restarts to the GRUB bootloader. A dual booting VM... That's an interesting concept. Yes I thought it would be interesting too. Maybe not as practical as just installing the OSes on separate VM's which I've already done, but it seems to be another direction in the world of VM's.
June 2, 201511 yr I changed the VM boot order and booted from the Win7 Install ISO and attempted to load the drivers but so far have been unable to as Win7 install error returns with unable to find image (or storage) device. But I will keep trying. Maybe I need to try other Virtio drivers as well. FWIW, I loaded the VirtIO drivers on my Windows machine first, then made an image of it. That way when I booted for the first time the drivers were already installed on it.
June 2, 201511 yr I did in fact install vanilla Windows 7 with Virtio drivers a few times. I'm going to try to install Linux Mint as dual boot and see what happens. The vdisk1.img I created was from a dual boot laptop. Hope it works. Thanks for the suggestion.
June 2, 201511 yr I've now got a .vhd file within Windows, what's next? Do I need to further convert this (bit of a long winded exercise but i'm not able to physically move the drive between servers due to its location) to another format (iso?). How's this going to happen? As you'll have guessed i'm just stumblin' along in the almost dark (to me). All good fun tho ... With your .vhd file on your unRAID server, login via a terminal session (SSH or telnet) and use the following command to convert your VHD to a RAW image file: qemu-img convert -p -f vhd -O raw yourvm.vhd yourvm.img I'm assuming you know how to put the path to your images (source and destination) in the above code. Let me know if not.
June 2, 201511 yr Author Got 'something' running now ... had to drop the -O option as it wasn't being recognised so did 'qemu-img convert - p -f raw /mnt/disk2/VM/win7.vhd /mnt/cache/VM/win7.img and it's plodding thru slowly (16% in 4 mins on a vhd sized at 210GB. What needs doing next?
June 2, 201511 yr Got 'something' running now ... had to drop the -O option as it wasn't being recognised so did 'qemu-img convert - p -f raw /mnt/disk2/VM/win7.vhd /mnt/cache/VM/win7.img and it's plodding thru slowly (16% in 4 mins on a vhd sized at 210GB. What needs doing next? http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Physical_to_Virtual_Machine_Conversion_Process Documented and on the wiki as promised.
June 3, 201511 yr Author Thanks!!! I'll give it a go ... my .img file what entey does it replace in xml, its a bit confusing at that level.
June 3, 201511 yr Thanks!!! I'll give it a go ... my .img file what entey does it replace in xml, its a bit confusing at that level. ? You pick the .img file u created from within the webgui add vm page. Follow the steps in the guide from step 3 onward.
June 3, 201511 yr Author I only read from step3 that you leave the iso field blank and populate the virtio drivers entry. Where else do you specify an image file?? My vm 'created' and started automatically although i had nothing checked for startup. Obviously it failed to boot cos i'd not completed the script. I'll reread the wiki ...
June 3, 201511 yr I only read from step3 that you leave the iso field blank and populate the virtio drivers entry. Where else do you specify an image file?? My vm 'created' and started automatically although i had nothing checked for startup. Obviously it failed to boot cos i'd not completed the script. I'll reread the wiki ... Ok, I updated the guide again to rectify for one flaw, which was to create the VM first, and highlight Windows-specific steps to perform. Please re-read.
June 3, 201511 yr Author Nope ... just don't get it, sorry. I have an image file (win7.img) which I converted via qemu-img. Where exactly does that file fit in here? Is it the equivalent of your vdisk1.img and if so do i just edit xml to take account of the name? I think what i'm missing here is a portion of the wiki for those of us who will NOT, for whatever reason, be able to accomodate their existing physical Windows disk in their unRaid server and have an image file, as did I, in .vhd format which was used as the basis for the conversion. In my case I created an Acronis .tib file which was then converted to a Windows .vhd and moved to my unRaid server. My vm DOES eventually create after a couple of attempts at swapping between 'br0' and 'virbr0' for the network bridge entries, don't understand the ins and outs of that but after it creates it then ALWAYS goes on to start with autostart disabled and needs to be abandoned. What's going on there? My edit of xml file doesnt seem to fit with your example ... i have no cache=writeback line nor address type=virtio-disk0 lines to remove and I dont seem to have a field 'Start VM after creation' to uncheck? I've had a good number of goes but given my limited (as you'll have appreciated by now) understanding have now had to set it aside. ps I also couldn't get the -O option within qemu-img to be recognised and needed to drop it before the image conversion would complete. edit <moved on to .rc4 and now cannot get any VM template settings to be displayed when attempting to 'add vm' ... just quickly flashes up 'Loading' and then blanks, any ideas? My vm will no longer start 'Error: Cannot access storage file '/mnt/disk3/VMs/Win7.img' (as uid:0, gid:100): No such file or directory' ... yet the filestore hasn't changed between reboots?
June 3, 201511 yr Nope ... just don't get it, sorry. I have an image file (win7.img) which I converted via qemu-img. Where exactly does that file fit in here? Is it the equivalent of your vdisk1.img and if so do i just edit xml to take account of the name? I think what i'm missing here is a portion of the wiki for those of us who will NOT, for whatever reason, be able to accomodate their existing physical Windows disk in their unRaid server and have an image file, as did I, in .vhd format which was used as the basis for the conversion. In my case I created an Acronis .tib file which was then converted to a Windows .vhd and moved to my unRaid server. My vm DOES eventually create after a couple of attempts at swapping between 'br0' and 'virbr0' for the network bridge entries, don't understand the ins and outs of that but after it creates it then ALWAYS goes on to start with autostart disabled and needs to be abandoned. What's going on there? My edit of xml file doesnt seem to fit with your example ... i have no cache=writeback line nor address type=virtio-disk0 lines to remove and I dont seem to have a field 'Start VM after creation' to uncheck? I've had a good number of goes but given my limited (as you'll have appreciated by now) understanding have now had to set it aside. ps I also couldn't get the -O option within qemu-img to be recognised and needed to drop it before the image conversion would complete. edit <moved on to .rc4 and now cannot get any VM template settings to be displayed when attempting to 'add vm' ... just quickly flashes up 'Loading' and then blanks, any ideas? My vm will no longer start 'Error: Cannot access storage file '/mnt/disk3/VMs/Win7.img' (as uid:0, gid:100): No such file or directory' ... yet the filestore hasn't changed between reboots? Add a new VM and specify the win7.img file as the primary vdisk in step 2.
Archived
This topic is now archived and is closed to further replies.