cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

VMs with invalid IDE configuration when using Solidfire as primary storage

Open DennisKonrad opened this issue 7 years ago • 23 comments

Description

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Domain XML with multiple disks attached using Solidfire primary storage

CLOUDSTACK VERSION

Master branch

OS / ENVIRONMENT

Solidfire primary storage

SUMMARY

Example: When we select "Windows Server 2016 (64-bit)" as OS Type for an W2K16 cd image the resulting VMs will not start with multiple disks attached. This is due to the usage of multiple IDE interfaces in the VM description XML.

It seems this is not just a problem with this OS Type but with the way the domain XMLs are generated when using solidfire storage.

This only happens when the disks are on Solidfire primary storage. We confirmed that using NFS primary storage this is not the case.

STEPS TO REPRODUCE

Try to use boot a VM with at least two disks on solidfire primary storage. Depending on the OS-Type that is selected for the image that was used to create the VM, the domain xml generated may be invalid.

In our case we tested this with a W2K16 vm which will not start when using OS Type "Windows Server 2016 (64-bit)". Libvirt does not boot the machine and raise the following error message:

org.libvirt.LibvirtException: unsupported configuration: Only a single IDE controller is supported for this machine type

Logs & Attachments

Here you can see two excerpts from the generated domain xmls. First the working one (NFS) and below that the one not working (Solidfire).

NFS Primary Storage
<disk type='file' device='disk'>
  <driver name='qemu' type='qcow2' cache='none'/>
  <source file='/mnt/e0e5ba2b-15bc-3fd8-a010-40a404c3cdfc/2f4ddade-b93e-47c5-b97f-b738f395d9e1'/>
  <backingStore/>
  <target dev='hda' bus='ide'/>
  <alias name='ide0-0-0'/>
  <address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
  <driver name='qemu' type='raw'/>
  <source file='/mnt/43c36bb7-1d8d-3405-b9b8-ddd402ef7913/215-34-015cecb6-7c65-3a37-80da-fde928458db4.iso'/>
  <backingStore/>
  <target dev='hdc' bus='ide'/>
  <readonly/>
  <alias name='ide0-1-0'/>
  <address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
  <driver name='qemu' type='qcow2' cache='none'/>
  <source file='/mnt/e0e5ba2b-15bc-3fd8-a010-40a404c3cdfc/49e52a7f-1bfb-4034-ad81-1efacb402b24'/>
  <backingStore/>
  <target dev='vdb' bus='virtio'/>
  <alias name='virtio-disk1'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='file' device='disk'>
  <driver name='qemu' type='qcow2' cache='none'/>
  <source file='/mnt/e0e5ba2b-15bc-3fd8-a010-40a404c3cdfc/3b1c3083-6775-4c21-889a-0f80af9b2fc0'/>
  <backingStore/>
  <target dev='vdc' bus='virtio'/>
  <serial>xxxxxxxxxxxxxxxx</serial>
  <alias name='virtio-disk2'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
Solidfire Primary Storage
<disk  device='disk' type='block'>
  <driver name='qemu' type='raw' cache='none' />
  <source dev='/dev/disk/by-path/ip-10.xx.xx.230:3260-iscsi-iqn.2010-01.com.solidfire:nhjj.root-323.127-lun-0'/>
  <target dev='hda' bus='ide'/>
</disk>
<disk  device='disk' type='block'>
  <driver name='qemu' type='raw' cache='none' />
  <source dev='/dev/disk/by-path/ip-10.xx.xx.230:3260-iscsi-iqn.2010-01.com.solidfire:nhjj.testplatte1-sf.128-lun-0'/>
  <target dev='hdb' bus='ide'/>
</disk>
<disk  device='disk' type='block'>
  <driver name='qemu' type='raw' cache='none' />
  <source dev='/dev/disk/by-path/ip-10.xx.xx.230:3260-iscsi-iqn.2010-01.com.solidfire:nhjj.testplatte2-sf.129-lun-0'/>
  <target dev='hde' bus='ide'/>
