Bug 1670057 - Installing Windows VM from URL fails on No Bootable Device
Summary: Installing Windows VM from URL fails on No Bootable Device
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 1.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Adam Litke
QA Contact: shiyang.wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-28 14:03 UTC by Radim Hrazdil
Modified: 2019-02-13 10:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 15:04:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
VM manifest and importer log (1.00 KB, application/zip)
2019-01-28 14:03 UTC, Radim Hrazdil
no flags Details
logs and pod describe virt launcher (3.52 KB, application/zip)
2019-01-28 15:29 UTC, Israel Pinto
no flags Details
vm-yaml-cirros-with-glusterfs (973 bytes, text/plain)
2019-01-28 15:31 UTC, Israel Pinto
no flags Details
VM with data volume with hdd (997 bytes, text/plain)
2019-01-28 15:44 UTC, Israel Pinto
no flags Details
qcow2 windows image (32.32 KB, image/png)
2019-01-29 23:31 UTC, Juan Manuel Parrilla Madrid
no flags Details

Description Radim Hrazdil 2019-01-28 14:03:00 UTC
Created attachment 1524238 [details]
VM manifest and importer log

Description of problem:
When trying to install Windows VM from ISO provided by URL provision method, after cdi importer finishes, the VM fails to boot due to No bootable device error.

No other errors/exceptions were observed.

In the attachments are provided logs of cdi importer and yaml manifest used to create the Windows box.


Version-Release number of selected component (if applicable):
cdi 1.4.0

How reproducible:
100

Steps to Reproduce:
1. Have a windows iso served (tried with Windows Server 2012 and Windows 10)
2. oc create the VM

Actual results:
When Import completes, VM cannot boot due to No bootable device

Expected results:
VM should be able to boot up windows installation

Additional info:

Comment 1 Israel Pinto 2019-01-28 15:27:20 UTC
Reproduce with cirros image. 


Steps:
1. Create VM with data volume template with glusterfs.
(see attached yaml)
2. Connected via console

Results:
VM did not boot from hard disk.

See status:
#oc get pvc,pv,vm,vmi                                                                                                                                                 
NAME                                STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
persistentvolumeclaim/cirros-dv11   Bound     pvc-165eec25-230c-11e9-9817-fa163efe57b6   2Gi        RWO            glusterfs-storage   25m

NAME                                                        CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                 STORAGECLASS        REASON    AGE
persistentvolume/pvc-165eec25-230c-11e9-9817-fa163efe57b6   2Gi        RWO            Delete           Bound       default/cirros-dv11   glusterfs-storage             24m

NAME                                               AGE       RUNNING   VOLUME
virtualmachine.kubevirt.io/vm-cirros-datavolume1   25m       true      

NAME                                                       AGE       PHASE     IP            NODENAME
virtualmachineinstance.kubevirt.io/vm-cirros-datavolume1   22m       Running   10.130.0.22   cnv-executor-ipinto-node1.example.com


Attaching logs and vm yaml
Note: Looks like it not relate to windows VM.

Comment 2 Israel Pinto 2019-01-28 15:29:07 UTC
Created attachment 1524265 [details]
logs and pod describe virt launcher

Comment 3 Israel Pinto 2019-01-28 15:30:28 UTC
form the dumpxml the boot should be form the hd:
 <os>
    <type arch='x86_64' machine='pc-q35-rhel7.6.0'>hvm</type>
    <boot dev='hd'/>
  </os>

Comment 4 Israel Pinto 2019-01-28 15:31:08 UTC
Created attachment 1524266 [details]
vm-yaml-cirros-with-glusterfs

Comment 5 Israel Pinto 2019-01-28 15:43:25 UTC
And if we use local storage (hdd) it works. Attaching VM yaml.

Comment 6 Israel Pinto 2019-01-28 15:44:07 UTC
Created attachment 1524272 [details]
VM with data volume with hdd

Comment 7 Fabian Deutsch 2019-01-28 20:25:38 UTC
According to th eml discussion there is a good chance that the idsk image is getting corrupted by CDI due to some resizing.

Comment 8 Alexander Wels 2019-01-28 21:33:19 UTC
Can you point me to the location of that iso, so I can try it here locally? I just tried a live-cd iso and it booted fine (of course no disk to install to, but it did boot)

Comment 12 Juan Manuel Parrilla Madrid 2019-01-29 23:31:45 UTC
Created attachment 1524806 [details]
qcow2 windows image

Comment 13 Juan Manuel Parrilla Madrid 2019-01-29 23:33:09 UTC
I've tried with the windows qcow2 from https://cloudbase.it/windows-cloud-images/#download and when the VM boots gives me an error about not bootable device. (Attached screenshot)

This is the manifest to create the VM:

```
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
  creationTimestamp: null
  name: cnv-vm-wind-pvc04
spec:
 running: true
 template:
   spec:
     domain:
       devices:
         disks:
         - disk:
             bus: virtio
           name: containervolume
         interfaces:
         - bridge: {}
           name: default
         - bridge: {}
           name: ovs-net
       machine:
         type: q35
       resources:
         requests:
           memory: 1024M
     networks:
     - name: default
       pod:  {}
     - multus:
         networkName: ovs-net-1
       name: ovs-net
     terminationGracePeriodSeconds: 0
     volumes:
     - name: containervolume
       persistentVolumeClaim:
         claimName: windows-pvc-manual
```

Comment 14 Alexander Wels 2019-01-30 21:13:31 UTC
Radim and I sat down and I walked him through the steps on how to make this work. I will leave this open until he can try with his windows image. Hopefully he will close once he can verify it works.

Comment 15 Karim Boumedhel 2019-01-31 11:19:22 UTC
@juan make sure to use a correct yaml for windows definition. 
You can find a sample one at https://raw.githubusercontent.com/kubevirt/kubevirt/master/cluster/examples/vmi-windows.yaml

Comment 16 Radim Hrazdil 2019-02-07 15:04:22 UTC
I'm closing this bug as instead of installing VM from installation ISO medium using URL we should use cloud disk image (for example qcow2 or raw). 
With Alexander's guidance, I was able to import a windows qcow2 image, however, there still seems to be issue with corruption due to resizing: BZ1670993 . The VM fails with error saying the imported disk image is not readable. 

@Israel Shouldn't we consider to document that installing VM from installation ISO is not supporter or desired way of installing a VM? From this bug at leas, it seems apparent that people tend to expect it to work.

Comment 18 Vatsal Parekh 2019-02-08 12:46:36 UTC
Alex, it happened to me without using DV also, was using virtctl image-upload
what should I debug? should I re-open this BZ?

Comment 19 Alexander Wels 2019-02-08 14:51:52 UTC
This bug pertains to import, not upload. If you have a similar issue but with upload please open a new bug about that with the pertinent details.

Comment 20 Vatsal Parekh 2019-02-13 10:23:01 UTC
(In reply to Alexander Wels from comment #19)
> This bug pertains to import, not upload. If you have a similar issue but
> with upload please open a new bug about that with the pertinent details.

https://bugzilla.redhat.com/show_bug.cgi?id=1670057


Note You need to log in before you can comment on or make changes to this bug.