Category Archives: HyperV

Hyper-V encountered an error trying to access object on computer

Just repeating in one spot the two solutions for this problem, since I spent a but of time being stymied by this on two separate occasions now.  The first thing to try from the command line is:

MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof

Are any of your VM’s non-startable? For example do you have an old VM you didn’t plan to use anymore so you stopped it and deleted the VHD but left the entry?  If so you may encounter the error in the title when trying to add a new VM or similar.  If so delete the entry that is no longer needed.

If that doesn’t work, drop down to powershell and run

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

This will disable/remove the Hyper V feature.  Reboot and the re-install with

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

The last solution was required when I switched to a new router on my network, afterward Hyper-V core showed only one NIC (there are two physical on the machine) but everything else ran fine.  Until I tried to add a new VM a few weeks later,  then I got the message at the top.   You will have to setup new virtual switches and reconfigure your VM’s to use them in this case.

 

Reference : https://serverfault.com/questions/859019/hyper-v-encountered-an-error-trying-to-access-object-on-computer

 

 

 

Ubuntu : Increasing screen resolution in VM

Quick tip for boosting resolution in a Ubuntu VM in HyperV

from terminal

sudo gedit /etc/default/grub

Edit or add the the assignment to RUB_CMDLINE_LINUX_DEFAULT

RUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"

I chose 1920×1080 as this is the current maximum that the Hyper-V machine connection will support and it is less than what my monitor supports, change this to a value that makes sense for you.

After saving run:

sudo update-grub

And then reboot your virtual machine