"Could not find working O_DIRECT alignment. Try cache.direct=off"

ranjithks

New Member
Joined
Sep 3, 2021
Messages
8
Reaction score
0
Credits
65
When try to start my VM i am getting this below error.

qemu-kvm: -drive file=/dev/vg000/vm11,format=raw,if=none,id=drive-virtio-disk0,cache=none,aio=native: could not open disk image /dev/vg000/vm11: Could not find working O_DIRECT alignment. Try cache.direct=off.
2021-10-06 04:45:40.236+0000: shutting down, reason=failed
 


Are you trying to do a direct hardware passthrough, yes?

Anyway, I'm not very familiar with block device passthrough, so until someone more knowledgeable comes along, I'll throw out what a vaguely recall:

- Did you check your LVM partitions are valid (not messed up from resizing, etc.)?
Did it get mapped correctly in device mapper?
- Is any mounted (AFAIK, the whole device must be free -- I could be wrong).
- Are you booting from another device? That would simplify things if you were.

Food for thought:
I don't remember since the last time I did this was years ago, but IIRC if the drive with the partition is USB then it's much easier to use USB passthrough (I had a USB external).

Sorry I can't give you more suggestions
 
Are you trying to do a direct hardware passthrough, yes?

Anyway, I'm not very familiar with block device passthrough, so until someone more knowledgeable comes along, I'll throw out what a vaguely recall:

- Did you check your LVM partitions are valid (not messed up from resizing, etc.)?
Did it get mapped correctly in device mapper?
- Is any mounted (AFAIK, the whole device must be free -- I could be wrong).
- Are you booting from another device? That would simplify things if you were.

Food for thought:
I don't remember since the last time I did this was years ago, but IIRC if the drive with the partition is USB then it's much easier to use USB passthrough (I had a USB external).

Sorry I can't give you more suggestions

I am trying to boot up the device from virt manager. at that time only getting this error.
 
Did you specify -device?
-device virtio-scsi-pci,id=<id>
You must specify this before -drive.

Also, the 0_DIRECT error is probably graphics related. Let's fix things one at a time. Change your graphics to -vga=virtio for now. We can look at this later. Let's try to get that partition working first.
 

Members online


Top