-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modprobe errors in built image #26
Comments
There is insufficient information to diagnose. Which options did you specify for the create-disk-image-script? What this VM image creating using my script or your modified version of my script? |
It happens regardless of parameters, try with this example:
Then try running from qemu:
Both |
I pushed changes to my script recently. Can you please retest using the current version and let me know if this problem is resolved or persists? |
I did retest after changes, error messages persist. Actually it appears 4 times, I suspect this has to do with datasources, because I had tried using |
The only datasource that makes any use of modprobe is AltCloud (for the "floppy" module). It is not clear if the modprobe errors are happening during the initramfs' init runs or later in the boot sequence. I would recommend that you create the script using the "--debug" option as this will do a couple of things: (a) remove "quiet" from the cmdline and so the boot sequence will show more information, and (b) it will enable cloud-init debugging and so the contents of /var/log/cloud-init.log will contain a lot more information. Having said that I noticed a mistake in my script regarding VMware - I was not including the vmw_pvscsi, ata_piix, or mptspi/mptsas storage drivers in the initramfs which would then prevent the initramfs' init from mounting the root filesystem. The Alpine initramfs' init script does specifically run modprobe for ata_piix, mptspi, and vmw_pvscsi which would likely explain the modprobe errors you saw. However the change you made to cloud-init datasources would have no impact on that as cloud-init could not have been run if the rootfs was not mounted in the first place. I have fixed the above problem with VMware-related storage drivers and have pushed these fixed to Github. Can you indicate which storage and network devices you are using when you create the VM in VMware? Also can you clarify which VMware product you are using? ESXi? Vsphere? VMware Fusion? Unfortunately I don't have any VMware hypervisors here to test with. |
Earlier I was looking at the linux-lts, not the linux-virt, modules list - ata_piix and vmw_pvscsi are built into the linux-virt kernel, it is just the mpt* modules that are not but which the initramfs' init will modprobe for. |
I was trying to prepare an image to upload to Vsphere, but unfortunately until image is prepared I can only test using qemu. The script doesn't seem ready for vsphere just yet though, so I tried VMware to see if it worked. |
What I meant is that whenever you end up creating a VM in Vsphere/ESXI what options would you be selecting for the disk controller and network device? AFAIK ESXI supports at least those 3 different types of storage controller (pvscsi would be the "best"), and multiple network devices (vmxnet3 would be the best). BTW what exactly is the difference between "Vsphere" and "VMware"? I thought ESXI was the actual hypervisor and Vsphere bundled ESXI along with other management stuff (Vcentre?). |
I wish I could tell you exactly. I just know by my data center's web interface they use Vsphere. I have no access to the internals. |
I believe that ESXI is still the hypervisor used with Vsphere. The only difference in behaviour between running the VMs created by my script directly on ESXI and via Vsphere is likely to be that the cloud-init datasource used/presented may differ and therefore how it obtains network-config and/or user-data. |
I will try making an ESXI image and changing datasource to AltCloud to see how it behaves. |
There is currently no distinction in my script between different types of VMware software. Also currently a created VMware image will try AltCloud, OVF, and VMware datasources, depending on which of these it detects. I have updated the VMWare.md file to mention some |
My testing environment is a bit unusual because my datacenter provider does not officially support Alpine images and the vSphere interface they provide doesn't allow uploading images, either in vmdk or any other format for that matter. So I am actually testing by creating and uploading images as raw files to my Ubuntu instance, then mount them in a loop device with a little help from Sounds a little more complex than needed, but at least it works. And by the way, modprobe errors persist. Let me show VM hardware as detected by
|
By the way, I haven't found in the documentation how to use an option to provide custom user data to cloud-init, for example if one choses 'NoCloud' or 'None' datasource. |
I assumed anyone using this would have some familiarity with cloud-init in general. I did provide some info regarding NoCloud here: https://github.com/dermotbradley/create-alpine-disk-image/blob/main/Virtual/QEMU.md#cloud-init-user-data and some examples here: https://github.com/dermotbradley/create-alpine-disk-image/tree/main/Virtual/config-examples More detail on the cloud-init site: https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html There is no way to provide user-data for 'None' as it represents "there is no Datasource", https://cloudinit.readthedocs.io/en/latest/topics/datasources/fallback.html "It is the equivalent of a empty datasource in that it provides a empty string as userdata and a empty dictionary as metadata." |
From your lspci output the VM has the following devices of note: IDE controller: the driver for this (ata_piix) is built into the linux-virt kernel. Can you run Which controller is the disk attached to that you are using as the Alpine disk? IDE? SATA? SCSI?
I had missed putting the sr_mod (SCSI CDROM) module into the initramfs - the Alpine initramfs' init wants to load it on VMware machines for some reason. I will push a script change for this shortly. |
Forgive me, I had typed this in the wrong issue and realized just now. I actually recorded the screen while it was starting up and powering off, I tried sharing it but my network was terrible at the moment. I will test again once you push changes. Regarding cloud init I did see the examples, but couldn't find in the info how to declare them to the script, since it makes chroot and builds image right after, without any option to make a pause for customization. I admit I am not familiar with cloud-init yet. |
I think this command shows more info:
|
You didn't answer the following question I asked:
Also is there a particular reason why this Ubuntu VM was created to emulate a physical machine rather than to be a virtual machine? The VM is using the ata_piix (PATA), ahci (SATA), and mptspi (SCSI) for storage controllers which means that VMware is emulating these physical controllers, rather than using pvscsi (where VMware provides a virtual, rather than a "physical" controller for storage)? Is this because when you created the VM in VSphere you did not specify a PVSCSI controller? Or because your DC provider does not provide a mechanism to specify PVSCSI? In general PVSCSI will perform better on VMware than an emulated physical controller. If you wish to create an Alpine image suitable for running a "physical" machine on VMware then I would suggest you specify "-physical pc" rather than "-virtual vmware". My scripts' "-virtual" option is intended to create a disk image that uses virtio or (VMware, Virtualbox) hypervisor specific devices rather than emulating physical device and so, for example it does not include any firmware that some physical device drivers may require. |
The examples include a |
Unfortunately I have no control over the hardware configuration chosen by the Data Center provider. On top of that, only operating systems officially supported are Ubuntu 20.04 and CentOS 8. I made suggestion both for more operating systems and more efficient hardware configuration, but they were ignored. And I can't use another provider. So I must make tests either in qemu (without KVM, which they disabled) or in the VM configuration mentioned. |
Then I don't really see how you can use cloud-init - the AltCloud, OVF, VMware, and NoCloud datasources all expect configuration data (meta-data, network-config, user-data) to be passed to a VM via some mechanism such as via an ISO (aka CD device) or, in the case of the VMware DS via GuestInfo keys. Is the Ubuntu VM using cloud-init? If so then which datasource is it using and how did you set any user-data that was passed to it? |
The VM is using cloud-init with "DataSourceNone". I can't modify user-data passed to it, the only way to create a VM is though a web interface customized by the provider which just lets me select the OS, amount of CPU, RAM and storage. That's it. |
In other words cloud-init is basically doing nothing. There is no user-data passed to it. So I don't see the point of using cloud-init at all then. So really you want a OS image without cloud-init - which then would raise the question of how the OS image would be configured (what hostname, which user accounts and with what passwords, which SSH keys in those users' authorized_keys files, etc)... |
No, I am simply reporting what's available to me through the interface provided. But I would prefer preparing Alpine image with cloud-init and datastore |
Ok, but you have already indicated a lack of flexibility of your DC Provider and so how do you propose for VMWare to present a CD drive (i.e. /dev/sr0) to the VM for cloud-init to use if your VMWare service provider does not provide a mechanism to import an ISO image and present it as the CD drive? NoCloud can alternatively obtain user-data via a "seed" http/https url but that would require you to run a webserver somewhere accessible by the VM and that can not be used for obtaining network-config. |
I can provide a webserver but without basic networking already configured, how will the VM be able to find it? |
The network will be set up via DHCP. |
Not very useful with static IP assignments (my case). |
I managed to create an x86_64 image successfully, but when system is initializing I am getting a couple of errors:
How could I further diagnose what is failing?
The text was updated successfully, but these errors were encountered: