Hello Justin,<br><br>1. managing images using cobbler<br>I have not tried to do this. I import the NFS share in ovirt hardware pool. Then, the images are imported as libvirt storage volumes and they are available when I create a VM.<br>
Cobbler version has been upgraded between fedora 11 and fedora 13. You are probably the first one trying this under f13.<br>Is there a particular reason why you are using cobbler for this purpose ?<br><br>2. booting from cdrom<br>
I assume adding the cdrom iso in ovirt would also fix that issue. Besides you will just encounter it once, for installation. Afterwards, you will always boot from HD.<br><br>3. too old qemu-kvm<br>You have several choices here :<br>
a. download a more recent RPM and install it in the nodes manually each time you start them<br>b. enable the fedora virtualization preview repository in your build environment and build a newer ovirt-node-image.iso<br>c. try to build ovirt under fedora 14<br>
<br><br><div class="gmail_quote">On Fri, Sep 10, 2010 at 7:55 AM, Justin Clacherty <span dir="ltr"><<a href="mailto:justin@redfish.com.au">justin@redfish.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">> How do I go about provisioning a windows VM? I've added the iso to<br>
> cobbler using the following command.<br>
><br>
> cobbler image add --name=W2k8Prov --<br>
> file=nfs://<a href="http://192.168.50.190/ovirt/w2k8.iso" target="_blank">192.168.50.190/ovirt/w2k8.iso</a><br>
><br>
> The image then appears in the list of Operating Systems to choose when<br>
> creating a VM. I select the image when I create the VM but then when I go<br>
> to save I get the error:<br>
><br>
> undefined method `keys' for "~":String<br>
><br>
> How are people provisioning Windows VMs?<br>
><br>
<br>
</div>My guess is that people don't. I've spent a bit of time on this today and<br>
have managed to get a VM booting using an installation ISO. It seems<br>
there's some problems with cobbler (or how it's used). I'm still having<br>
problems though so bear with me.<br>
<br>
The problem with installing off ISOs are two-fold.<br>
<br>
1) Provisioning the VM fails because Cobbler::System.find_one() does not<br>
behave as expected.<br>
2) The xml sent to libvirtd on the node is incorrect.<br>
<br>
Provisioning Windows Server 2008 R2 is still a problem once this is<br>
resolved. This is seemingly because the version of KVM on the node doesn't<br>
work with W2k8R2.<br>
<br>
Here's the first two problems which I've managed to work around. I hope<br>
this a) helps out anyone else trying to install off an ISO, and b) helps the<br>
developers fix the issue which as far as I can tell from the mailing list<br>
has been around for a while.<br>
<br>
This is the error I was seeing in rails.log<br>
<br>
Processing VmController#update (for 192.168.42.111 at 2010-09-10 01:57:16)<br>
[POST]<br>
Parameters: {"vm"=>{"nics"=>"#<Nic:0x7f9df2ec3e60>",<br>
"provisioning_and_boot_settings"=>"image@cobbler:W2k8Prov",<br>
"storage_volume_ids"=>["16"], "vm_resource_pool_id"=>"5",<br>
"uuid"=>"59048cfa-d91d-bb65-27b2-edfc5e863d79",<br>
"description"=>"Exchange2010", "memory_allocated_in_mb"=>"4096",<br>
"num_vcpus_allocated"=>"4"}, "id"=>"8", "macs"=>["00:16:3e:76:7b:36", ""],<br>
"networks"=>["1", ""]}<br>
<br>
NoMethodError (undefined method `keys' for "~":String):<br>
(eval):9:in `find_one'<br>
app/services/vm_service.rb:297:in `vm_provision'<br>
app/services/vm_service.rb:169:in `svc_update'<br>
app/services/vm_service.rb:160:in `svc_update'<br>
app/controllers/vm_controller.rb:81:in `update'<br>
<br>
The line in vm_provision is<br>
<br>
System = Cobbler::System.find_one(name)<br>
<br>
Looking at the code around it I'm guessing that the author assumed that<br>
Cobbler::System.find_one() would return null (or is it nil in ruby?) if the<br>
system wasn't found in cobbler. It seems that what actually happens is that<br>
some exception is thrown (or whatever the ruby equivalent to an exception<br>
is) instead so everything failed. Not knowing ruby at all and knowing that<br>
the system wasn't there I just commented out the check and let it simply add<br>
the system. That allowed the VM settings to be saved and the VM was created<br>
in the user interface. I then put the code that I commented out back in to<br>
see if find_one would still be a problem. Wasn't a problem anymore, could<br>
edit the VM and everything which is why I'm assuming that the assumptions<br>
about what find_one does when the system isn't in cobbler are incorrect.<br>
<br>
Now when you boot the VM it tries to boot of the cdrom as you'd expect only<br>
it can't actually find the cdrom. I logged on to the node and did a dump of<br>
the xml for the vm. The OS was set to boot off cdrom as expected, however,<br>
there's no cdrom entry in there at all. The ISO is described as a "disk".<br>
<br>
To get around this I:<br>
- started the VM<br>
- logged in to the node running the VM<br>
- dumped the xml for the VM to a file<br>
- in the disk entry for the ISO I changed <disk type='block' device='disk'><br>
to <disk type='block' device='cdrom'><br>
- destroyed the running VM<br>
- created the VM from the edited xml file<br>
<br>
The VM boots, finds the cdrom and does its thing.<br>
<br>
Sorry if that's all a bit long winded but I hope it helps.<br>
<br>
Now as far as installing W2k8R2 goes, has anyone managed that? It starts to<br>
boot and then just stops, the VM gets destroyed so I'm assuming it crashes.<br>
The same problem occurs with Win7 and SBS2008R2 at about the same point. I<br>
have installed SBS2008R2 under kvm on a RHEL5.5 box without issue. I've<br>
seen mention of a bug where W2k8R2 has a BSOD under KVM. This has<br>
apparently been fixed but perhaps it hasn't made it to the version of<br>
qemu-kvm in ovirt.<br>
<br>
Any help would be appreciated.<br>
<div><div></div><div class="h5"><br>
Cheers,<br>
Justin.<br>
<br>
<br>
_______________________________________________<br>
Ovirt-devel mailing list<br>
<a href="mailto:Ovirt-devel@redhat.com">Ovirt-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/ovirt-devel" target="_blank">https://www.redhat.com/mailman/listinfo/ovirt-devel</a><br>
</div></div></blockquote></div><br>