Running virtual linux using qemu on windowsHow to run debian.iso on Windows using qemu?How to set up NAT for...

Under what conditions would I NOT add my Proficiency Bonus to a Spell Attack Roll (or Saving Throw DC)?

ESPP--any reason not to go all in?

What is "desert glass" and what does it do to the PCs?

Was it really inappropriate to write a pull request for the company I interviewed with?

PTIJ: Aliyot for the deceased

Replacing tantalum capacitor with ceramic capacitor for Op Amps

What does "rhumatis" mean?

Are small insurances worth it

Why do phishing e-mails use faked e-mail addresses instead of the real one?

Iron deposits mined from under the city

Ultrafilters as a double dual

Is every open circuit a capacitor?

Why would the IRS ask for birth certificates or even audit a small tax return?

How do we objectively assess if a dialogue sounds unnatural or cringy?

Remove object from array based on array of some property of that object

If nine coins are tossed, what is the probability that the number of heads is even?

Quitting employee has privileged access to critical information

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

PTiJ: How should animals pray?

Error in TransformedField

Create chunks from an array

Can a space-faring robot still function over a billion years?

Can inspiration allow the Rogue to make a Sneak Attack?

Where do you go through passport control when transiting through another Schengen airport on your way out of the Schengen area?



Running virtual linux using qemu on windows


How to run debian.iso on Windows using qemu?How to set up NAT for Qemu with TAP backend? (Windows 10)How do I install Windows 8 (from an ISO) using Q (qemu)?Can we say that QEMU is a Virtual Machine?Qemu KVM Passthrough - could not add USB deviceCant see local disk in oracle linux installation to dual boot windows 7 and oracle linuxRecompiled QEMU with OpenGL, but virt-manager or libvirt tells me This QEMU doesn't support spice OpenGLqemu - Could not initialize SDL(No available video device)Unable to build QEMU 2.12 with WHPX (Windows Hypervisor Platform) enabledHow to boot a physical Linux partition with Qemu for Windows 10 X64 bit?Running Alpine Linux on QEMU ARM guestsRunning a FreeBSD binary on Linux using qemu-user













7















I am trying to use Qemu 1.3 for windows to run lubuntu on a USB stick with Windows 7. After downloading and unpacking Qemu on my usb stick, if I click on qemu.io.exe, I get



qemu-io.exe>


How do I start my downloaded linux .iso file? It sounds basic but its not clear to me from the Qemu website.










