QEMU Virtualmachine Powershell Error

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 44
    Windows 10
    Thread Starter
       #11

    Whats this now?
    Attached Thumbnails Attached Thumbnails QEMU Virtualmachine Powershell Error-capture.png  
      My Computer


  2. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #12

    Hello @FreeMind,

    It appears that a file that is needed can NOT be found !

    The original download could have been corrupted somehow. Have you tried uninstalling and re-installing the program ?
      My Computer


  3. Posts : 1,746
    Windows 10 Pro x64 22H2
       #13

    FreeMind said:
    1. installed qemu on windows 10
    2. followed the instructions from here:
    How to Install QEMU on Windows 11 QEMU Installation Guide + Use Qemu on Windows 11 + Boot ISO Image - YouTube
    QEMU Installation Guide for Windows PC 2022 - YouTube
    One is for w10 the other w11 but the instructions are identical, on their videos it works, on my system it doesn't.

    When i execute the command they use, powershell responds by saying the command i use is basically invalid.
    Any hints?
    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:
    Code:
    .\sqmu-system-x86_64.exe -bood d -cdrom windows-21H2-X64.ISO -m 16384
    Wrong:
    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:
    Code:
    cd "C:\Program Files\qemu"
    Wrong:
    Code:
    cd C:\Program Files\qemu
      My Computer


  4. Posts : 44
    Windows 10
    Thread Starter
       #14

    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?
    Attached Thumbnails Attached Thumbnails QEMU Virtualmachine Powershell Error-capture2.png  
      My Computer


  5. Posts : 1,746
    Windows 10 Pro x64 22H2
       #15

    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:

    Code:
    .\sqmu-system-x86_64.exe -bood d -cdrom windows-21H2-X64.ISO -m 16384 -drive file=c/path/to/virtualdisk.vhdx
    prior to that you need to create virtual disk ofc: (ex. for 50GB virtual disk)
    Code:
    .\qemu-img create c/path/to/virtualdisk.vhdx 52428800
      My Computer


  6. Posts : 44
    Windows 10
    Thread Starter
       #16

    zebal said:
    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:

    Code:
    .\sqmu-system-x86_64.exe -bood d -cdrom windows-21H2-X64.ISO -m 16384 -drive file=c/path/to/virtualdisk.vhdx
    prior to that you need to create virtual disk ofc: (ex. for 50GB virtual disk)
    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,
    Code:
    .\qemu-img create C/Program Files/qemu/virtualdrive/virtualdisk.vhdx 52428800
    Invalid image size specified. You may use k, M, G, T, P or E suffixes for kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes.
    So i tried,
    Code:
    .\qemu-img create C/Program Files/qemu/virtualdrive/virtualdisk.vhdx 52428800 -G
    But this didn't work, unrecognized option '-G'
    Last edited by FreeMind; 19 Jun 2023 at 13:19.
      My Computer


  7. Posts : 1,746
    Windows 10 Pro x64 22H2
       #17

    FreeMind said:
    Of all the options why did you select VHDX?
    Because that's the virtual disk format which Windows will surely recognize.
    Other formats might not be recognized.

    FreeMind said:
    PS: Tought 1GB = 1024MB so 1024x50 = 51200, how id you get the 52428800?
    The docs say:
    where myimage.img is the disk image filename and mysize is its size in kilobytes.
    Therefore you need to multiply 3 times.

    FreeMind said:
    A suffix is necessary to run the command,
    Code:
    .\qemu-img create C/Program Files/qemu/virtualdrive/virtualdisk.vhdx 52428800
    So i tried,
    Code:
    .\qemu-img create C/Program Files/qemu/virtualdrive/virtualdisk.vhdx 52428800 -G
    But this didn't work,
    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:
    Code:
    .\qemu-img create "/C/Program Files/qemu/virtualdrive/virtualdisk.vhdx" 52428800
    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.
      My Computer


  8. Posts : 44
    Windows 10
    Thread Starter
       #18

    zebal said:
    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.



    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.
    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?
    Attached Thumbnails Attached Thumbnails QEMU Virtualmachine Powershell Error-0.png  
      My Computer


  9. Posts : 1,746
    Windows 10 Pro x64 22H2
       #19

    FreeMind said:
    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.
    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

    FreeMind said:
    If i was to ever use linux and install qemu there, which filesystem would i use instead of VHDX?
    Linux should be able to recognize a variety of formats and file systems.
    I don't know exactly but raw format should work.

    FreeMind said:
    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.

    Shouldn't that make the whole thing alot better?
    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:
    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
    if not working then:
    Code:
    .\qemu-system-x86_64.exe --help
      My Computer


  10. Posts : 44
    Windows 10
    Thread Starter
       #20

    zebal said:
    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:
    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
    if not working then:
    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.
    Attached Thumbnails Attached Thumbnails QEMU Virtualmachine Powershell Error-0.png  
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:19.
Find Us




Windows 10 Forums