Maybe I am missing something here, but… Why waste all this time playing around and “researching” when you could have already installed Windows from scratch in Virtualbox and tweaked to your liking?
You have to realize that your Windows activation will be void and you need to reactivate the VM which may fail as the key you try to activate is likely bound to a key in your hardware’s efivarfs.
This perhaps makes it a better choice to cough up a digtal windows license and install from scratch.
Conversion
There is likely several methods available - I have personally used the following with no issues.
It can be done but you have a few hoops to jump and you need a separate storage device with room for your Windows installation.
The old forum topic does not exist anymore.
Keep in mind what mode you current Windows boots (BIOS or EFI) - you will have to ensure the VM boot the same way. If you want a truly portable - independent VM - you need to go the reinstall in a VM defaulting to BIOS boot.
Depending on your choices and the Windows version you may need to do some registry editing prior to installing the system from scratch.
The steps to migrate your current Windows is - roughly - as follows
Locate download and install the Windows tool Disk2VHD - download from Microsoft
Locate and download the windows sdelete utility. - download from Microsoft
use sdelete to zero your running Windows unused space
defrag your windows windows
run sdelete one more time
use windows disk manager to resize the partition something between 80 and 127G
Use disktovhd to convert your running windows to hyperv using the vhdx format
Use vbox-manage to convert the vhdx file to a vdi file
Create a new Windows VM using virtualbox
If your current system is EFI you must use EFI otherwise the vm won’t start
and instead of creating a virtual disk you attach the vdi created above
It is a time consuing process which requires a lot of diskspace.
raw disk option
Another - less used option - is to add the physical device as a raw disk beforehand - so instead of creating a disk - for the newly created vm you can attach the raw device.
If you go down that road - you need to ensure you user has adequate rights to access a raw device - on the /dev/sdxY path - a normal user doesn’t and running the vm as root is not a good solution.
Using a raw device presents it’s own issues - e.g. device access is exclusive to the windows vm
I think so. On this topic, however, I wanted to focus on which type of approach (in terms of VM software) to use given the specs of my hardware. Should I have kept using that same thread?
Is what I am going to do if it gets too complicated.
Thanks for the detailed explanation @linux-aarhus . Sounds fun!
About point 3, 4 especially and 5. Should they be done on a SSD?
My Windows installation made three volumes: a Recovery Partition (500 MB), a EFI System Partition (100 MB) and a Basic Data Partition (the remaining space). In point 6 I have to convert the Basic Data Partition to vhdx format. Correct?
you want to create an image of the installation that you already have.
In order to do that efficiently, you do all the steps.
you did not follow the train of thought -
1 through 5 is what you do to the original windows system, before you create an image from it
ssd or not is irrelevant - put it wherever you like
a rather moot point as of now
and: what VM software you use is entirely up to you - your hardware will not pose different limitations in between the (effectively) only three choices that you have.
Sorry, “I think so” meant yes of course those was enough info to create a disk image. Poorly stated…
I guess I should have stayed on the previous thread.
I understand. I was just wondering whether zeroing or defrag an SSD would wear it. But I guess that is a necessary evil to make a good system image.
It is actually what I was trying to understand, which hypervisor software was better, whether a type 1 or 2. That makes things easier. Thanks.
If your Linux root filesystem is btrfs then you need to take into account how btrfs works with CoW which can be a severe pain when storing large files.
Either create a partition using ext4 for storage or disable CoW for the VirtualBox VMs folder.
That would be correct.
I remember one step you could add before creating the image.
if the partition is larger than 127GB - resize the partition to a reasonable size using windows diskpart gui.
It is larger. If I do not want to upset the current settings on the SSD, I was wondering, can I make a clone of the Basic Data Partition to my HDD and then there do the resizing and point 3, 4 & 5?
I don’t think I can do it directly on the vhdx, can I?
I’ve never run VBox, I must say it is a powerful and interesting tool.
So I went through 1, I skipped 2, 3, 4 & 5 for the moment, then 6, 7 and 8 until I found myself in front of that nice green arrow. Very exiting!
I did for a moment think disappointingly that was it. Luckily though I got this message:
No bootable medium found! Please insert a bootable medium and reboot.
That was so close! The game goes on.
I haven’t have time to delve too much but could it be that the Windows boot is on the Manjaro partition since I am in dual boot?
I haven’t found such setting in Vbox, in case this has anything to do with the above mentioned issue.
I’ll try to figure out whether I can solve it loading the original Window installation somehow, but if you have a clue on how to solve this I would be happy to opt for that too.
whatever happened afterward is irrelevant
why skip these steps?
all sdelete does is write zeroes to all of the disk that isn’t occupied by any file.
It makes compression much more efficient - to be able to create a small sized disk image.
That is the reason it is used - similar for the recommended defrag.
… if you don’t know what you are doing
and rely on help -
why go ahead and change the recommended procedure?
and then wonder what might have happened …
I’ll now just watch - will not interfere anymore.
Promise! - and good luck!
ps:
you should try learning VirtualBox (or whatever software you chose to use)
by simply using it to install and run the very same ISO of Manjaro that you used to install your now working system.
Or some other ISO - whatever you have got.
As an example, as an exercise … to get to know how to use it.
You should really - really do the described maintenance on your Windows before creating a vm from it.
In any case - your system - your rules.
There is no need for periodic defrag of ssd devices - such device is fundamentally different from a spinning disk. But when planning on moving to a vm it is good practise to ensure the initial vm is as small as technically possible. @Nachlese already pointed you to the why’s of the maintenance described.
Learning is always fun - and if you are on a learning path - I suggest you do more reading and more experimenting on your own - hands-on, notes, making mistakes, repetition, repetion and then some repetiion - not to mention muscle memory are fundamental in learning and remembering what you learned