Jump to content
ruthan

VM - stuck, USB keyboarding, not working for Windows preboot options

17 posts in this topic Last Reply

Recommended Posts

Hello,

i was stuck when i used Windows 7 64bit VM, VM worked great, but i after that because of standart power settings, hibernation was applied and i was stuck, on hibernation preboot screen, when i should to choice, if i want to resume or delete hibernation state - problem is that on this screen isnt - any timeout and USB keyboards werent worked here..

 

  In case of physical machine, i would use PS2 keyboard or Linux boot cd, to delete hibernation state.

 

  I found solution, but it wasnt user friendly, have also Linux VM, so i remove 1-windows vdisk and replaced it by Linux one, and added original as second disk,

after that i wanted to mount windows vdisk and delete hibernation file in windows partition root.

  I dont know why but, vdisk was bootable, only after gparted install, and wasnt described as standart sdX device, but as vdX device.. i dont think that in VM, should system know that machine is not physical one.

 

  Problem is that any preboot  - F8 menu interaction also is not working.

 

  I would really appreciate fix this bug and add some bootdevice combobox setting into VM definition page.

  I would also  appreciate possiblity view in read only mode machine definiton page, only xml view when is machine running its annoying.

  As new user i would also appreciate some Vmtools for shutdown whole unraid from guest machine, chained with quest shutdown.

 

Mainboard:

board 1151:GA-H61M-S2PV (rev. 2.2) / only USB2 ports

http://www.gigabyte.com/products/product-page.aspx?pid=4505#ov

 

Update: Im again stuck, i had bad shutdown and default boot option is now Repair console and its looped, because keyboard its not working.

 

Fortum verification quest are evil, are too american, i have to google them.

Share this post


Link to post

Fortum verification quest are evil, are too american, i have to google them.

You're not alone in that thought.

Share this post


Link to post

Setup another temporary Win7 VM and mount the current VMs drive as drive D (second drive in the unRAID GUI).  Then browse to the D drive and delete the hibernate file.  Shutdown the temporary VM and boot original hopefully it boots now.  If you already have another Windows VM then just use that.

Edited by BobPhoenix

Share this post


Link to post

Huh... I didn't consider that.

 

Thanks so much. I'll search around to see how to mount another drive into a new VM.

 

Thanks a lot actually.

 

Do you know if passing through an Entire USB Controller will allow the VM to have access to a keyboard connected to that controller before the Windows OS starts?

 

If anyone knows, get back to me. I have a feeling this may be an easier fix, if possible... (then I can just use the keyboard to actually select one of the Windows Resume Loader options).

Share this post


Link to post

Never tried that myself since all of my VMs and servers are Headless.  I use RDP to connect to the VMs and IPMI to connect to the servers.

 

You can make it boot from a bootable CD image too but you have to edit the XML directly and change the boot order.  Move the "<boot order='1'/>" line from the HDD to the CD then boot the image.  If you see a "<boot order='2'/>" on the CD then move it to the HDD or delete it.

 

Once you have it booting then just edit the VM in the unRAID GUI and your changes will be dropped.  Think you might have to actually save something to make the change happen.

 

 

Edited by BobPhoenix

Share this post


Link to post

Bob, you may have just saved my life.... Or...err... Vm.... Uhh.... You know what I mean!

 

Seriously, I looked for a similar solution; so, thanks for telling me, because the extra windows vm + mounting the  hibernated vm vdisk to delete hiberfile.sys... Yeah, that didn't work. The damn file wasn't there (even though it boots into Windows Resume Loader... ? ... o.O)

 

I'mma gonna try this 'soon ahz ah git home, sir!

 

Yew amazin' man!

 

FYI, i also couldn't get the damn passthrough to work properly and then the power went out in my place. So, then i had to restart unraid with an awesome 2TB parity check! Exciting!!!

 

=\

Share this post


Link to post

Sounds like you need a UPS.  I even have them for my important electronics like my TV.  Sorry the extra VM didn't work.  You sure you have hidden files displayed in it?  I unhide all files and extensions in Windows as the very first thing I do when I setup a Windows PC/VM.

Edited by BobPhoenix

Share this post


Link to post

Nope. That didn't work either. ... Sigh...

The keyboard is just not powering up...

 

Anyone know a fix for that?

 

Seems like it's my only option at this point.

Share this post


Link to post

So, it all boils down to this:

 

