Creating a Windows VM

6 posts / 0 new
Last post
#1 Sat, 03/07/2015 - 01:38
Steffan
Steffan's picture

Creating a Windows VM

I tried following this link: http://www.virtualmin.com/documentation/cloudmin/windows without any real success. The VM seems to startup. When I use a VNC client on my laptop to connect, I get a solid black screen. I resize the window, I get all sorts of weird remnants but never the desktop.

My host is CentOS 6. plenty of RAM and HDD.

I changed the vnc=0 as it said but no matter what I did, VNC was always on for the other guests. I eventually shut them down just to be safe.

Following the rest of the guide, I merged their instructions with my existing files. This is what I came up with.

memory = 8192
maxmem = 8192
shadow_memory = 8
name = 'win-server-2008-dev-com'
address = '65.39.x.x'
netmask = '255.255.255.224'
kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
vif = [ 'type=ioemu,ip=65.39.x.x,mac=00:16:3e:01:80:33' ] 
cdrom = 'file:/images/en_windows_server_2012_r2_vl_x64_dvd_3319595.iso'
disk = ['phy:/dev/vg_hosting1/fms,hdc,w', 'file:/images/en_windows_server_2012_r2_vl_x64_dvd_3319595.iso,hdb:cdrom,r' ]
device_model = '/usr/lib/xen/bin/qemu-dm'
 
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
#### boot must be dc to install windows after that you change it to c or cd
boot = "dc"
#boot = "c"
 
#vfb = ['type=vnc,vncunused=1,vncpasswd=mypass,vnclisten=0.0.0.0']
vnc = 1
vnclisten = "0.0.0.0"
vncunused = 1
vncpasswd = "mypass"
 
#vncconsole = 0
#vncviewer = 1
vcpus = 2 # number of cpu's to assign
stdvga = 0
serial = 'pty'
usbdevice = 'tablet' # Required for USB mouse
on_reboot = 'restart'
on_crash = 'restart'

What's the best way to really understand what's going on?

Sat, 03/07/2015 - 18:27
Steffan
Steffan's picture

Still not there yet. Here is the new config

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'
 
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 4096
maxmem = 4096
 
# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
shadow_memory = 8
name = 'win-server-2008-hldns-com'
address = '65.39.69.240'
netmask = '255.255.255.224'
vif = [ 'type=ioemu,ip=65.39.69.240,mac=00:16:3e:01:80:33' ] 
 
acpi = 1
apic = 1
disk = [ 'phy:/dev/vg_hosting1/fms,hda,w', 'file:/images/en_windows_server_2012_r2_vl_x64_dvd_3319595.iso,hdc:cdrom,r' ]
 
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
 
#-----------------------------------------------------------------------------
# boot on floppy (a), hard disk (c) or CD-ROM (d) 
# default: hard disk, cd-rom, floppy
boot="dc"
sdl=0
vnc=1
vncconsole=1
vncpasswd=''
 
serial='pty'
usbdevice='tablet'

and here is the log. Not sure how to fix these errors.

domid: 9
Using file /dev/vg_hosting1/fms in read-write mode
Using file /images/en_windows_server_2012_r2_vl_x64_dvd_3319595.iso in read-only mode
Watching /local/domain/0/device-model/9/logdirty/cmd
Watching /local/domain/0/device-model/9/command
Watching /local/domain/9/cpu
char device redirected to /dev/pts/2
qemu_map_cache_init nr_buckets = 10000 size 4194304
shared page at pfn feffd
buffered io page at pfn feffb
Guest uuid = 28d9b696-570a-0f90-e5d1-9e3153604e3a
Time offset set 0
char device redirected to /dev/pts/3
xen be: console-0: xen be: console-0: initialise() failed
initialise() failed
populating video RAM at ff000000
mapping video RAM from ff000000
Register xen platform.
Done register platform.
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
xs_read(/local/domain/0/device-model/9/xen_extended_power_mgmt): read error
xs_read(): vncpasswd get error. /vm/28d9b696-570a-0f90-e5d1-9e3153604e3a/vncpasswd.
medium change watch on `hdc' (index: 1): /images/en_windows_server_2012_r2_vl_x64_dvd_3319595.iso
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
Log-dirty: no command yet.
xen be: console-0: xen be: console-0: initialise() failed
initialise() failed
vcpu-set: watch node error.
[xenstore_process_vcpu_set_event]: /local/domain/9/cpu has no CPU!
xen be: console-0: xen be: console-0: initialise() failed
initialise() failed
xs_read(/local/domain/9/log-throttling): read error
qemu: ignoring not-understood drive `/local/domain/9/log-throttling'
medium change watch on `/local/domain/9/log-throttling' - unknown device, ignored
xen be: console-0: xen be: console-0: initialise() failed
initialise() failed
cirrus vga map change while on lfb mode
mapping vram to f0000000 - f0400000
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro state.
ACPI:debug: write addr=0xb044, val=0x0.
ACPI:debug: write addr=0xb045, val=0x89.
 
A BOATLOAD of ACPI messages.
Tue, 03/10/2015 - 01:05
Steffan
Steffan's picture

Not getting anywhere. According to what I see online, I have HVM enabled for this to work.

[root@h2 ~]# xl dmesg | grep -i hvm (XEN) HVM: ASIDs disabled. (XEN) HVM: VMX enabled

Yet, this says nothing: [root@h2 ~]# grep vmx /proc/cpuinfo

How can that be?

I found a simple little pictorial to try rather than beating myself up over the perfect config: http://www.bulletvps.eu/client/knowledgebase/14/Creating-VM-from-CD-Wind...

I get the following error: Creating virtual system with Xen .. .. creation failed : The CPU or BIOS on host system hosting2.hldns.xen does not support Xen HVM

But how is that? HVM VMX is there.

Mon, 04/13/2015 - 09:12 (Reply to #3)
techsupportak

I've had a similar issue, turned out to be the xl toolstack

everything worked after switching to xm

Tue, 07/21/2015 - 01:27
Steffan
Steffan's picture

Here is what I settled on and works well.

memory = 12288
maxmem = 12288
name = 'win-2008-server'
vif = [ 'ip=x.x.x.x,mac=00:16:3e:C4:50:77' ]
address = 'x.x.x.x'
netmask = '255.255.255.224'
disk = ['phy:/dev/vg_hosting1/win-2008-server_img,hda,w','file:/images/win2008-v2/2008.R2.SP1.ESD.en-US.Mar2015.iso,hdc:cdrom,r']
boot = 'dc'
on_reboot = 'restart'
on_poweroff = 'restart'
kernel = "/usr/lib/xen/boot/hvmloader"
builder = "hvm"
device_model = "/usr/lib64/xen/bin/qemu-dm"
acpi = 1
pae = 1
vnc = 1
vnclisten = "0.0.0.0"
vncunused = 1
vncpasswd = "xxxxxxx"
#
apic = 1
sdl = 0
serial="pty"
vga="stdvga"
stdvga=1
videoram=16
viridian=1
localtime=1
keymap="pl"
usb=1
usbdevice="tablet"
shadow_memory=8
device_model_version = 'qemu-xen'

Once you have your VM up and running you will need to install some PVM drivers to ensure everything works smoothly.

http://wiki.univention.de/index.php?title=Installing-signed-GPLPV-drivers

I had another bookmark but the site seems unresponsive. I'll post back if I find it.

Tue, 11/20/2018 - 23:06
khushi

This is the hard to create VM in windows but now the user can easily create this from here https://rememberpasswordsinmicrosoftedge.net and solution is here.

Topic locked