Windows 2012R2 on KVM

We are moving out! An updated post can be found here:

https://www.cloud-native-everything.com/install-windows-2012r2-in-kvm/

Not a fan. Some app requires windows though. I want to stay with KVM on Centos. Then @hballesteros and I figured (after some saint google search) to install windows loading the virtio drives from a cdrom iso over the setup process.
1. First of all you need to have the iso media (cdrom) and download it at your KVM (i.e. evaluation version at https://www.microsoft.com/en-US/evalcenter/evaluate-windows-server-2012-r2). Rename it to Rename it to ‘/var/lib/libvirt/images/win2012/win2012.iso’
2. Now download the iso image with the virtio drivers form https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.126-2/virtio-win.iso (stable version). Rename it to ‘/var/lib/libvirt/images/win2012/virtio-win.iso’
3. Create a disk:

qemu-img create -f raw /var/lib/libvirt/images/win2012/win2012.img 80GB

4. Create you domain using the following xml:


  win2012
  16777207
  8
  
    /machine
  
  
    hvm
    
    
  
  
    
    
    
      
      
      
    
  
  
    Broadwell
  
  
    
    
    
    
  
  destroy
  restart
  restart
  
    
    
  
  
    /usr/libexec/qemu-kvm
    
      
      
      
      
      <address />
    
    
      
      
      
      
      <address />
    
    
      
      
      
      
      
      <address />
    
    
      
      <address />
    
    
      
      
      <address />
    
    
      
      
      <address />
    
    
      
      
      <address />
    
    
      
    
    
      
      
      
        
      
      
      
      
      <address />
    
    
      
      
      
    
    
      
      
      
    
    
      
      <address />
    
    
      
    
    
      
    
    
      	
    
    <video>
      
      
      <address />
    </video>
    
      
      <address />
    
  
  
  
    +107:+107
    +107:+107
  

  1. Define and start your server via:
virsh define win2012.xml
virsh start win2012

6. Connect thru vnc and load the drivers for storage and network interface as the following
I got the following images from https://serverfault.com/questions/703675/install-windows-2012-r2-over-kvm-virtualizaton

When you are on this step:

Load disk drivers as follow from secondary cdrom:

See ya!

Categories: datacenter, DevOps

Tagged as: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: