Installing Windows XP

493 views
Skip to first unread message

Ricardo Espinoza

unread,
Jun 8, 2011, 5:39:29 AM6/8/11
to gan...@googlegroups.com
Hello

I am trying to install WIndows XP using KVM as a hypervisor.

My cluster already uses KVM for Linux and works fine with debootstrap instances.
This runs in Debian Squeeze.

Now, I can boot from the Windows XP CD, install as usual but when I try to boot, it says

----------------------------------
Booting from Hard Disk

A disk read error ocurred
Press Ctrl+Alt+Del to restart

----------------------------------


I can boot again from the CD, check the files inside in the recovery console from the Windows XP image and everything is there.
I have no idea what I am doing wrong, here is my info

Instance name: test-win.test.local
UUID: 8e9e9ed6-429c-4294-8a32-a54e88582832
Serial number: 39
Creation time: 2011-06-08 17:20:57
Modification time: 2011-06-08 18:32:11
State: configured to be up, actual state is up
  Nodes:
    - primary: cluster1-node4.test.local
    - secondaries: 
  Operating system: windowsxp+default
  Allocated network port: 11064
  Hypervisor: kvm
    - console connection: vnc to 127.0.0.1:11064 (node cluster1-node4.test.local) (display 5164)
    - acpi: default (True)
    - boot_order: disk
    - cdrom2_image_path: default ()
    - cdrom_disk_type: ide
    - cdrom_image_path: /srv/ganeti/iso/winxp32en.iso
    - disk_cache: default (default)
    - disk_type: ide
    - floppy_image_path: default ()
    - initrd_path: 
    - kernel_args: 
    - kernel_path: 
    - kvm_flag: default (enabled)
    - mem_path: default ()
    - migration_downtime: default (30)
    - nic_type: e1000
    - root_path: 
    - security_domain: default ()
    - security_model: default (none)
    - serial_console: default (True)
    - usb_mouse: default ()
    - use_chroot: default (False)
    - use_localtime: default (False)
    - vhost_net: default (False)
    - vnc_bind_address: default (127.0.0.1)
    - vnc_password_file: default ()
    - vnc_tls: default (False)
    - vnc_x509_path: default ()
    - vnc_x509_verify: default (False)
  Hardware:
    - VCPUs: 1
    - memory: 256MiB
    - NICs:
      - nic/0: MAC: 00:16:3e:8b:7e:c8, IP: 10.1.5.61, mode: routed, link: 
  Disk template: plain
  Disks:
    - disk/0: lvm, size 2.0G
      access mode: rw
      logical_id:  kvmvg/80fd2d70-ce66-4e0a-9882-23504aaecc13.disk0
      on primary:  /dev/kvmvg/80fd2d70-ce66-4e0a-9882-23504aaecc13.disk0 (254:10)



I already was reading about it and some people said it is a geometry problem and you have to edit the boot loader manually which I already did but didn't work.
I also tried activating the disks and formating by myself but it didn't work either.

Anyone have tips on how to fix this?
Or maybe is there a way to do this in a different way with ganeti?

Also I don't have scripts to create the Windows XP instances, so pretty much all scripts for the API (create, rename, import, export) are just a shell script with exit 0.
I don't think they are needed as I am installing from the CD.


If you need more information, please let me know.



Cheers,
Roberto

marcolinuz

unread,
Jun 8, 2011, 6:46:51 AM6/8/11
to gan...@googlegroups.com
Hi, 
I currently have a couple of Windows 2008 R2 servers that runs flawlessy in my ganeti + kvm cluster.
I did some custom OS scripts that works good for windows but requires the last release of ganeti ti work properly.