</disk>
<disk  device='cdrom' type='file'>
  <driver name='qemu' type='raw' />
  <source file='/mnt/c0aa527c-017e-3cca-b6b8-4b6055b0d03a/219-2-5d32553d-5dc1-3ad5-9275-1ff0ad5c7efc.iso'/>
  <target dev='hdc' bus='ide'/>
</disk>
Logfile excerpt
2018-12-07 15:04:07,604 DEBUG [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-4:null) (logid:faa09e72) starting i-61-323-VM: <domain type='kvm'>
<name>i-61-323-VM</name>
<uuid>33fc81ae-68a6-4723-9335-f9bf2c611b71</uuid>
<description>Windows Server 2016 (64-bit)</description>
<cpu mode='host-model'><model fallback='allow'></model><topology sockets='1' cores='4' threads='1' /></cpu><sysinfo type='smbios'>
<system>
<entry name='manufacturer'>Apache Software Foundation</entry>
<entry name='product'>CloudStack KVM Hypervisor</entry>
<entry name='uuid'>33fc81ae-68a6-4723-9335-f9bf2c611b71</entry>
</system>
</sysinfo>
<os>
<type  arch='x86_64' machine='pc'>hvm</type>
<boot dev='cdrom'/>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<on_reboot>restart</on_reboot>
<on_poweroff>destroy</on_poweroff>
<on_crash>destroy</on_crash>
<memory>16777216</memory>
<devices>
<memballoon model='none'/>
</devices>
<vcpu>4</vcpu>
<features>
<pae/>
<apic/>
<acpi/>
</features>
<cputune>
<shares>2664</shares>
</cputune>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup' >
</timer>
</clock>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<watchdog model='i6300esb' action='none'/>
<console type='pty'>
<target port='0'/>
</console>
<disk  device='disk' type='block'>
<driver name='qemu' type='raw' cache='none' />
<source dev='/dev/disk/by-path/ip-10.xx.xx.230:3260-iscsi-iqn.2010-01.com.solidfire:nhjj.root-323.127-lun-0'/>
<target dev='hda' bus='ide'/>
<serial>xxxxxxxxxxxxxxxxxxxx</serial></disk>
<disk  device='disk' type='block'>
<driver name='qemu' type='raw' cache='none' />
<source dev='/dev/disk/by-path/ip-10.xx.xx.230:3260-iscsi-iqn.2010-01.com.solidfire:nhjj.testplatte1-sf.128-lun-0'/>
<target dev='hdb' bus='ide'/>
<serial>xxxxxxxxxxxxxxxxxxxx</serial></disk>
<disk  device='disk' type='block'>
<driver name='qemu' type='raw' cache='none' />
<source dev='/dev/disk/by-path/ip-10.xx.xx.230:3260-iscsi-iqn.2010-01.com.solidfire:nhjj.testplatte2-sf.129-lun-0'/>
<target dev='hde' bus='ide'/>
<serial>xxxxxxxxxxxxxxxx</serial></disk>
<disk  device='cdrom' type='file'>
<driver name='qemu' type='raw' />
<source file='/mnt/c0aa527c-017e-3cca-b6b8-4b6055b0d03a/219-2-5d32553d-5dc1-3ad5-9275-1ff0ad5c7efc.iso'/>
<target dev='hdc' bus='ide'/>
</disk>
<serial type='pty'>
<target port='0'/>
</serial>
<graphics type='vnc' autoport='yes' listen='xxxxxxxxxxxx' passwd='xxxxxxxxxxxxxxxxxxxxx'/>
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/i-61-323-VM.org.qemu.guest_agent.0'/>
<address type='virtio-serial'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
<rng model='virtio'>
<rate period='1000' bytes='2048' />
<backend model='random'>/dev/random</backend></rng>
<input type='tablet' bus='usb'/>
<interface type='bridge'>
<source bridge='xxxxxxxx'/>
<mac address='xxxxxxxxxxxxxxx'/>
<model type='e1000'/>
<bandwidth>
<inbound average='25600' peak='25600'/>
<outbound average='25600' peak='25600'/>
</bandwidth>
<virtualport type='openvswitch'>
</virtualport>
<vlan trunk='no'>
<tag id='xxxx'/>
</vlan><link state='up'/>
</interface>
</devices>
</domain>