share|improve this question





























    7















    I am trying to use Qemu 1.3 for windows to run lubuntu on a USB stick with Windows 7. After downloading and unpacking Qemu on my usb stick, if I click on qemu.io.exe, I get



    qemu-io.exe>


    How do I start my downloaded linux .iso file? It sounds basic but its not clear to me from the Qemu website.










    share|improve this question



























      7












      7








      7


      5






      I am trying to use Qemu 1.3 for windows to run lubuntu on a USB stick with Windows 7. After downloading and unpacking Qemu on my usb stick, if I click on qemu.io.exe, I get



      qemu-io.exe>


      How do I start my downloaded linux .iso file? It sounds basic but its not clear to me from the Qemu website.










      share|improve this question
















      I am trying to use Qemu 1.3 for windows to run lubuntu on a USB stick with Windows 7. After downloading and unpacking Qemu on my usb stick, if I click on qemu.io.exe, I get



      qemu-io.exe>


      How do I start my downloaded linux .iso file? It sounds basic but its not clear to me from the Qemu website.







      linux virtualization qemu






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 6 '15 at 22:39









      VividD

      1054




      1054










      asked Jan 24 '13 at 2:36









      user61629user61629

      1951413




      1951413






















          2 Answers
          2






          active

          oldest

          votes


















          2














          The Qemu manual would be a good place to start. It'll help you work out what you're supposed to do next, which is to tell qemu what to do, and exactly how to do that.






          share|improve this answer



















          • 1





            I'll take that as an answer, although the manual doesn't seem to be very specific for what I am trying to do. I'm not blown away by the docs here, unless I'm missing something.

            – user61629
            Jan 28 '13 at 15:38



















          12














          Here is how I run a minimal version of CentOS 7 on a Windows 7 Enterprise, 64 bits, without being a member of the administrator group (non-admin).



          The basic idea is:




          1. Download qemu for windows and unzip it anywhere

          2. Download an ISO image of the Linux distribution you want to run

          3. Create a file that will be your virtual machine hard disk

          4. Run qemu, booting from the CD image

          5. Install the OS

          6. Reboot the virtual machine, this time without the CD image


          Networking and fancy graphics are hard to get right. Still struggling, actually...



          1. Download QEMU



          Use a precompiled binary found on QEMU links page. I used version 2.8.0 for this.



          To "install" this version as a non-admin, open a command prompt, issue the command set __COMPAT_LAYER=RunAsInvoker and run qemu-w64-setup-20170131.exe from that prompt. Install in a folder where you have write permissions, like "My Documents" or something.



          2. Download an ISO image of Linux



          Again, help yourself. I used the Minimal distribution of CentOS 7, the file is called CentOS-7-x86_64-Minimal-1611.iso.



          3. Create a virtual hard disk



          I used a batch file for this. Copy the following to a file named createvm.bat and adjust the variables to suit your environment:



          @echo off
          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem Safety net
          rem ==================================
          if not exist hda.img (
          rem CREATE a virtual hard disk
          %QEMUDIR%qemu-img.exe create hda.img 40G
          ) else (
          echo file hda.img already exist. Delete or move and try again.
          goto:eof
          )


          4. Run QEMU, booting from the virtual CD



          Use a batch for this one, as you might use it often. Copy the follwing into installvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"
          set "ISOFILE=CentOS-7-x86_64-Minimal-1611.iso"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -cdrom %ISOFILE% -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot


          5. Install the OS



          I had trouble with the GUI installer. When prompted to install CentOS, hit the TAB key and replace the word quiet at the end of that line with the word text.



          Follow the installation instructions on screen. When the installation is finished, the virtual machine will exit. It can take quite a while, especially when running as a non-admin user.



          6. Run your Linux image in QEMU



          This step is what you will do over and over again to run the VM each time you need it. Copy the follwing into runvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot -device e1000,netdev=user.0 -netdev user,id=user.0,hostfwd=tcp::2222-:22


          I added a local portforward : if you ssh/putty to localhost:2222, you will reach the SSH daemon of your VM. Beware that firewalld or iptables might block traffic, depending on the way you installed Linux.






          share|improve this answer





















          • 1





            Much appreciated!

            – user61629
            Feb 1 '17 at 1:21











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f540849%2frunning-virtual-linux-using-qemu-on-windows%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          The Qemu manual would be a good place to start. It'll help you work out what you're supposed to do next, which is to tell qemu what to do, and exactly how to do that.






          share|improve this answer



















          • 1





            I'll take that as an answer, although the manual doesn't seem to be very specific for what I am trying to do. I'm not blown away by the docs here, unless I'm missing something.

            – user61629
            Jan 28 '13 at 15:38
















          2














          The Qemu manual would be a good place to start. It'll help you work out what you're supposed to do next, which is to tell qemu what to do, and exactly how to do that.






          share|improve this answer



















          • 1





            I'll take that as an answer, although the manual doesn't seem to be very specific for what I am trying to do. I'm not blown away by the docs here, unless I'm missing something.

            – user61629
            Jan 28 '13 at 15:38














          2












          2








          2







          The Qemu manual would be a good place to start. It'll help you work out what you're supposed to do next, which is to tell qemu what to do, and exactly how to do that.






          share|improve this answer













          The Qemu manual would be a good place to start. It'll help you work out what you're supposed to do next, which is to tell qemu what to do, and exactly how to do that.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 24 '13 at 7:20









          XyonXyon

          1,461815




          1,461815








          • 1





            I'll take that as an answer, although the manual doesn't seem to be very specific for what I am trying to do. I'm not blown away by the docs here, unless I'm missing something.

            – user61629
            Jan 28 '13 at 15:38














          • 1





            I'll take that as an answer, although the manual doesn't seem to be very specific for what I am trying to do. I'm not blown away by the docs here, unless I'm missing something.

            – user61629
            Jan 28 '13 at 15:38








          1




          1





          I'll take that as an answer, although the manual doesn't seem to be very specific for what I am trying to do. I'm not blown away by the docs here, unless I'm missing something.

          – user61629
          Jan 28 '13 at 15:38





          I'll take that as an answer, although the manual doesn't seem to be very specific for what I am trying to do. I'm not blown away by the docs here, unless I'm missing something.

          – user61629
          Jan 28 '13 at 15:38













          12














          Here is how I run a minimal version of CentOS 7 on a Windows 7 Enterprise, 64 bits, without being a member of the administrator group (non-admin).



          The basic idea is:




          1. Download qemu for windows and unzip it anywhere

          2. Download an ISO image of the Linux distribution you want to run

          3. Create a file that will be your virtual machine hard disk

          4. Run qemu, booting from the CD image

          5. Install the OS

          6. Reboot the virtual machine, this time without the CD image


          Networking and fancy graphics are hard to get right. Still struggling, actually...



          1. Download QEMU



          Use a precompiled binary found on QEMU links page. I used version 2.8.0 for this.



          To "install" this version as a non-admin, open a command prompt, issue the command set __COMPAT_LAYER=RunAsInvoker and run qemu-w64-setup-20170131.exe from that prompt. Install in a folder where you have write permissions, like "My Documents" or something.



          2. Download an ISO image of Linux



          Again, help yourself. I used the Minimal distribution of CentOS 7, the file is called CentOS-7-x86_64-Minimal-1611.iso.



          3. Create a virtual hard disk



          I used a batch file for this. Copy the following to a file named createvm.bat and adjust the variables to suit your environment:



          @echo off
          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem Safety net
          rem ==================================
          if not exist hda.img (
          rem CREATE a virtual hard disk
          %QEMUDIR%qemu-img.exe create hda.img 40G
          ) else (
          echo file hda.img already exist. Delete or move and try again.
          goto:eof
          )


          4. Run QEMU, booting from the virtual CD



          Use a batch for this one, as you might use it often. Copy the follwing into installvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"
          set "ISOFILE=CentOS-7-x86_64-Minimal-1611.iso"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -cdrom %ISOFILE% -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot


          5. Install the OS



          I had trouble with the GUI installer. When prompted to install CentOS, hit the TAB key and replace the word quiet at the end of that line with the word text.



          Follow the installation instructions on screen. When the installation is finished, the virtual machine will exit. It can take quite a while, especially when running as a non-admin user.



          6. Run your Linux image in QEMU



          This step is what you will do over and over again to run the VM each time you need it. Copy the follwing into runvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot -device e1000,netdev=user.0 -netdev user,id=user.0,hostfwd=tcp::2222-:22


          I added a local portforward : if you ssh/putty to localhost:2222, you will reach the SSH daemon of your VM. Beware that firewalld or iptables might block traffic, depending on the way you installed Linux.






          share|improve this answer





















          • 1





            Much appreciated!

            – user61629
            Feb 1 '17 at 1:21
















          12














          Here is how I run a minimal version of CentOS 7 on a Windows 7 Enterprise, 64 bits, without being a member of the administrator group (non-admin).



          The basic idea is:




          1. Download qemu for windows and unzip it anywhere

          2. Download an ISO image of the Linux distribution you want to run

          3. Create a file that will be your virtual machine hard disk

          4. Run qemu, booting from the CD image

          5. Install the OS

          6. Reboot the virtual machine, this time without the CD image


          Networking and fancy graphics are hard to get right. Still struggling, actually...



          1. Download QEMU



          Use a precompiled binary found on QEMU links page. I used version 2.8.0 for this.



          To "install" this version as a non-admin, open a command prompt, issue the command set __COMPAT_LAYER=RunAsInvoker and run qemu-w64-setup-20170131.exe from that prompt. Install in a folder where you have write permissions, like "My Documents" or something.



          2. Download an ISO image of Linux



          Again, help yourself. I used the Minimal distribution of CentOS 7, the file is called CentOS-7-x86_64-Minimal-1611.iso.



          3. Create a virtual hard disk



          I used a batch file for this. Copy the following to a file named createvm.bat and adjust the variables to suit your environment:



          @echo off
          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem Safety net
          rem ==================================
          if not exist hda.img (
          rem CREATE a virtual hard disk
          %QEMUDIR%qemu-img.exe create hda.img 40G
          ) else (
          echo file hda.img already exist. Delete or move and try again.
          goto:eof
          )


          4. Run QEMU, booting from the virtual CD



          Use a batch for this one, as you might use it often. Copy the follwing into installvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"
          set "ISOFILE=CentOS-7-x86_64-Minimal-1611.iso"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -cdrom %ISOFILE% -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot


          5. Install the OS



          I had trouble with the GUI installer. When prompted to install CentOS, hit the TAB key and replace the word quiet at the end of that line with the word text.



          Follow the installation instructions on screen. When the installation is finished, the virtual machine will exit. It can take quite a while, especially when running as a non-admin user.



          6. Run your Linux image in QEMU



          This step is what you will do over and over again to run the VM each time you need it. Copy the follwing into runvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot -device e1000,netdev=user.0 -netdev user,id=user.0,hostfwd=tcp::2222-:22


          I added a local portforward : if you ssh/putty to localhost:2222, you will reach the SSH daemon of your VM. Beware that firewalld or iptables might block traffic, depending on the way you installed Linux.






          share|improve this answer





















          • 1





            Much appreciated!

            – user61629
            Feb 1 '17 at 1:21














          12












          12








          12







          Here is how I run a minimal version of CentOS 7 on a Windows 7 Enterprise, 64 bits, without being a member of the administrator group (non-admin).



          The basic idea is:




          1. Download qemu for windows and unzip it anywhere

          2. Download an ISO image of the Linux distribution you want to run

          3. Create a file that will be your virtual machine hard disk

          4. Run qemu, booting from the CD image

          5. Install the OS

          6. Reboot the virtual machine, this time without the CD image


          Networking and fancy graphics are hard to get right. Still struggling, actually...



          1. Download QEMU



          Use a precompiled binary found on QEMU links page. I used version 2.8.0 for this.



          To "install" this version as a non-admin, open a command prompt, issue the command set __COMPAT_LAYER=RunAsInvoker and run qemu-w64-setup-20170131.exe from that prompt. Install in a folder where you have write permissions, like "My Documents" or something.



          2. Download an ISO image of Linux



          Again, help yourself. I used the Minimal distribution of CentOS 7, the file is called CentOS-7-x86_64-Minimal-1611.iso.



          3. Create a virtual hard disk



          I used a batch file for this. Copy the following to a file named createvm.bat and adjust the variables to suit your environment:



          @echo off
          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem Safety net
          rem ==================================
          if not exist hda.img (
          rem CREATE a virtual hard disk
          %QEMUDIR%qemu-img.exe create hda.img 40G
          ) else (
          echo file hda.img already exist. Delete or move and try again.
          goto:eof
          )


          4. Run QEMU, booting from the virtual CD



          Use a batch for this one, as you might use it often. Copy the follwing into installvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"
          set "ISOFILE=CentOS-7-x86_64-Minimal-1611.iso"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -cdrom %ISOFILE% -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot


          5. Install the OS



          I had trouble with the GUI installer. When prompted to install CentOS, hit the TAB key and replace the word quiet at the end of that line with the word text.



          Follow the installation instructions on screen. When the installation is finished, the virtual machine will exit. It can take quite a while, especially when running as a non-admin user.



          6. Run your Linux image in QEMU



          This step is what you will do over and over again to run the VM each time you need it. Copy the follwing into runvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot -device e1000,netdev=user.0 -netdev user,id=user.0,hostfwd=tcp::2222-:22


          I added a local portforward : if you ssh/putty to localhost:2222, you will reach the SSH daemon of your VM. Beware that firewalld or iptables might block traffic, depending on the way you installed Linux.






          share|improve this answer















          Here is how I run a minimal version of CentOS 7 on a Windows 7 Enterprise, 64 bits, without being a member of the administrator group (non-admin).



          The basic idea is:




          1. Download qemu for windows and unzip it anywhere

          2. Download an ISO image of the Linux distribution you want to run

          3. Create a file that will be your virtual machine hard disk

          4. Run qemu, booting from the CD image

          5. Install the OS

          6. Reboot the virtual machine, this time without the CD image


          Networking and fancy graphics are hard to get right. Still struggling, actually...



          1. Download QEMU



          Use a precompiled binary found on QEMU links page. I used version 2.8.0 for this.



          To "install" this version as a non-admin, open a command prompt, issue the command set __COMPAT_LAYER=RunAsInvoker and run qemu-w64-setup-20170131.exe from that prompt. Install in a folder where you have write permissions, like "My Documents" or something.



          2. Download an ISO image of Linux



          Again, help yourself. I used the Minimal distribution of CentOS 7, the file is called CentOS-7-x86_64-Minimal-1611.iso.



          3. Create a virtual hard disk



          I used a batch file for this. Copy the following to a file named createvm.bat and adjust the variables to suit your environment:



          @echo off
          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem Safety net
          rem ==================================
          if not exist hda.img (
          rem CREATE a virtual hard disk
          %QEMUDIR%qemu-img.exe create hda.img 40G
          ) else (
          echo file hda.img already exist. Delete or move and try again.
          goto:eof
          )


          4. Run QEMU, booting from the virtual CD



          Use a batch for this one, as you might use it often. Copy the follwing into installvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"
          set "ISOFILE=CentOS-7-x86_64-Minimal-1611.iso"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -cdrom %ISOFILE% -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot


          5. Install the OS



          I had trouble with the GUI installer. When prompted to install CentOS, hit the TAB key and replace the word quiet at the end of that line with the word text.



          Follow the installation instructions on screen. When the installation is finished, the virtual machine will exit. It can take quite a while, especially when running as a non-admin user.



          6. Run your Linux image in QEMU



          This step is what you will do over and over again to run the VM each time you need it. Copy the follwing into runvm.bat:



          @echo off

          rem ==================================
          rem Replace with your values
          rem ==================================
          set "QEMUDIR=%USERPROFILE%DocumentsWarezqemu-2.8.0-win64"

          rem ==================================
          rem You can add a w suffix to this if
          rem you don't want a console
          rem ==================================
          set "QEMUBIN=qemu-system-x86_64.exe"

          rem ==================================
          rem Run the virtual machine
          rem ==================================
          start "QEMU" %QEMUDIR%%QEMUBIN% -drive file=hda.img,index=0,media=disk,format=raw -m 2G -L Bios -usbdevice mouse -usbdevice keyboard -boot menu=on -rtc base=localtime,clock=host -parallel none -serial none -name centos -no-acpi -no-hpet -no-reboot -device e1000,netdev=user.0 -netdev user,id=user.0,hostfwd=tcp::2222-:22


          I added a local portforward : if you ssh/putty to localhost:2222, you will reach the SSH daemon of your VM. Beware that firewalld or iptables might block traffic, depending on the way you installed Linux.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 13 '17 at 16:45

























          answered Jan 31 '17 at 17:59









          ixe013ixe013

          573517




          573517








          • 1





            Much appreciated!

            – user61629
            Feb 1 '17 at 1:21














          • 1





            Much appreciated!

            – user61629
            Feb 1 '17 at 1:21








          1




          1





          Much appreciated!

          – user61629
          Feb 1 '17 at 1:21





          Much appreciated!

          – user61629
          Feb 1 '17 at 1:21


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f540849%2frunning-virtual-linux-using-qemu-on-windows%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...