Virtualizing the host?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
DavidSpector
Posts: 21
Joined: 11. Apr 2021, 17:54

Virtualizing the host?

Post by DavidSpector »

Is it possible to virtualize the host? Reason: so I can test random possibly dangerous stuff then revert back to the original host state. (I already understand about disabling the guest's network adapter.) In other words, can I create a guest that actually is a subset of the resources of the host?

I'm a beginner, so if this question is stupid, I will be happy to delete it.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtualizing the host?

Post by scottgus1 »

DavidSpector wrote:Is it possible to virtualize the host?
Yes, with limitations. It's called physical-to-virtual, or P2V. The host OS must be licenseable to be transferred to another PC, and it may deactivate itself on the host when the licensing authority finds it in use on other hardware. OEM licenses or OS's preinstalled on large manufacturers of PC's might not P2V at all. P2V can also be tricky, needing some setup.
DavidSpector wrote:so I can test random possibly dangerous stuff then revert back to the original host state
This one will be harder. The VM is a separate 'PC', so you'd have to P2V it back, with similar setup and licensing issues....

A better idea might e to do a fresh install of the same OS in the VM and experiment on that.
DavidSpector wrote:a subset of the resources of the host?
The VM will use a portion of CPU, memory, and disk space. All the rest f the hardware is virtual and not related to the host hardware.
DavidSpector
Posts: 21
Joined: 11. Apr 2021, 17:54

Re: Virtualizing the host?

Post by DavidSpector »

Thank you! I am pleased that I asked a sensible question.

Good so far. So assume I want to create an empty Windows 10 Home guest on a Windows 10 Home host, and then install Windows 10 Home on the guest VM from the host Windows reinstallation partition on the host disk. How would I go about doing that? Or is this too difficult for a beginner in VM to accomplish easily?

What would I search for to find instructions for this on Google?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtualizing the host?

Post by scottgus1 »

DavidSpector wrote:from the host Windows reinstallation partition on the host disk.
From new install media through MS's Media Creation Tool is easy. I am not sure how to use the host reinstallation partition. We'll need to wait and see if someone has done this.
DavidSpector
Posts: 21
Joined: 11. Apr 2021, 17:54

Re: Virtualizing the host?

Post by DavidSpector »

Thank you!

Microsoft says (this forum doesn't allow me to post the web address) that I first need to have a license to download Windows 10 (in order to use the media creation tool), even though I already have Windows 10 Home installed. I don't have a license because my laptop already had Windows 10 Home installed on it. That is why I was thinking that sharing the reinstallation partition (whichever it is) might work.

I think you are right, I need guidance from an expert in Windows installation.

Maybe I can experiment myself if I can create a VM containing just the reinstallation partition. Or can't VirtualBox handle partitions? Can I at least create a VM that has no OS at all? How do I create the boot sector and files in an empty VM?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtualizing the host?

Post by scottgus1 »

DavidSpector wrote:Microsoft says (this forum doesn't allow me to post the web address) that I first need to have a license to download Windows 10 (in order to use the media creation tool)
I saw that for getting a 7 ISO, but not for 10. Your laptop should have a license, just have to download one of those product code readers off the internet.
Try https://www.microsoft.com/en-us/softwar ... /windows10, or this https://go.microsoft.com/fwlink/?LinkId=691209

There is a way to send a physical disk into a VM, it's called Raw Disk Access. But it is very much an expert feature, requires instant cross-checking to be sure the wrong drive is not used, and it won't work on the boot drive, nor just a partition on Windows hosts. You might be able to use Macrium Reflect Free to image the host drive, then restore the image into a VM, then try repairing the VM's OS and licensing with a new code. But getting an ISO for a fresh install is easier.

If you don't plan to keep this VM for a long time, get Microsoft's test/evaluation 10 Enterprise ISO, which is good for some months. https://www.microsoft.com/en-us/evalcen ... enterprise
DavidSpector
Posts: 21
Joined: 11. Apr 2021, 17:54

Re: Virtualizing the host?

Post by DavidSpector »

Thank you for all the information.

But that first link downloads a Windows 10 update from Oct 2020, which doesn't seem useful.

I did a search, and found the following instructions for getting the product key, which worked:

At an admin command prompt, type:

Code: Select all

wmic path SoftwareLicensingService get OA3xOriginalProductKey
So perhaps I can download a full Windows 10 Home ISO from Microsoft, using this product key.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtualizing the host?

Post by scottgus1 »

Yes, that will be the 20H2 version, which is the latest as of my web-searching as of ten seconds ago. :D

2021's is probably not out yet.
DavidSpector
Posts: 21
Joined: 11. Apr 2021, 17:54

Re: Virtualizing the host?

Post by DavidSpector »

I'm confused. I get Windows updates automatically every few weeks, so why would an update from last year be current? Youth wants to know.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtualizing the host?

Post by fth0 »

I'd guess that because the monthly Windows updates are usually cumulative, you merely need one Windows update after installing the "old" Windows version. And in todays world, installing the monthly updates is advisable anyway. So from Microsoft's point of view, why should they make the effort of creating a new full version every month?
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Virtualizing the host?

Post by BillG »

Microsoft has, for years now, tried to bring out an updated version of Windows 10 twice each year . The next one is called 21H1 and is currently in beta testing. Anyone can become a tester by joining the Insiders program.

Between these, they bring out a monthly update each month (usually on the second Tuesday of the month). As discussed previously, this is a cumulative update. If you do a fresh install of 20H2 today you do not have to install all the monthly updates from then until now - the latest cumulative update will install all of them in one go.

There may also be updates between these monthly ones if they find a fix for problem which could affect a lot of users. There are also updates to the anti-virus database at regular intervals, and device driver updates now and then. You can see all of the updates installed on your system by selecting View update history on the Windows Update page.
Bill
DavidSpector
Posts: 21
Joined: 11. Apr 2021, 17:54

Re: Virtualizing the host?

Post by DavidSpector »

This is off-topic, but have you actually ever applied a cumulative update of several months to a system that has not been updated? I have (actually in Windows 8.1), and the result takes many, many hours to complete. Probably each separate differential update is applied sequentially. I challenge you, or someone else brave enough, to install a Windows from 2020 and do all 6 cumulative updates at the same time to get a current Windows system. The only efficiency is that there is just one restart. Microsoft has a history of slow performance; for example, compare the many minutes it takes to search for a particular filename in the Explorer search bar in a loaded C disk to a second or two for the searching program Everything to find the same file. If Microsoft is going to add each file to a master search index, why doesn't Microsoft know how to use hash coding or B-trees to make the searching fast?
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Virtualizing the host?

Post by BillG »

That's an improvement on Windows 7. People regularly install Windows 7 on a vm (with automatic updates enabled) and complain in this forum that it is very slow.

The standard advice in reply is to let it run overnight and see how it goes next day. We rarely hear any more from them.

I have installed Windows 10 20H2 recently, which means it was 3-4 months behind. From memory it only had 3-4 updates, including the latest monthly cumulative, and didn't take an excessive amount of time. I do have a modern CPU and the system disc is on SSD.
Bill
DavidSpector
Posts: 21
Joined: 11. Apr 2021, 17:54

Re: Virtualizing the host?

Post by DavidSpector »

@billG Okay, thanks. Maybe the excessive update time I saw on 8.1 would not happen for 10. I still say that Microsoft's algorithms are designed with poor performance. Besides the searching example I gave, there are also the fundamental technologies, such as SxS (a very fine-grained system) and COM/automation, which is also very fine-grained. By constructing their programs out of subroutines (COM) that can be located anywhere on disk, they guarantee that many disk operations are needed for almost any operation. They have to counteract this horrible design by having various levels of caching to provide adequate performance.

Some areas of Windows design are quite good, including the wonderful Volume Shadow Copy service and the Hypervisor. Too bad that Volume Shadow Copy can't be used to rollback the entire Windows state after a virus attack.

If I were designing an OS, I would want each installed app to have a separate global state, so just the global effects of one app can be rolled back or backed up easily. And I would not use a centralized Registry Hive to provide planned obsolescence by growing larger without limit. I would store system and app state information in an efficient hash-coded or B-tree database which could be pruned automatically or by the user.

But, again, these are just my opinions and are off-topic for the question of how to make the host itself a guest so that mistakes or hostage viruses can be fixed more easily. I do tend to wander, sorry.
Post Reply