Default we can create a Linux Virtual Machine on Xen server in CentOS, Windows HVM (Hardware Virtual Machine) also support on it.
If you have already installed Xen server with LVM can create and run Windows virtual machine.
Need to install necessary packages on server, previous Xen Project-modified version of QEMU we should have installed and not be needed in recent releases. Copy the Windows ISO file copy to specific directory.
For example I have created under /root/iso/. Hypervisor to start the domain in Hardware virtual Machine mode and boot from the DVD to install Windows.
Create Logical Volume (LVM) :
Set size to 50 GB. We have already created volume group name "vgroup0". Logical volume name "linuxfaq"
Logical volume "linuxfaq" created
--- Logical volume ---
LV Path /dev/vgroup0/linuxfaq
LV Name linuxfaq
VG Name vgroup0
LV UUID CcSp3R-5k5f-DDrS-X32S-GrFv-avB5-xC9oa7
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2015-01-20 20:56:22 +0530
LV Status available
open 0
LV Size 50.00 GiB
Current LE 20480
Segments 1
Allocation inherit
Read ahead sectors auto - currently set to 256
Block device 253:64
Create a Configure file:
Now, create a configure (cfg) file, and add below lines with the name of windows.cfg under /xen directory,
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 4000
name = 'linuxfaq'
vif = [ 'ip=192.168.1.200,mac=00:11:32:13:42:5A,bridge=xenbr0' ]
address = '192.168.1.1'
netmask = '255.255.255.0'
disk = ['phy:/dev/vgroup0/linuxfaq,hda,w','file:/root/iso/Windows_Server_2012_R2_64Bit_2.ISO,hdc:cdrom,r' ]
devide_model="/usr/lib64/xen/bin/qemu-dm"
vnc = 1
vcpus = 4
vnclisten = "0.0.0.0"
vncunused = 1
vncconsole=1
vncpasswd = "thelinufaq"
boot="dc"
acpi=1
apic=1
pae=1
sdl=0
stdvga=0
serial='pty'
usbdevice='tablet'
Start Windows VM :
Using config file "/xen/windows.cfg".
Started domain windows(id=40)
Find VNC Port number :
Find the virtual machine running port number for view remote system by VNC
root 20552 37.1 0.0 256356 4048 ? SLl 20:24 0:23 /usr/lib/xen/bin/qemu-dm -d 40 -domain-name windows-videoram 4 -vnc 0.0.0.0:0,password -vncunused -vcpus 8 -vcpu_avail 0xff -boot dc -serial pty -acpi -usbdevice tablet -net nic,vlan=1,macaddr=00:16:3E:1E:47:5E,model=rtl8139 -net tap,vlan=1,ifname=vif40.0-emu,bridge=xenbr0,script=no,downscript=no -M xenfv
tcp 0 0 0.0.0.0:5116 0.0.0.0:* LISTEN 20552/qemu-dm
unix 3 [ ] STREAM CONNECTED 582054 20552/qemu-dm
unix 3 [ ] STREAM CONNECTED 536241 20552/qemu-dm
Now, the windows VM running port number is 5116. Then, Install windows server on remote system same as booting from DVD.
Comments (0)