I have a new HP PC with AMD quad CPU that came with Win7 installed. I installed Fedora 15 by first shrinking the hard drive ntfs partition in half and letting the Fedora installation set up the dual boot configuration in the GRUB boot menu. That all works fine. I can boot either O/S with no problems or side effects.
Now to take this to the next level, I would like to setup a Win7 VM under Fedora that uses the Win7 installation that is already available in the Win 7 partition. Running the original Win 7 installation as a VM guest would be cool - efficient use of storage, the Win7 license and convenient - along with the existing option to reboot into Win 7. The Fedora Virtualization Guide documentation does not seem to cover this case where the O/S install exists before the VM is created.
Can this be done? Have you done it successfully? What are the details?
Dave
On Wed, 2011-09-21 at 15:02 -0400, David C. Mores wrote:
I have a new HP PC with AMD quad CPU that came with Win7 installed. I installed Fedora 15 by first shrinking the hard drive ntfs partition in half and letting the Fedora installation set up the dual boot configuration in the GRUB boot menu. That all works fine. I can boot either O/S with no problems or side effects.
Now to take this to the next level, I would like to setup a Win7 VM under Fedora that uses the Win7 installation that is already available in the Win 7 partition. Running the original Win 7 installation as a VM guest would be cool - efficient use of storage, the Win7 license and convenient - along with the existing option to reboot into Win 7. The Fedora Virtualization Guide documentation does not seem to cover this case where the O/S install exists before the VM is created.
Can this be done? Have you done it successfully? What are the details?
This is not as easy as you'd like it to be. KVM presents the guest OS with an entirely different chipset and IO devices from the physical system. It's effectively the same as yanking out your hard drive and installing it into an old pentium-pro class system and expecting Windows to "just work". Some have done it, with much registery hacking, but it's not easy and appears fragile.
Alex
Alex Williamson wrote:
On Wed, 2011-09-21 at 15:02 -0400, David C. Mores wrote:
I have a new HP PC with AMD quad CPU that came with Win7 installed. I installed Fedora 15 by first shrinking the hard drive ntfs partition in half and letting the Fedora installation set up the dual boot configuration in the GRUB boot menu. That all works fine. I can boot either O/S with no problems or side effects.
Now to take this to the next level, I would like to setup a Win7 VM under Fedora that uses the Win7 installation that is already available in the Win 7 partition. Running the original Win 7 installation as a VM guest would be cool - efficient use of storage, the Win7 license and convenient - along with the existing option to reboot into Win 7. The Fedora Virtualization Guide documentation does not seem to cover this case where the O/S install exists before the VM is created.
Can this be done? Have you done it successfully? What are the details?
This is not as easy as you'd like it to be. KVM presents the guest OS with an entirely different chipset and IO devices from the physical system. It's effectively the same as yanking out your hard drive and installing it into an old pentium-pro class system and expecting Windows to "just work". Some have done it, with much registery hacking, but it's not easy and appears fragile.
Alex
I thought that to be one of Window's strengths - to "just work" in many hardware environments. Can you point me to any information or discussion resources where I could find discussion and more details on how others have done this?
Thanks, Dave
On 09/22/2011 08:03 AM, David C. Mores wrote:
Alex Williamson wrote:
On Wed, 2011-09-21 at 15:02 -0400, David C. Mores wrote:
I have a new HP PC with AMD quad CPU that came with Win7 installed. I installed Fedora 15 by first shrinking the hard drive ntfs partition in half and letting the Fedora installation set up the dual boot configuration in the GRUB boot menu. That all works fine. I can boot either O/S with no problems or side effects.
Now to take this to the next level, I would like to setup a Win7 VM under Fedora that uses the Win7 installation that is already available in the Win 7 partition. Running the original Win 7 installation as a VM guest would be cool - efficient use of storage, the Win7 license and convenient - along with the existing option to reboot into Win 7. The Fedora Virtualization Guide documentation does not seem to cover this case where the O/S install exists before the VM is created.
Can this be done? Have you done it successfully? What are the details?
This is not as easy as you'd like it to be. KVM presents the guest OS with an entirely different chipset and IO devices from the physical system. It's effectively the same as yanking out your hard drive and installing it into an old pentium-pro class system and expecting Windows to "just work". Some have done it, with much registery hacking, but it's not easy and appears fragile.
Alex
I thought that to be one of Window's strengths - to "just work" in many hardware environments.
Exactly the opposite, if you ask me. You change a piece of hardware and Windows thinks someone is running a bootleg version and you have to re-register, etc.
Bill
Can you point me to any information or discussion resources where I could find discussion and more details on how others have done this?
Thanks, Dave
virt mailing list virt@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/virt
On Thu, Sep 22, 2011 at 08:03:11AM -0400, David C. Mores wrote:
Alex Williamson wrote:
On Wed, 2011-09-21 at 15:02 -0400, David C. Mores wrote:
I have a new HP PC with AMD quad CPU that came with Win7 installed. I installed Fedora 15 by first shrinking the hard drive ntfs partition in half and letting the Fedora installation set up the dual boot configuration in the GRUB boot menu. That all works fine. I can boot either O/S with no problems or side effects.
Now to take this to the next level, I would like to setup a Win7 VM under Fedora that uses the Win7 installation that is already available in the Win 7 partition. Running the original Win 7 installation as a VM guest would be cool - efficient use of storage, the Win7 license and convenient - along with the existing option to reboot into Win 7. The Fedora Virtualization Guide documentation does not seem to cover this case where the O/S install exists before the VM is created.
Can this be done? Have you done it successfully? What are the details?
This is not as easy as you'd like it to be. KVM presents the guest OS with an entirely different chipset and IO devices from the physical system. It's effectively the same as yanking out your hard drive and installing it into an old pentium-pro class system and expecting Windows to "just work". Some have done it, with much registery hacking, but it's not easy and appears fragile.
In addition to this, Windows won't work on an unpartitioned disk. There's a very hacky way to do it:
https://rwmj.wordpress.com/2010/09/30/technique-for-synthesizing-a-partition...
I thought that to be one of Window's strengths - to "just work" in many hardware environments. Can you point me to any information or discussion resources where I could find discussion and more details on how others have done this?
Windows Product Activation will decide that you're trying to run Windows on a different piece of hardware and will decide you're not in compliance. (This is quite likely to be true.) You'll at least need to reactivate Windows each time you switch from physical to virtual; and maybe purchase another license.
You might also need to change the Critical Device Database, HAL, and other things to get it to boot.
Rich.
Richard W.M. Jones wrote:
On Thu, Sep 22, 2011 at 08:03:11AM -0400, David C. Mores wrote:
Alex Williamson wrote:
On Wed, 2011-09-21 at 15:02 -0400, David C. Mores wrote:
I have a new HP PC with AMD quad CPU that came with Win7 installed. I installed Fedora 15 by first shrinking the hard drive ntfs partition in half and letting the Fedora installation set up the dual boot configuration in the GRUB boot menu. That all works fine. I can boot either O/S with no problems or side effects.
Now to take this to the next level, I would like to setup a Win7 VM under Fedora that uses the Win7 installation that is already available in the Win 7 partition. Running the original Win 7 installation as a VM guest would be cool - efficient use of storage, the Win7 license and convenient - along with the existing option to reboot into Win 7. The Fedora Virtualization Guide documentation does not seem to cover this case where the O/S install exists before the VM is created.
Can this be done? Have you done it successfully? What are the details?
This is not as easy as you'd like it to be. KVM presents the guest OS with an entirely different chipset and IO devices from the physical system. It's effectively the same as yanking out your hard drive and installing it into an old pentium-pro class system and expecting Windows to "just work". Some have done it, with much registery hacking, but it's not easy and appears fragile.
In addition to this, Windows won't work on an unpartitioned disk. There's a very hacky way to do it:
https://rwmj.wordpress.com/2010/09/30/technique-for-synthesizing-a-partition...
So does this mean that the ntfs partition on the physical disk looks like a unpartitioned disk as presented by KVM to the guest OS? How would one hook up the Windows partition to the VM?
I thought that to be one of Window's strengths - to "just work" in many hardware environments. Can you point me to any information or discussion resources where I could find discussion and more details on how others have done this?
Windows Product Activation will decide that you're trying to run Windows on a different piece of hardware and will decide you're not in compliance. (This is quite likely to be true.) You'll at least need to reactivate Windows each time you switch from physical to virtual; and maybe purchase another license.
You might also need to change the Critical Device Database, HAL, and other things to get it to boot.
Rich.
Are you saying that this is what I should expect to encounter based on your experiences with running the physical install as a VM?
Is KVM technology evolution headed toward making the KVM represent the actual physical hardware (chipset, IO devices, etc.)?
Dave
On Mon, Sep 26, 2011 at 01:39:12PM -0400, David C. Mores wrote:
Richard W.M. Jones wrote:
In addition to this, Windows won't work on an unpartitioned disk. There's a very hacky way to do it:
https://rwmj.wordpress.com/2010/09/30/technique-for-synthesizing-a-partition...
So does this mean that the ntfs partition on the physical disk looks like a unpartitioned disk as presented by KVM to the guest OS? How would one hook up the Windows partition to the VM?
Yes; and using the hacky technique described above. This is really a shortcoming of Windows. Linux has no problem booting from a naked filesystem.
Are you saying that this is what I should expect to encounter based on your experiences with running the physical install as a VM?
Yes, my experiences doing P2V.
Is KVM technology evolution headed toward making the KVM represent the actual physical hardware (chipset, IO devices, etc.)?
No, in fact the other direction. Emulating real hardware is tedious, and more importantly emulated devices are much slower than paravirtualized devices.
Rich.
Richard W.M. Jones wrote:
On Mon, Sep 26, 2011 at 01:39:12PM -0400, David C. Mores wrote:
Richard W.M. Jones wrote:
In addition to this, Windows won't work on an unpartitioned disk. There's a very hacky way to do it:
https://rwmj.wordpress.com/2010/09/30/technique-for-synthesizing-a-partition...
So does this mean that the ntfs partition on the physical disk looks like a unpartitioned disk as presented by KVM to the guest OS? How would one hook up the Windows partition to the VM?
Yes; and using the hacky technique described above. This is really a shortcoming of Windows. Linux has no problem booting from a naked filesystem.
After I used the virt-manager GUI to create a VM, I find /var/lib/libvirt/images which I assume is where the vm image is installed, but now empty. So to connect this to the physical partition, would I put a link in here (e.g. ln -s /dev/sda1 /var/lib/libvirt/images/win7.img) or some such?
Also, it is not clear to me how the above partition table hack fits into this picture.
Sorry - this is just not intuitively obvious to me at this point.
Dave
My physical partition table:
[root@playboy ~]# parted GNU Parted 2.3 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: ATA ST3750528AS (scsi) Disk /dev/sda: 750GB Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags 1 1049kB 106MB 105MB primary ntfs boot 2 106MB 370GB 370GB primary ntfs 4 370GB 738GB 368GB extended 5 370GB 371GB 524MB logical ext4 6 371GB 738GB 367GB logical lvm 3 738GB 750GB 12.3GB primary ntfs
(parted) q
Are you saying that this is what I should expect to encounter based on your experiences with running the physical install as a VM?
Yes, my experiences doing P2V.
Is KVM technology evolution headed toward making the KVM represent the actual physical hardware (chipset, IO devices, etc.)?
No, in fact the other direction. Emulating real hardware is tedious, and more importantly emulated devices are much slower than paravirtualized devices.
Rich.