2018-12-07 15:04:07,609 WARN  [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-4:null) (logid:faa09e72) LibvirtException
org.libvirt.LibvirtException: unsupported configuration: Only a single IDE controller is supported for this machine type
        at org.libvirt.ErrorHandler.processError(Unknown Source)
        at org.libvirt.Connect.processError(Unknown Source)
        at org.libvirt.Connect.processError(Unknown Source)
        at org.libvirt.Connect.domainCreateXML(Unknown Source)
        at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:1413)
        at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:84)
        at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:46)
        at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
        at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1445)
        at com.cloud.agent.Agent.processRequest(Agent.java:644)
        at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1082)
        at com.cloud.utils.nio.Task.call(Task.java:83)
        at com.cloud.utils.nio.Task.call(Task.java:29)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2018-12-07 15:04:07,609 DEBUG [kvm.storage.KVMStoragePoolManager] (agentRequest-Handler-4:null) (logid:faa09e72) Disconnecting disk /iqn.2010-01.com.solidfire:nhjj.root-323.127/0

DennisKonrad avatar Dec 10 '18 08:12 DennisKonrad

Hey @mike-tutkowski , we found a bug with domain xml generation. Can you take a look?

DennisKonrad avatar Dec 10 '18 08:12 DennisKonrad

@DennisKonrad Do you see this if you use either Windows PV or Other PV Virtio-SCSI (64-bit) OS types?

kiwiflyer avatar Dec 10 '18 14:12 kiwiflyer

@kiwiflyer You are right, if we select "Other PV" it is working. But for the users there's no way to know this. Also it's working when using a NFS storage offering. So for them there's no way to find out why it's not working.

So we would like a working "OS Type" also for Solidfire ;)

DennisKonrad avatar Dec 10 '18 14:12 DennisKonrad

For the most part, the OS types are legacy in the KVM world. Very few of the actual named OS types are setup out of the box for paravirtualized drivers.

A couple of releases back, we started trying to move that driver control into the template registration: image

kiwiflyer avatar Dec 10 '18 16:12 kiwiflyer

Also in master (4.12), we've recently added support for Windows HyperV Enlightenment for KVM and that feature is enabled when you use Windows PV.

kiwiflyer avatar Dec 10 '18 16:12 kiwiflyer

What I dont understand is why its working with NFS but not with Solidfire...

DennisKonrad avatar Dec 10 '18 17:12 DennisKonrad

@kiwiflyer you are right if you use templates but if a user add an iso file so cant change the root controller. thats why my college wrote

"When we select "Windows Server 2016 (64-bit)" as OS Type for an W2K16 cd image the resulting VMs will not start with multiple disks attached. This is due to the usage of multiple IDE interfaces in the VM description XML."

thats no normal behaviour. normally we should get first an Ide controller and all other disks will be defined as virtio block device. yes we can choose a pv from dropdown but it can not fool over that when we choose a windows 2016 with more than one disk we get on "Netapp Solidfire" a problem and multiple IDE Controller. Thats not the default QEMU behaviour! Normally it should like NFS (IDE, VIRTIO, VIRTIO...)

Its a bug but it will only occur on solidfire.

We will address it to netapp.

image

svenvogel avatar Dec 10 '18 23:12 svenvogel

CloudOps should be looking into this soon. Technically, it's probably a problem in the iSCSI adapter plug-in of the KVM agent (so all storage systems that use that plug-in should suffer this issue). Thanks!

