November 8, 20178 yr I routinely take backups of my VM image file. Recently I had a program install go bad, and was unable to clean up the mess. So I decided to restore to a backup from about a month ago and start over. I restored the .img file to a different file name, and editted the XML to point to the new file and it it would not boot. Putting the current image back, booted fine. I managed to boot the backup from the CD image (needed to reduce to one CPU and put into VNC mode), and was able to enter the recovery console. Tried multiple things but virtual drive was just not visible. I had a problem installing an old Win2k image where I had a similar problem, and @gridrunner suggested I changed the disk image from vfio virtio to IDE. It worked for the Win2k. And after that change, my VM backup booted just fine. So have two questions: 1. Why did the old image not boot? The backup was taken when the VM was shut down. It should have worked just fine. I did RAR the image, but that shouldn't matter. 2. What do I need to do so that the drive can be switched back to vfio virtio again and benefit from the faster I/O? Thanks for any ideas or assistance!! -SSD
November 8, 20178 yr Author Ok - figured this out. If you ever have a problem with a VM image not wanting to boot from a "virtio" drive - do this: (Note you can edit the XML and set the the drive to IDE. It will be slower. But at least you'll know that the image is ok) To get it working with virtio, do the following: 1 - Manually edit and make a backup of your VM XML (copy and paste into a text file is fine, the cancel. 2 - Edit the the VM Template (using VM Manager GUI). SELECT ONLY ONE THREAD OF ONE CPU! Set the display to VNC. Make sure your Windows10.iso and virtual drivers CD image are included. Should be there unless you manually removed them. 3 - Start the VM, and immediately start the VNC (which is an option when you click on the running VM icon). If you see the option to boot from the CD, press space or enter or whatever it says to do it. Go to step 7 4 - Ok - so if it doesn't offer to boot from the CD, and you get some gobblty gook messages with a command prompt you have no idea what to do with, you need to force stop the VM, and manually edit the XML. 5 - Set the boot order of the Windows CD to 1, and the boot order of the image file to 2 (they will probably be backwards of that, or CD may not have a boot order). 6 - Now restart the VM and start the VNC. If you're fast enough you should see the option to boot from the CD, which you should do. 7 - Select to install Windows (we're not really going to install Windows). 8 - Click through the next few screen - tell it you have no product key, installing Window Pro (probably doesn't matter), and that you are doing a custom install. You will then get the screen where you are to tell it where you will install Windows. Likely there are no drives shown. (If your drive is seen this is not your problem! You probably can exit out and try searching for your own solution, although what follows should do no harm) 9 - Select the option to load drivers. 10 - Cursor to your virtual drivers CD. Click right arrow (don't hit enter), and select the "viostor" folder and then right arrow and select the "amd64" folder" 11 - The "Red Hat VirtIO ..." line will show. Hit enter. 12 - The driver will load. Not sure where it is loading exactly, but once it is loaded it is loaded and your computer will recognize the virtio disk for booting. 13 - Press ESC. And you can shutdown the VM. I use the "Force Shutdown" option from VM Manager. 14 - Now you need to put the XML back to the original. A little manual editting is fine, but might be easier to copy and paste the original XML you backed up in step 1. Make sure the disk image file is correct. 15 - Boot. Should work! Good luck!
November 9, 20178 yr You should also be able to attach another disk image to the VM as virtio and install drivers and then change the boot image to virtio and boot again and delete the temporary virtio drive from the vm. That is how I did WHSv1 anyway boot drive IDE second 1MB drive virtio. Install drivers in WHS and then switch the boot image to virtio and delete the 1MB drive image from vm and disk.
November 9, 20178 yr Author I had read that too but didn't work for me. I already had a second virtio disk - and adding a third did not help. In my case the driver was already installed in Windows. I didn't try re-installing. That might have fixed it. Still not clear where the installed driver that gets loaded as part of the Windows install (needed to partition the drive) is stored. But it must be because it gets loaded prior to every boot. It can't be on the Windows boot disk - because that disk requires the driver to be accessed. Chicken and egg issue. Can only guess it is stored in the BIOS somehow. The method above was something that I tried and worked. I knew that the Windows install, at some point, boots the machine into the Windows it just installed. The only way that boot would work is if the Virtio driver was loaded. And the only possible way it could do that was based "remembering" the driver that got manually loaded as part of the Windows install. Was certainly happy when it worked! Externalizing all of my data and even "portable" programs that don't require installation really helped. I didn't need to do much of anything to bring the backup up to date.
Archived
This topic is now archived and is closed to further replies.