Running the same Windows both in KVM and physical

7,067

You can easily do this, just specify hard disk (using kvm or virt-install), for ex.:

kvm -hdd /dev/sda -m 1024

will boot OS from specified disk and allocate 1024 MB ofRAM.

You also may install it on hard disk using kvm or xen, but installer need access to full drive (/dev/sd$), so if you have one physical drive on ore computer installing OS from virtual mashine is a BAD idea.

Good Luck.

Share:
7,067

Related videos on Youtube

evertheylen
Author by

evertheylen

Updated on September 18, 2022

Comments

  • evertheylen
    evertheylen almost 2 years

    I have kind of an advanced question for you, I would like to install Windows on my hard drive (which is GPT formatted) but I would like to be also able to run it in KVM. To clarify, the same Windows installation should be able to be booted physical (without any host) and virtually in KVM, using Arch Linux as the host. I used to do this with my old laptop, however the disk it was using was formatted using an MS-DOS partition table.

    How can I accomplish this?

    My PC has an UEFI-capable motherboard.

    Thanks in advance.

    EDIT: One can use the custom BIOS images from the OVMF project to boot KVM with UEFI support: http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF However, Windows installer isn't working yet. It goes through the 'Loading files' and then fails.

    • Admin
      Admin over 11 years
      Sounds like gibberish to me. KVMs have nothing to do with running things virtually. And anything running on a KVM is running physically. (last time I checked anyway!) You should elaborate in detail about what you mean when you use these terms, because I don't think you are using the terms correctly. And saying "formatted using MBR" is technically gibberish too. So elaborate on what you mean by the terms you are using.
    • Admin
      Admin over 11 years
      I corrected what you said, although if KVM stands for Kernel-based Virtual Machine, why isn't it virtual then?
    • Admin
      Admin over 11 years
      oh, re KVM. I know KVM as a shorthand for KVM Switch - a device that lets you use multiple machines, aka KVM switch though there's also a KVM Extender which lets you use a computer remotely. I hadn't heard of this newer different meaning of KVM
    • Admin
      Admin over 11 years
      Probably my bad, I normally use tab to autocomplete; so on the original post (has been edited a lot already) it was tagged 'kvm-switch'. Only later I edited it to 'linux-kvm'.
    • Admin
      Admin over 11 years
      You might also want to consider what the Windows EULA states, i.e. physical and virtual installations are to be treated as distinct and require separate keys.
    • Admin
      Admin over 11 years
      Karan: Didn't read that :/ So, since you can't have multiple keys on one installation (not sure however) it is impossible to do what I want to do without infringing the UELA.
  • evertheylen
    evertheylen over 11 years
    Bad idea or not, Windows needs to be booted with UEFI to use a GPT partition table. KVM doesn't do that by default. I've already found the solution to boot with UEFI however, you might want to check it out yourself, just search for OVMF. Booting windows doesn't work however, but that's another problem.
  • loadaverage
    loadaverage over 11 years
    I don't know about uefi, i prefer bios so far. Maybe you can find uefi emulation feature in last virtualbox versions.