New
#11
Whats this now?
In PowerShell you do not execute things directly but instead need to specify either full or partial path to file being executed.
For instance:
OK:
Wrong:Code:.\sqmu-system-x86_64.exe -bood d -cdrom windows-21H2-X64.ISO -m 16384
Code:sqmu-system-x86_64.exe -bood d -cdrom windows-21H2-X64.ISO -m 16384
Another issue of yours is you need to enclose path into quotes if it contains spaces:
OK:
Wrong:Code:cd "C:\Program Files\qemu"
Code:cd C:\Program Files\qemu
Interesting, i ran as you suggest;
.\qemu-system-x86_64.exe -boot d -cdrom windows-21H2-X64.ISO -m 16384
The error i had before happened again but atleast it's working now.
By working i mean that qemu booted the windows iso.
But i could not finish the install because no storage was detected.
Does qemu use hardware virtualization? by default?
Should i enable hyperv or windows hypervisor platform when using qemu?
Any ideas how would i provide storage for qemu so it knows where to install the virtualmachine?
See docs:
Disk Images — QEMU documentation
You need to create virtual disk first.
It's format should be VHDX.
You then probably need to specify path to file with -drive flag, for ex:
prior to that you need to create virtual disk ofc: (ex. for 50GB virtual disk)Code:.\sqmu-system-x86_64.exe -bood d -cdrom windows-21H2-X64.ISO -m 16384 -drive file=c/path/to/virtualdisk.vhdx
Code:.\qemu-img create c/path/to/virtualdisk.vhdx 52428800
Of all the options why did you select VHDX?
PS: Tought 1GB = 1024MB so 1024x50 = 51200, how id you get the 52428800?
A suffix is necessary to run the command,
Invalid image size specified. You may use k, M, G, T, P or E suffixes for kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes.Code:.\qemu-img create C/Program Files/qemu/virtualdrive/virtualdisk.vhdx 52428800
So i tried,
But this didn't work, unrecognized option '-G'Code:.\qemu-img create C/Program Files/qemu/virtualdrive/virtualdisk.vhdx 52428800 -G
Last edited by FreeMind; 19 Jun 2023 at 13:19.
Because that's the virtual disk format which Windows will surely recognize.
Other formats might not be recognized.
The docs say:
Therefore you need to multiply 3 times.where myimage.img is the disk image filename and mysize is its size in kilobytes.
In my post #18 I've shown how to run commands which contain spaces.
Enclose the path into quotes.
I don't know if suffix is needed but it's good you've figured that out.
Keep in mind when you deal with so unpopular software the docs are your best friend, provided you don't skip anything and read line by line.
edit:
I'm sorry but it seems there is indeed one error:
method 1:
if not working then, method 2:Code:.\qemu-img create "/C/Program Files/qemu/virtualdrive/virtualdisk.vhdx" 52428800
if not working then, method 3:Code:.\qemu-img create "C:/Program Files/qemu/virtualdrive/virtualdisk.vhdx" 52428800
I though you're running this in bash shell.Code:.\qemu-img create "C:\Program Files\qemu\virtualdrive\virtualdisk.vhdx" 52428800
Ah it was kilobytes ofcourse, i looked at the docs but just briefly.
Well, i don't understand everything in the docs no matter how much i read. But it'll surely help.
Yeah i've edited my last reply, the suffix didn't even work, unsure how to use it as there is example in the docs.
The softwre might be unpopular compared to vmware or virtualbox but it's opensource, no proprietary BS. It has something to do with trust and freedom.
If i was to ever use linux and install qemu there, which filesystem would i use instead of VHDX?
- - - Updated - - -
Shouldn't that make the whole thing alot better?
Do you have a link? because I can't find this.
Anyway I think suffix has to do with disk size, ex. if the number is specified in giga bytes then you need suffix, but the default is kilobytes so there is no need
Linux should be able to recognize a variety of formats and file systems.
I don't know exactly but raw format should work.
Agree, open source is cool, but you can't completely escape close source.
There is always something which is not "free".
edit:
run help to see valid switches:
if not working then:Code:.\qemu-system-x86_64.exe /?
if not working then:Code:.\qemu-system-x86_64.exe -?
if not working then:Code:.\qemu-system-x86_64.exe -h
Code:.\qemu-system-x86_64.exe --help
I ment, i'm not sure how to use the suffix to specify the file size because there is no explanation in the docs.
They only said this: "You can add an M suffix to give the size in megabytes and a G suffix for gigabytes."
And i now i found this but.. this is a hell lot to read Invocation — QEMU documentation
How do you know that the default size is kylobites, did the docs say that?
But there is a need to specify the filesize with a parameter like -g, atleast it doesn't work when i run the command without a suffix.
I already used --help and again it's just a massive amount of a textwall, i would spend ages reading all that, looking for particular information isn't easy to, it's a maze.