mike-tutkowski avatar Dec 11 '18 03:12 mike-tutkowski

@mike-tutkowski sounds good. Thx

svenvogel avatar Dec 11 '18 23:12 svenvogel

@kiwiflyer Another issue arose with this OS-Type implementation thing.

When using "Other PV" for Windows VMs the qemu driver's are not automatically made available to the VM and installing a W2K16 is not possible due to it not seeing it's disk.

How are you solving this?

DennisKonrad avatar Jan 15 '19 12:01 DennisKonrad

@DennisKonrad @svenvogel I might sound silly - beside this being a potential bug, why would you want to ever use "windows server 2016" as OS type, since only "Windows PV" is the one offering VirtIO hardware/drivers ? Both disk and NIC are extremely slow - a.k.a. almost unusable ?

Using any Windows Server XXX version as the OS Type- should NOT give any virtio drivers/hardware to VM - this is used for compatibility purposes, to be able to run UNMODIFIED Windows Server OS.

On the other hand - did you observe this on 4.11.2 version ?

I'm just testing as we speak (4.11.2) - and have successfully booted new VM from Centos5 template (which was marked as OS Type "Windows Server 2016 x64" - so binaries are not relevant here) - it started the VM just fine, as shown below - 2 disk with IDE, and another IDE cdrom

I'm about to test spinning same setup as yours from ISO (with only 1 additional IDE drive) - and will report here... (again in 4.11.2)

BTW, if you deploy a VM with single volume - and later attach (hotplug multiple volumes - do they get VirtIO type or not ?) - if so, this is a known bug actually -after stopping the VM and starting it again I assume they will all get back to IDE drives (I observed this on NFS/CEPH back in 4.8 release)

Please try using Windows PV - as this one is meant to be used to provide Virtio (SCSI and NIC) to OS.

Thx.

<domain type='kvm' id='4'>
  <name>i-2-9-VM</name>
  <uuid>888af124-031a-48f3-b8c6-e9df5ff295d7</uuid>
  <description>Windows Server 2016 (64-bit)</description>
  <memory unit='KiB'>33554432</memory>
  <currentMemory unit='KiB'>33554432</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <shares>8000</shares>
    <period>10000</period>
    <quota>5900</quota>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <sysinfo type='smbios'>
    <system>
      <entry name='manufacturer'>Apache Software Foundation</entry>
      <entry name='product'>CloudStack KVM Hypervisor</entry>
      <entry name='uuid'>888af124-031a-48f3-b8c6-e9df5ff295d7</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
    <topology sockets='1' cores='4' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/disk/by-path/ip-10.XX.YY.32:3260-iscsi-iqn.2010-01.com.solidfire:hdqi.root-9.8136-lun-0'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <serial>e951de35b9ab461f8b4c</serial>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/disk/by-path/ip-10.XX.YYY.32:3260-iscsi-iqn.2010-01.com.solidfire:hdqi.data-9.8137-lun-0'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <serial>ef89722f275240458db8</serial>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <backingStore/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

andrijapanicsb avatar Jan 16 '19 21:01 andrijapanicsb

My preference would be to get rid of the OS types that we have today. They just confuse people, because they're not really defined well at all. In the end, you just want the correct para-virtualized drivers to be supported by the VM.

kiwiflyer avatar Jan 16 '19 21:01 kiwiflyer

I support that @kiwiflyer ! - but both for disk controller and NIC model...(e1000,virtio,vmxnetXX,etc)

@svenvogel you are hitting the libvirt bug, I believe... please don't "mistakenly" expect that "Windows Server 2016 x64" should give you VirtIO drives at all

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

andrijapanicsb avatar Jan 16 '19 21:01 andrijapanicsb

btw, I did reproduce your issue, on 4.11.2, Ubuntu 14, Libvirt 1.3.1-1ubuntu10.24~cloud0

