Floppy not mounted in qmeu/kvm when trying to image from Windows 10 22H2 ISO.
- Dominant language
- Go
- Stars
- 15.8k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
#### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
#### Overview of the Issue
I'm attempting to build an image for use with openstack of Windows 10 Pro 22H2 using QEMU. What seems to be happening is that packer is creating a floppy disk image from my floppy_files list and mounting that in the VM instance via `-fda` ... but, when the installer starts, no floppy drive appears to the installer.
I just successfully built a Windows Server 2022 Std image using essentially the same builder config. Didn't have these floppy drive issues.
#### Reproduction Steps
Steps to reproduce this issue
### Packer version
v1.10.0
### Simplified Packer Template
Relevant builder config:
```
"builders": [
{
"type": "qemu",
"communicator": "winrm",
"winrm_port": "5985",
"skip_compaction": "false",
"output_directory": "VM/Win10-qemu",
"format": "qcow2",
"accelerator": "kvm",
"cpus": 2,
"memory": 4096,
"qemuargs":
[
[
"-cpu",
"Westmere"
]
],
"net_device": "virtio-net",
"disk_interface": "virtio-scsi",
"disk_cache": "unsafe",
"vm_name": "Win10PRO.qcow2",
"disk_size": "35840",
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/bootstrap-w10.ps1",
"./scripts/fixnetwork.ps1",
"./scripts/disable-screensaver.ps1",
"./scripts/disable-winrm.ps1",
"./scripts/enable-winrm.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1",
"./files/virtio-win/10/"
],
"headless": "true",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"boot_wait": "6m",
"winrm_password": "{{user `winrm_password`}}",
"winrm_timeout": "{{user `winrm_timeout`}}",
"winrm_username": "{{user `winrm_username`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"shutdown_timeout": "30m"
}
],
```
### Operating system and Environment details
Windows 10 Pro 22H2 Image
Building via QEMU from Ubuntu Jammy
### Log Fragments and crash.log files
Logs are all clean, no errors noted... here's the qemu execution:
`packer-plugin-qemu_v1.0.10_x5.0_linux_amd64 plugin: 2024/01/04 11:07:34 Executing /usr/bin/qemu-system-x86_64: []string{"-name", "Win10PRO.qcow2", "-machine", "type=pc,accel=kvm", "-vnc", "127.0.0.1:56", "-device", "virtio-scsi-pci,id=scsi0", "-device", "scsi-hd,bus=scsi0.0,drive=drive0", "-device", "virtio-net,netdev=user.0", "-netdev", "user,id=user.0,hostfwd=tcp::2365-:5985", "-cpu", "Westmere", "-smp", "2", "-fda", "/tmp/packer1319456718", "-boot", "once=d", "-m", "4096M", "-usbdevice", "tablet", "-drive", "if=none,file=VM/Win10-qemu/Win10PRO.qcow2,id=drive0,cache=unsafe,discard=ignore,format=qcow2", "-drive", "file=/home//git/packer-windows/iso/SW_DVD9_WIN_PRO_10_22H2.13_32BIT_ENGLISH_PRO_ENT_EDU_N_MLF_X23-64314.ISO,media=cdrom"}`
Contributor guide
Research direction
Start with the QEMU builder path that assembles the logged command, especially the `-fda` argument and floppy_files handling. Reproduce the Windows 10 Pro 22H2 configuration on Ubuntu Jammy and compare it with the working Windows Server 2022 setup; done means the installer detects the generated floppy without breaking existing QEMU builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100