I am trying to get my drive to show up in QEMU guest virtual Linux machine.
desired behavior:
$ ls /dev/disk/by-id/
ata-CT1000MX500SSD4_XXXXXX
Current behavior returns nothing:
$ ls /dev/disk/by-id/
Here is how I created my disk image:
qemu-img create -f raw disk1.img 20G
and here is how I am launghing my VM to boot the archlive iso:
qemu-system-x86_64 \
-m 12G \
-boot d \
-enable-kvm \
-cpu host \
-smp 2 \
-net nic \
-net user,hostfwd=tcp::2222-:22 \
-vga virtio \
-drive format=raw,file=disk1.img,index=0,if=virtio \
-drive file=${HOME}/dl/iso/arch.iso,index=1,media=cdrom,readonly \
-drive if=pflash,format=raw,readonly,file=/usr/share/edk2-ovmf/x64/OVMF_CODE.fd \
-drive if=pflash,format=raw,file=uefi_vars.fd
I've tried modifiying the drive .img drive entry adding serial=001
like so:
-drive format=raw,file=disk1.img,index=0,serial=001,if=virtio \
but this returns the error:
qemu-system-x86_64: -drive format=raw,file=disk1.img,index=0,serial=001,if=virtio: Block format 'raw' does not support the option 'serial'
So is my problem that I am using raw format?
If so, what format would work?
Can you show me how to change my commands to allow for UUIDs in my Virtual Machine?
EDIT: I tried building the VM with .qcow2 and used format=qcow2
but get the same error message: format 'qcow2' does not support the option 'serial'