gnt-instance add not setting bootflag with KVM

427 views
Skip to first unread message

Bill Broadley

unread,
Feb 28, 2012, 3:18:15 AM2/28/12
to gan...@googlegroups.com

I ran:

# gnt-instance add -t drbd -s 10g -B memory=3750 -H kvm:boot_order=cdrom,cdrom_image_path=/root/win2008r264bit.iso,cdrom2_image_path=/root/virtio-win-1.1.16.iso -n node2:node3 -o debootstrap+default gnttest.foo.com

Bill Broadley

unread,
Feb 28, 2012, 3:30:08 AM2/28/12
to gan...@googlegroups.com
Ugh, sorry, an overzealous mail client sent that.  This is with ubuntu-11.10 with ganeti-2.4.5 installed from source with ./configure --with-disk-separator=_

To continue, that worked reasonable.  The instance fails with:
Could not start instance: Hypervisor error: Failed to start instance gnttest.foo.com: exited with exit code 1 (Two devices with same boot index 0)

I fixed that with:
# gnt-instance modify -H initrd_path="" gnttest
# gnt-instance modify -H kernel_path="" gnttest

I think the virtio driver is default for the cdrom2_path, so it's invisible to windows.  So I added:
gnt-instance modify -H cdrom_disk_type=ide gnttest

At that point I can enter the windows installer runs, I can load the virtio drivers, and it sees the storage. I can partition and format, but not install.  It claims the device/partitions are not bootable and to tweak my BIOS. 

If I look in proc, and cat the cmdline for the related kvm process I see:
# cat /proc/7892/cmdline | xargs -0 cat
/usr/bin/kvm -name gnttest -m 3752 -smp 1 -pidfile /usr/local/var/run/ganeti/kvm-hypervisor/pid/gnttest.foo.com -daemonize -drive file=/usr/local/var/run/ganeti/instance-disks/gnttest.foo.com_0,format=raw,if=virtio -boot d -drive file=/root/win2008r264bit.iso,format=raw,media=cdrom,boot=on -drive file=/root/virtio-win-1.1.16.iso,format=raw,media=cdrom,if=ide -usbdevice tablet -vnc 127.0.0.1:5104 -monitor unix:/usr/local/var/run/ganeti/kvm-hypervisor/ctrl/gnttest.foo.com.monitor,server,nowait -serial unix:/usr/local/var/run/ganeti/kvm-hypervisor/ctrl/gnttest.cse.ucdavis.edu.serial,server,nowait -netdev type=tap,id=netdev0,fd=8 -device virtio-net-pci,mac=aa:00:00:ed:06:8e,netdev=netdev0

Note the ISO has a boot=on (and is bootable).  But it looks like -drive file=/usr/local/var/run/ganeti/instance-disks/gnttest.foo.com_0,format=raw,if=virtio fails to set it.

The man page for KVM says:
           boot=boot
               boot is "on" or "off" and allows for booting from non-
               traditional interfaces, such as virtio.

I'm not sure how to modify it since it's now a normal hypervisor tweak since it's to a single disk not for the entire instance.  

Any ideas on how to fix with at creation time or afterwards?

Iustin Pop

unread,
Feb 28, 2012, 5:11:59 AM2/28/12
to gan...@googlegroups.com

I'm not sure I understand the problem. Do you mean that boon=on should
be set on _all_ devices, not just the ones you want to boot from?

I wonder if in the meantime changing from if=virtio to an emulated one
wouldn't solve the issue.

iustin

Bill Broadley

unread,
Feb 28, 2012, 5:59:39 AM2/28/12
to gan...@googlegroups.com
From what I can tell win2008 will not install onto a device without the boot=on flag set.

I tried virtio and ide drivers and neither worked.

When I use ganeti the KVM parameter for the disk was:
-drive file=/usr/local/var/run/ganeti/instance-disks/gnttest.foo.com_0,format=raw,if=virtio 

So I can't install.

If I use virt-install and look at the command line for KVM it's:
-drive file=/dev/ganeti1/opptest,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0

With virt-install I can't see the installation disk, until I load the Redhat virtio drivers from the driver disk, then I can see the disk.  Once I see it the disk I can install.

I did notice that apparently cdroms are always bootable, with virt-install:
-drive file=/root/win2008r264bit.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0

So it seems like ganeti sets the bootflag when it's not needed (on cdrom) and doesn't when it is needed (on the target for the installation).



Joe Esposito

unread,
Apr 3, 2012, 1:54:58 PM4/3/12
to gan...@googlegroups.com, bi...@broadley.org
Bill,

Did you ever find a solution to this?  I'm fighting the same battle with getting a Windows 7 instance running on my cluster.

Thanks
Joe Esposito

Matthew Thode

unread,
Apr 3, 2012, 5:31:11 PM4/3/12
to gan...@googlegroups.com

boot=on is being deprecated, so that may be a source for trouble. I
think the only way of doing it may be to not use the boot flag and to
set the index to the hdd first (unless you want to boot to cdrom).

--
Matthew Thode

signature.asc

Joe Esposito

unread,
Apr 3, 2012, 6:43:01 PM4/3/12
to gan...@googlegroups.com, gan...@googlegroups.com
I have no problems changing the boot order after installation but need to boot off of the cd to install windows.

Matthew Thode

unread,
Apr 3, 2012, 7:35:43 PM4/3/12
to gan...@googlegroups.com

In kvm you define boot like this, dunno how you'd do it in ganeti.
(still plan on implementing ganeti and ganeti-webmgr sometime...)

-boot menu=on,order=d

--
Matthew Thode

signature.asc

Jake Anderson

unread,
Apr 3, 2012, 7:37:27 PM4/3/12
to gan...@googlegroups.com, Joe Esposito
On 04/04/2012 08:43 AM, Joe Esposito wrote:
> I have no problems changing the boot order after installation but need to boot off of the cd to install windows.
I do this
create the instance (image) with no cd rom and also give it a no-start
no-install

gnt-instance add -n whcsydgan2:whcsydgan1 --disk-template drbd
--disk=0:vg=ganvga,size=5G --no-start --no-install
--net=0:mac=generate,ip=10.20.0.15,mode=bridged,link=br-data --os-type
image+default -B memory=512,vcpus=3 --hypervisor-parameters
kvm:acpi=true --no-ip-check whcsydfreenas1

then to install i do this
gnt-instance start -H
boot_order=cdrom,cdrom_image_path=/root/FreeNAS-8.0.4-RELEASE-x64.iso
whcsydfreenas1

Reply all
Reply to author
Forward
0 new messages