I will publish them as soon as I will be sure that they are stable.
Anyway, to make a windows guest, try to create the instance using an empty "create script" and "ide" as disk_type (if you don't have the virtio drivers floppy).

regards.

--
By MCM.

Ricardo Espinoza

unread,
Jun 8, 2011, 6:50:30 AM6/8/11
to gan...@googlegroups.com
Hello

Actually my create script is empty, well just exit 0 as a shell script.
The disk is "ide" but still can't boot after installation.

I have the latest version of ganeti, any tips or a place where I can read a bit more for this?

Thanks

Liberie Cunha-Neto

unread,
Jun 8, 2011, 7:00:53 AM6/8/11
to gan...@googlegroups.com
gnt-instance modify --hvm-boot-order cdrom test-win.test.local

On Wed, Jun 8, 2011 at 12:50 PM, Ricardo Espinoza

marcolinuz

unread,
Jun 8, 2011, 7:02:37 AM6/8/11
to gan...@googlegroups.com
On Wed, Jun 8, 2011 at 12:50 PM, Ricardo Espinoza <ricardo....@gmail.com> wrote:
Hello

Actually my create script is empty, well just exit 0 as a shell script.
The disk is "ide" but still can't boot after installation.

I have the latest version of ganeti, any tips or a place where I can read a bit more for this?

Thanks

Hi, 
I currently have a couple of Windows 2008 R2 servers that runs flawlessy in my ganeti + kvm cluster.
I did some custom OS scripts that works good for windows but requires the last release of ganeti ti work properly.

I will publish them as soon as I will be sure that they are stable.
Anyway, to make a windows guest, try to create the instance using an empty "create script" and "ide" as disk_type (if you don't have the virtio drivers floppy).

regards.

--
By MCM.



I don't know.. have you tried a different installation CD or a different OS like seven?

--
By MCM.

«Un computer è come il dio del vecchio testamento: ha un casino di regole e nessuna pietà.»

Ricardo Espinoza

unread,
Jun 8, 2011, 7:03:57 AM6/8/11
to gan...@googlegroups.com
It works to boot from the cdrom and install, but when the installation is finished and I have to boot from the hard disk, I get the error.

It must be something with the boot loader or KVM not finding the right boot partition.
The data is there is I activate the disks, so I know Windows XP can see the disk (ide).

I also checked if the partition was set as "boot" and it actually is.

I must be missing something else.

Ricardo Espinoza

unread,
Jun 8, 2011, 7:05:30 AM6/8/11
to gan...@googlegroups.com
I will try 7 just to see if it is an XP problem, but sadly I really need XP.

I am installing the SP3 iso, maybe I should try SP2 too.

Jorge Manuel B. S. Vicetto

unread,
Jun 8, 2011, 11:05:24 AM6/8/11
to gan...@googlegroups.com
Hi.

On Wed, Jun 8, 2011 at 11:03 AM, Ricardo Espinoza
<ricardo....@gmail.com> wrote:
> It works to boot from the cdrom and install, but when the installation is
> finished and I have to boot from the hard disk, I get the error.
> It must be something with the boot loader or KVM not finding the right boot
> partition.
> The data is there is I activate the disks, so I know Windows XP can see the
> disk (ide).
> I also checked if the partition was set as "boot" and it actually is.
> I must be missing something else.

I had the same issue when installing Windows hosts under ganeti.
Unfortunately this seems to be
https://bugs.launchpad.net/qemu/+bug/586175 which was supposed to be
fixed, but in my experience, isn't. My workaround, was to install
Windows using kvm directly on a file with -hda and then to use dd to
move it to an lvm partition under a ganeti guest.
I did the following for a windows 2003 host, but I've also moved a
windows xp host from a kvm install to ganeti and got it working.


create 2 disks, one to be used to load the virtio drivers into windows

qemu-img create -f raw /home/kvm/server.img 45G
qemu-img create -f raw /home/kvm/server-d.img 2G

boot to install using the 2nd disk as a virtio disk

/usr/bin/qemu-system-x86_64 -hda /home/kvm/server.img -m 2048M -smp 4
-vnc :5101 -k pt -cdrom /home/kvm/images/win2003-r2.iso -boot c -fda
/home/kvm/images/virtio-win-1.1.16.vfd -drive
file=/home/kvm/server-d.img,if=virtio

boot after install using the 1st disk as a virtio disk and changing
the network card to virtio. I got the details from gnt-instance for
the host. This can be done after moving to ganeti.

/usr/bin/qemu-system-x86_64 -drive file=/home/kvm/server.img,if=virtio
-m 2048M -smp 4 -vnc :5101 -k pt -cdrom
/home/kvm/images/virtio-win-1.1.16.iso -boot c -fda
/home/kvm/images/virtio-win-1.1.16.vfd -drive
file=/home/kvm/server-d.img,if=virtio -netdev
type=tap,id=netdev0,fd=11 -device
virtio-net-pci,mac=aa:00:00:91:de:39,netdev=netdev0

create ganeti instance

/usr/sbin/gnt-instance add -n <ganeti-server> -o image+default -t
plain -s 100G -B vcpus=4 -B memory=4096M -H
kvm:boot_order=cdrom,cdrom_image_path=/home/kvm/images/win2003.iso,nic_type=e1000,kernel_path=""
--net=0:bridge=br1 <server-fqdn>

use dd to copy the installation from the file to the lvm

dd if=/home/kvm/server.img of=/dev/<dm device>

you can find the dm-device by looking at gnt-instance info server.
Check the lvm device under Disks and see where the /dev/ganeti/*
device points to.

I hope the above helps with the install. Feel free to poke me about this.


Regards,

Jorge Manuel B. S. Vicetto
Net / Sys admin - HSEAH
Gentoo developer

Ricardo Espinoza

unread,
Jun 8, 2011, 10:32:57 PM6/8/11
to gan...@googlegroups.com
Hello Jorge,

Thank you very much, this worked fine.

I didn't go with the virtio installation as I right now it is for testing purposes, but know I could boot to continue the installation already as a ganeti instance.

I will try later with virtio but pretty much it will work.


Thanks again!
Message has been deleted

Jake Anderson

unread,
Feb 28, 2012, 8:07:23 AM2/28/12
to gan...@googlegroups.com
Two thaughts
I use the instance image profile for all my stuff then install from iso's. The other thing i have done is boot a livecd and dd via netcat an image into the vm. Its probably not the most efficent but it worked for sticking a win2k install into it.

I suggest as a worst case install xp in a regular (command line?) kvm instance then move that into ganeti.

Sent from my HTC



From: Eros Simoni <eros....@gmail.com>
Sent: Tuesday, 28 February 2012 10:47 PM
To: gan...@googlegroups.com
Subject: Re: Installing Windows XP
I have similar problem with window 2003 server over kvm installation.

I trying to follow your procedure but i cannot find virtio floppy driver, but only iso, image
 

Eros Simoni

unread,
Feb 29, 2012, 11:28:10 AM2/29/12
to ganeti
I've create a new vm with qemu-kvm in another server.

Now I've .img file and try to import in ganeti follow this step

1. I've create disk image:
gnt-instance add -t drbd -n nodo1.ganeti.test:nodo2.ganeti.test -o
image+default \
--no-install --no-start --disk 0:size=30G --net 0:ip=192.168.21.222
\
vm2.ganeti.test

2. Get disk id
gnt-instance info vm2.ganeti.test

Instance name: vm2.ganeti.test
UUID: ce8cd51f-e97d-48a7-aabf-481c76d5d19f
Serial number: 1
Creation time: 2012-02-29 16:00:21
Modification time: 2012-02-29 16:00:21
State: configured to be down, actual state is down
Nodes:
- primary: nodo2.ganeti.test
- secondaries: nodo1.ganeti.test
Operating system: image+default
Allocated network port: 11005
Hypervisor: kvm
- console connection: vnc to nodo2.ganeti.test:11005 (display
5105)
- acpi: default (True)
- boot_order: default (disk)
- cdrom2_image_path: default ()
- cdrom_disk_type: default ()
- cdrom_image_path: default ()
- disk_cache: default (default)
- disk_type: default (paravirtual)
- floppy_image_path: default ()
- initrd_path: default ()
- kernel_args: default (ro)
- kernel_path: default ()
- kvm_flag: default ()
- mem_path: default ()
- migration_downtime: default (30)
- nic_type: default (paravirtual)
- root_path: default (/dev/vda1)
- security_domain: default ()
- security_model: default (none)
- serial_console: default (True)
- usb_mouse: default ()
- use_chroot: default (False)
- use_localtime: default (False)
- vhost_net: default (False)
- vnc_bind_address: default (0.0.0.0)
- vnc_password_file: default ()
- vnc_tls: default (False)
- vnc_x509_path: default ()
- vnc_x509_verify: default (False)
Hardware:
- VCPUs: 2
- memory: 512MiB
- NICs:
- nic/0: MAC: aa:00:00:17:2f:ae, IP: 192.168.21.222, mode:
bridged, link: vbr0
Disk template: drbd
Disks:
- disk/0: drbd8, size 16.0G
access mode: rw
nodeA: nodo2.ganeti.test, minor=0
nodeB: nodo1.ganeti.test, minor=0
port: 11006
auth key: 4f68fdd399b3ac9e534b97495cfe4e35fd41b39a
on primary: /dev/drbd0 (147:0) in sync, status ok
on secondary: /dev/drbd0 (147:0) in sync, status ok
child devices:
- child 0: lvm, size 16.0G
logical_id: ganeti/bffdde88-8379-4ea0-bccc-
b2d46f6471fb.disk0_data
on primary: /dev/ganeti/bffdde88-8379-4ea0-bccc-
b2d46f6471fb.disk0_data (254:0)
on secondary: /dev/ganeti/bffdde88-8379-4ea0-bccc-
b2d46f6471fb.disk0_data (254:1)
- child 1: lvm, size 128M
logical_id: ganeti/bffdde88-8379-4ea0-bccc-
b2d46f6471fb.disk0_meta
on primary: /dev/ganeti/bffdde88-8379-4ea0-bccc-
b2d46f6471fb.disk0_meta (254:1)
on secondary: /dev/ganeti/bffdde88-8379-4ea0-bccc-
b2d46f6471fb.disk0_meta (254:2)


- Copy img to ganeti disk
kvm-img convert -f qcow2 /isos/Supervisore01.img /dev/ganeti/ee78cd31-
ef97-4ed9-be3a-41a804ba5889.disk0

- But I'get this error:
qemu-img: Could not open '/isos/Supervisore01.img'




Iustin Pop

unread,
Feb 29, 2012, 11:30:13 AM2/29/12
to gan...@googlegroups.com
On Wed, Feb 29, 2012 at 08:28:10AM -0800, Eros Simoni wrote:
> I've create a new vm with qemu-kvm in another server.
>
> Now I've .img file and try to import in ganeti follow this step
>
> 1. I've create disk image:
> gnt-instance add -t drbd -n nodo1.ganeti.test:nodo2.ganeti.test -o
> image+default \
> --no-install --no-start --disk 0:size=30G --net 0:ip=192.168.21.222
> \
> vm2.ganeti.test
[…]

> - Copy img to ganeti disk
> kvm-img convert -f qcow2 /isos/Supervisore01.img /dev/ganeti/ee78cd31-
> ef97-4ed9-be3a-41a804ba5889.disk0
>
> - But I'get this error:
> qemu-img: Could not open '/isos/Supervisore01.img'


Did you actually put the image created with qemu-kvm under /isos ?

iustin

Simon Deziel

unread,
Feb 29, 2012, 11:36:53 AM2/29/12
to gan...@googlegroups.com

Alto not related to your error about the source file failing to open,
I would use this extra step before writing to the DRBD device :

gnt-instance activate-disks vm2.ganeti.test

Eros Simoni

unread,
Mar 1, 2012, 9:52:27 AM3/1/12
to ganeti
Hi,

I try whit gnt-instance activate-disks vm2.ganeti.test, but I've same
problem.

I try export to .ova format xen running virtual machines,

and following this procedure --> http://edoceo.com/notabene/ova-to-vmdk-to-qcow2

try to covert in qcow2 format, but I get this error:

# qemu-img convert -O qcow2 /isos/supervisore01.vmdk /isos/
supervisore01.qcow2

qemu-img: error while reading

thanks for help
Reply all
Reply to author
Forward
0 new messages