Closed vikas027 closed 5 years ago
@carlpett any chance you can take a look at this?
(also, I notice that no one is in the CODEOWNERS file for the Proxmox builder; if you can't handle this can someone else at Proxmox take a look?)
Sure, I'll have a look! I didn't know CODEOWNERS was used, but I'm fine with being there if you want :)
It makes it easier for me to delegate, so I appreciate it :D . I'll add you today.
Hi @vikas027, I've tried a few variations, but haven't been able to reproduce I'm afraid. Just to verify, I understand correctly that you are seeing the problem during the kickstart installation, not in the finished template? Could you share your kickstart file?
Hey @carlpett ,
Thanks for looking at it. The problem is not due to the kickstart file as even when I try to manually install the OS (after packer creates the VM template), it could find the disk. See this pic https://user-images.githubusercontent.com/6998650/60716246-35d0d280-9f62-11e9-9e5c-21998f626f8a.png
It sounds like something is not right in the disk block or the way packer is provisioning disk. Can you pls share your packer template, I will compare it against mine.
"disks": [
{
"type": "scsi",
"disk_size": "20G",
"storage_pool": "local-lvm",
"storage_pool_type": "lvm"
}
],
I used this template (also included the kickstart file I used for testing, link to the ISO is here), which is very similar to yours, basically just using Fedora instead of Centos. I'm using the exact same version of Proxmox and Packer.
If you run the installer in cmdline
mode, you should be getting an indication on what prevents it from detecting the disk, and the ability to drop to the console. From there we should be able to see what is going wrong!
Thanks @carlpett , This sounds a bit weird. Let me try to use your exact packer template and the ISO and see how it goes. Thanks again for your quick response. Btw are you using OS X too?
Hey @carlpett ,
I have checked the Fedora ISO and template shared by you, it is indeed working fine.
But somehow CentOS ISO is not working and throwing the same error. CentOS just cannot find the hard disk in the VM template.
Now, I have changed my packer template and the kickstart the same as yours. The only differences are these. Can you please try with the CentOS ISO?
🍺 ~/test$ diff kickstart/ks_fedora.cfg kickstart/ks_centos.cfg
23,26c23,24
< -@hardware-support
< -@networkmanager-submodules
<
< qemu-guest-agent
---
> @Base
> @Core
🍺 ~/test$
🍺 ~/test$ diff fedora.json centos.json
30c30
< "iso_file": "local:iso/Fedora-Server-dvd-x86_64-29-1.2.iso",
---
> "iso_file": "local:iso/CentOS-7-x86_64-DVD-1810.iso",
34c34
< "<up><tab> ip=dhcp inst.cmdline inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks_fedora.cfg<enter>"
---
> "<up><tab> ip=dhcp inst.cmdline inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks_centos.cfg<enter>"
40,41c40,41
< "template_name": "fedora-29",
< "template_description": "Fedora 29-1.2, generated on {{ isotime \"2006-01-02T15:04:05Z\" }}"
---
> "template_name": "centos-64",
> "template_description": "CentOS 7.6, generated on {{ isotime \"2006-01-02T15:04:05Z\" }}"
🍺 ~/test$
Hm, that is indeed strange... Are you able to drop into console mode during the installation so you can check dmesg
or ls /dev/
? Would be really interesting to see something more detailed about what is not working.
I'll try to give it a try on my setup tonight.
@vikas027 The of that ISO with your changes to the packer and kickstart files worked for me, and cloning the template also works. What is the exact error you are seeing? If you get the screenshot you posted in the initial post, that would indicate that the VM couldn't reach the kickstart file - we're telling the installer to work in non-interactive text mode, so you shouldn't be seeing an UI at all.
@carlpett Ah, that is super weird. Maybe I am jinxed :(
This error is indeed after reading my kickstart file as it has the Timezone and language I have selected. Are you using Mac OS X too? That could be the only difference between our environments.
Huh, not enough space on disk? Very strange. That seems like it should really be identical since we use the same template... I'm on Linux, so it is a difference I guess, but seems like a very strange thing to affect this.
Are you low on disk space on the Proxmox setup? I would expect it to fail immediately in that case though, rather than giving an error on partitioning.
Nope, nothing to do with disk space. It is a brand new Proxmox setup :)
Let me try to run packer from a Linux machine and see if that makes a difference.
I have tried on a Linux machine as well, still the same issue. Here are my files. Again, if I manually edit the VM, remove the disk created by packer VM template and add again, everything works.
I know what I am talking may not make much sense, but I am completely clueless why this is happening only at my end.
Ok, running with your files as-is (or, almost, some minor network changes needed), I get the same error as you.
And switching scsi
to virtio
disk model makes it work. I suspect there may be a driver issue/missing driver for the virtual scsi hardware in the CentOS image? I can reproduce this without packer too - if I create the VM manually in the proxmox UI and select SCSI disks, then the CentOS installer UI also cannot find the disk.
Ah, finally :)
I will try it with virtio
tomorrow. However, I could not reproduce the issue without packer.
Hello @carlpett ,
Switching to virtio
from scsi
worked like a charm. Indeed it looks like something to do with the CentOS ISO. Anyways, I am glad that I am able to get things working now.
Thanks again for your help and patience.
Cheers, Vikas
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Environment
OS: Mac OS X 10.14.5 (18F132) Packer: v1.4.1 Proxmox VE: v5.4.3 Guest OS: CentOS Linux 7 1810 x86_64
Problem
Hard disk created by packer is not detected by the CentOS operating system. I have even tried to boot the same OS manually, even then CentOS could not detect the disk.
Error from Kickstart File
Error when I rebooted the same VM
Packer File and Log
Debug Log
Packer Template
Proxmox VE Screenshots
If I create a VM manually on the Proxmox VE and create a disk, it works fine. Looks like the disk created by packer is missing something.