QEMU Virtualmachine Powershell Error

Page 3 of 3 FirstFirst 123

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

    FreeMind said:
    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."
    The word "suffix" means it's appended to something, therefore to specify 50 gigabytes:
    Code:
    .\qemu-img create "C:\Program Files\qemu\virtualdrive\virtualdisk.vhdx" 50G
    FreeMind said:
    How do you know that the default size is kylobites, did the docs say that?
    yes, it's stated here:
    Disk Images — QEMU documentation

    FreeMind said:
    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.
    Well all the info I gave you so far comes from the docs, I know nothing about qemu and how to use it.

    here is a hint to quickly find what you need, don't use site search function, use google, ex:
    Code:
    disk default size site:https://qemu-project.gitlab.io
    enter your search string into google, and specify site: followed by link and you'll get plenty of useful results.

    search string should be as short as possible to get good results.
    search string should contain only verbs and adjectives, don't use conjunction or any kind of precise grammar, just words:

    for instance:
    OK:
    disk default size
    Bad:
    What is the default size of virtual disk?
    You practice this and there is no such thing you won't be able to find online.

    If you get too many irrelevant results add some more words into your search string, otherwise if you get too few results remove some words until you find perfect balance.
      My Computer


  2. Posts : 44
    Windows 10
    Thread Starter
       #22

    zebal said:
    The word "suffix" means it's appended to something, therefore to specify 50 gigabytes:
    Code:
    .\qemu-img create "C:\Program Files\qemu\virtualdrive\virtualdisk.vhdx" 50G

    yes, it's stated here:
    Disk Images — QEMU documentation


    Well all the info I gave you so far comes from the docs, I know nothing about qemu and how to use it.

    here is a hint to quickly find what you need, don't use site search function, use google, ex:
    Code:
    disk default size site:https://qemu-project.gitlab.io
    enter your search string into google, and specify site: followed by link and you'll get plenty of useful results.

    search string should be as short as possible to get good results.
    search string should contain only verbs and adjectives, don't use conjunction or any kind of precise grammar, just words:

    for instance:
    OK:

    Bad:


    You practice this and there is no such thing you won't be able to find online.

    If you get too many irrelevant results add some more words into your search string, otherwise if you get too few results remove some words until you find perfect balance.
    Oh.. i tought suffix means it's supposed to be added at the end of an command.
    You have all the info you gave me from the docs, lol.. maybe i should spend a little bit of time reading aswell

    Hm, well i quit using google search a while ago because all requests are sent to bigbrother, have you tried search.brave.com?
    Thanks for the tipp i've never used searchstrings before.. but it works with brave aswell,
    disk default size site:https://qemu-project.gitlab.io - Brave Search

    When i run;
    Code:
    .\qemu-img create "C:\Program Files\qemu\virtualdrive\virtualdisk.vhdx" 50G
    powershell responds with "no such file or directory" as shown on attachment, i'm sure there's an easy explanation on a blind person could miss so i might be precisely that after all.
    I did create this directory C:\Program Files\qemu\virtualdrive and tought qemu would now create the virtualdisk there when i run your command, why does it fail?

    Plus qemu is running super slow, not sure why but it might be hardware acceleration?
    When i ran
    Code:
    .\qemu-system-x86_64.exe -enable-kvm
    powershell responded with invalid accelerator kvm.
    I found that command when i searched why qemu is running that slow.. barely usable.
    It might be the command didn't work because kvm is a seperate program/addon i didn't even download/install yet, anyways this whole process of using qemu is way more effort than expected, unlike vmware or virtualbox that are really easy to setup.
    Then again, these are proprietary, atleast partialy.
      My Computer


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

    FreeMind said:
    When i run;
    Code:
    .\qemu-img create "C:\Program Files\qemu\virtualdrive\virtualdisk.vhdx" 50G
    powershell responds with "no such file or directory"
    I did create this directory C:\Program Files\qemu\virtualdrive and tought qemu would now create the virtualdisk there when i run your command, why does it fail?
    Please try this instead:
    Code:
    .\qemu-img create virtualdisk.vhdx 50G
    This should create the disk in current directory from where qemu-img is run, does it work? any errors?

    FreeMind said:
    Plus qemu is running super slow, not sure why but it might be hardware acceleration?
    It's difficult to know why.

    FreeMind said:
    When i ran
    Code:
    .\qemu-system-x86_64.exe -enable-kvm
    powershell responded with invalid accelerator kvm.
    it means that qemu-system-x86_64.exe was not compiled with that option:
    This option is only available if KVM support is enabled when compiling.
    There is nothing you can do to make it work out of the box, at least not in an easy way.
      My Computer


  4. Posts : 44
    Windows 10
    Thread Starter
       #24

    zebal said:
    Please try this instead:
    Code:
    .\qemu-img create virtualdisk.vhdx 50G
    This should create the disk in current directory from where qemu-img is run, does it work? any errors?


    It's difficult to know why.


    it means that qemu-system-x86_64.exe was not compiled with that option:


    There is nothing you can do to make it work out of the box, at least not in an easy way.
    Thanks you very much i appriciate the help! This command
    Code:
    .\qemu-img create virtualdisk.vhdx 50G
    works!
    I'll try again now to create some vm's!

    - - - Updated - - -

    Hmm, creating the vhdx worked, but when installing windows there is still no disk to select?
      My Computer


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

    FreeMind said:
    Hmm, creating the vhdx worked, but when installing windows there is still no disk to select?
    Now that you made virtual disk you need to let qemu know where it is, see my post #15

    Specify -drive and path to disk which was created.

    Btw. it seem qemu is ignorant of windows paths, so you'll need to use either forward slashes or double back slashes and don't forget to use quotes for for paths with spaces.

    it's also possible that paths with spaces are not supported at all, in which case qemu needs to be installed in path withotu spaces and created disk must be created in path without spaces.
      My Computer


  6. Posts : 44
    Windows 10
    Thread Starter
       #26

    zebal said:
    Now that you made virtual disk you need to let qemu know where it is, see my post #15

    Specify -drive and path to disk which was created.

    Btw. it seem qemu is ignorant of windows paths, so you'll need to use either forward slashes or double back slashes and don't forget to use quotes for for paths with spaces.

    it's also possible that paths with spaces are not supported at all, in which case qemu needs to be installed in path withotu spaces and created disk must be created in path without spaces.
    Attached Thumbnails Attached Thumbnails QEMU Virtualmachine Powershell Error-f.png  
      My Computer


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

    Sorry but I'm not sure I can help, the documentation is vast and I don't find the right syntax.

    But I'm pretty sure qemu is ignorant of windows paths.
    I suggest you to install it somewhere so that no spaces are used, this way qemu should be able to figure out format from extension because you won't need to en-quote the path.
      My Computer


  8. Posts : 44
    Windows 10
    Thread Starter
       #28

    Thank you anyways!
    I installed qemu in documents directory where is no spaces, but i'm getting the same error as previously, "specify the raw format".

    - - - Updated - - -

    I could add some sreenshots if that makes any impact, but really it's just the same error as before even when installed in a directory with no spaces.
    Question is, how do i specifiy the image format? Let me guess a hot take, read the wiki/manual.. Time time time t..
      My Computer


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

    See this:
    macos - How to resolve "Specify the 'raw' format explicitly to remove the restrictions." in qemu? - Stack Overflow

    Therefore:
    -drive file=virtualdisk.vhdx,format=vhdx,index=0,media=disk
      My Computer


  10. Posts : 44
    Windows 10
    Thread Starter
       #30

    Code:
    .\qemu-system-x86_64.exe -boot d -cdrom windows-21H2-X64.ISO -m 16384 -drive file=C:/Users/michael/Documents/qemu/virtualdisk.vhdx -drive file=virtualdisk.vhdx,format=vhdx,index=0,media=disk
    or maybe
    Code:
    .\qemu-system-x86_64.exe -boot d -cdrom windows-21H2-X64.ISO -m 16384 -drive file=virtualdisk.vhdx,format=vhdx,index=0,media=disk
    No clue what im doing

    have you seen this? virtualization - Running virtual linux using qemu on windows - Super User
      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 13:00.
Find Us




Windows 10 Forums