2014/02/26

scp protocol error: mtime.sec not present

After setting up a chroot sftp as described here https://wiki.archlinux.org/index.php/SFTP-chroot, I ran into a problem. Trying to scp fails with the following error:
protocol error: mtime.sec not present
There was no google result for this error, so I'm documenting it, maybe it will come handy for others. The best thing to do in this case is to run scp -v. That gave me a bit more information:
Sink: This service allows sftp connections only.
protocol error: mtime.sec not present
And really, silly me, trying scp where I should use sftp. And indeed, with sftp it works.

2014/02/15

"Boot failed: Could not read from CDROM (code 0003)" on ganeti

I couldn't find the right pages with a google search for the following error while booting a virtual machine on ganeti:
Boot failed: Could not read from CDROM (code 0003)
The virtual machine was started to boot from a cdrom like this:

gnt-instance start -H kvm:boot_order=cdrom -H cdrom_image_path=/boot/systemrescuecd-x86-4.0.0.iso $INSTANCE

The problem is that ganeti by default uses the same value for cdrom_disk_type than what's set for disk_type. This means if you set disk_type=paravirtual, then you'll get the following as a parameter to kvm:
-drive file=/boot/systemrescuecd-x86-4.0.0.iso,format=raw,media=cdrom,if=virtio
and this fails to boot because of the if=virtio part. It seems the kvm bios can't boot from virtio cdrom. The best way to fix this is to change cdrom_disk_type from default to scsi or ide:
gnt-cluster modify -H kvm:cdrom_disk_type=scsi