andrijapanicsb avatar Jan 16 '19 21:01 andrijapanicsb

@andrijapanic @kiwiflyer Hi there,

yes we are hitting this bug. these bug will only take in effect if you have an solidfire. we opened a bug report at cloudops @syed. i know we can use only VirtIO drives but bug is bug and should be resolved. we should not solve things with a workaround but fix them. let users device what they want to use. any users will use ide, virtio and other virtio, virtio... :)

svenvogel avatar Jan 19 '19 13:01 svenvogel

Technically, the SolidFire plug-in in isn’t where the issue resides: It’s probably in the iSCSI-adapter code in the KVM agent.


From: Sven Vogel [email protected] Sent: Saturday, January 19, 2019 6:29 AM To: apache/cloudstack Cc: Tutkowski, Mike; Mention Subject: Re: [apache/cloudstack] VMs with invalid IDE configuration when using Solidfire as primary storage (#3089)

NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@andrijapanichttps://github.com/andrijapanic @kiwiflyerhttps://github.com/kiwiflyer Hi there,

yes we are hitting this bug. these bug will only take in effect if you have an solidfire. we opened a bug report at cloudops @syedhttps://github.com/syed. i know we can use only VirtIO drives but bug is bug and should be resolved. we should not solve things with a workaround but fix them. let users device what they want to use. any users will use ide, virtio and other virtio, virtio... :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/apache/cloudstack/issues/3089#issuecomment-455780434, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC4SH1ZK2lZmLSEZYfi4D78iE7lEYrdNks5vEx2igaJpZM4ZK36R.

mike-tutkowski avatar Jan 19 '19 18:01 mike-tutkowski

@mike-tutkowski you mean "the cloudstack-agent" or what means "kvm agent"? the only storage i know with this usage is solidfire. there is no other iscsi what i see. :/ image image

svenvogel avatar Jan 19 '19 19:01 svenvogel

Yes, the KVM agent (cloudstack-agent). It supports managed, iSCSI-based plugins (like SolidFire’s) with the iSCSI adapter that runs inside the KVM agent.

In essence, there is a plug-in for iSCSI and managed storage that runs within the KVM agent. This is probably where the issue resides.


From: Sven Vogel [email protected] Sent: Saturday, January 19, 2019 12:01 PM To: apache/cloudstack Cc: Tutkowski, Mike; Mention Subject: Re: [apache/cloudstack] VMs with invalid IDE configuration when using Solidfire as primary storage (#3089)

NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@mike-tutkowskihttps://github.com/mike-tutkowski you mean "the cloudstack-agent" or what means "kvm agent"? the only storage i know with this usage is solidfire. there is no other iscsi what i see. :/ [image]https://user-images.githubusercontent.com/5433844/51431126-d76a9e80-1c24-11e9-8655-310f2ba53dbb.png [image]https://user-images.githubusercontent.com/5433844/51431130-ec473200-1c24-11e9-86b3-fc67487ce67a.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/apache/cloudstack/issues/3089#issuecomment-455806274, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC4SH00iV3ahx45RdRTmq6aY2HDDnu8Aks5vE2uMgaJpZM4ZK36R.

mike-tutkowski avatar Jan 20 '19 05:01 mike-tutkowski

I'm, again, of opinion that using any specific "Windows Server xxx" (meaning NOT "Windows PV") should give all drives as IDE (and network card as e1000) - for compatibly, but maybe I'm mistaken..

But explicitly choosing controller and NIC should be better (just like there is with VMware - you choose explicitly all controllers and NIC model or you can inherit from global settings).

andrijapanicsb avatar Jan 20 '19 11:01 andrijapanicsb

@andrijapanic that is no bug in redhat or qemu. so what i see it is default behaviour of the libvirt code. first of all one ide and the other one needs to be virtio. https://bugzilla.redhat.com/show_bug.cgi?id=1437253

svenvogel avatar Jan 20 '19 12:01 svenvogel