Mounting the drive-in another VM didn't work because the hibernation file didn't exist, changing the boot order for the CD-ROM to boot first didn't work because the keyboard still did not power up in order to hit a key when it asked to hit any key to start the CD, and no matter what I try for USB pass-through or USB controller pass-through, the USB keyboard doesn't power up during Windows Error Recovery or Windows Resume Loader.

 

Is there any other solution?

Share this post


Link to post

So your VM is using video and keyboard that is passed through not VNC?  Sorry my memory is fading if you said it earlier and I didn't reread to check.

 

What you might do if that is true is stop pass through so you can use unRAIDs built in simulated console using noVNC.  You should then be able to access the virtual keyboard that is included.  Then once you have video and keyboard access you can do a repair install.  If you cannot find the hibernation file and windows still won't boot then it sounds like it is expecting it to be there and cannot proceed without it.  So the only solution might be a repair install.  FIRST I would copy the image file of your VM somewhere so you have a backup before doing the repair install.

Share this post


Link to post

Bob! Back from the ashes! Epic.

 

Ok, got it working... err... fixed... you know what I mean...

 

In any case, I'll try your solution next time this happens. And... .... I don't actually know what VNC is, but I'll google it. In the meantime, I will be backing up my vdisk1.img to a passedthrough HDD that I use for this purpose (sort of) and then I can have a backup, should something go wrong.

 

For those wondering... here was my solution:

 - copied vdisk1.img to HDD

 - converted vdisk1.img to vdisk.vdi on my laptop running Maui (tried inside the Maui VM I installed on unRAID, but unfortunately, running a virtual machine inside a virtual machine does not work... or don't have the technical expertise to make it work) via eSATA'ing the HDD to the comp (I have two 3.5" hotswappable bays on my tower). [1]

 - ran vdisk.vdi in Maui's VM program (I'll give you a hint on which one: it rhymes with "irtualBox" =); created a whole new VM and all that jazz.

 - used my laptop keyboard in the VM software to fix Windows (Startup Repair from a CD-ROM iso; ended up using System Restore actually--worked fantastically).

 - converted vdisk.vdi back to vdisk1.img; on unRAID actually, using the native qemu-img command. [2]

 - MidnightCommando'd that shee-it back to my Windows VM domain folder.

 - Pretzel. ... Presto? Yeah. Presto!

 

Started a parity check once completed the System Restore Point (which I made sure to not have it complete until I got the damn .img back into the domain folder). But it's up and running, in full swing, no hiccups. Even re-updated my Steam games (like 4 of them).

 

[1] https://www.ostechnix.com/how-to-convert-img-file-to-vdi-file-using-oracle-virtualbox/

[2] https://www.agix.com.au/migrate-a-virtualbox-disk-image-vdi-to-a-qemu-image-img/

 

I really do appreciate all the support. If anyone has any questions, I'd be glad to try to assist.

 

A special thanks to you BobPhoenix for not giving up, yer a trooper, man!

 

Cheers.

Share this post


Link to post

Hey Bob, just googled that VNC thingy and yeah... I'm fairly certain my VM is passingthrough all peripherals and controllers and NOT using VNC (which I'm assuming VirtualBox does natively as software). Here's the code that's automatically generated (while the VM is running) when I check the VM XML file:

 

    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes' xvga='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

I think that means the VM is trying to find an old PS2 mouse 'n keyboard and the Video Card is passed through.

 

If you have insight or viola's, lemme know.

 

Thanks

Share this post


Link to post

Yep that's what it looks like to me.  You could re-enable the VNC video driver and get to what I was suggesting I think.  Here is what I have on my VM that doesn't have passed through video:

    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

In edit mode it looks like attached graphic.  With that once you start the VM you can then click on the icon in the unRAID GUI again and pick "VNC Remote".  You may have to watch the VM reboot or sent a cntl-alt-del to it and make it reboot but then you should be able to boot from an attache CD image and repair from there.

VNC video and keyboard.png

Oh your keyboard and mouse XML look the same as mine but if you edit in the unRAID GUI and setup the above and remove your Video card that is passed through you should be able to use the remote keyboard in the VM then.

Edited by BobPhoenix

Share this post


Link to post
7 hours ago, Pariah Scion said:

- converted vdisk.vdi back to vdisk1.img; on unRAID actually, using the native qemu-img command. [2]

You can use the .vdi file without conversion to a .img file on unRAID KVM.   You just have to enter the filename manually into the GUI.   

Edited by itimpi

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.