Convert a SCSI disk to VIRTIO on a Debian VM

apax

New Member
Apr 3, 2019
5
0
1
55
I have a VM with Debian installed to SCSI disk and I would convert it to VIRTIO. The VM is running inside a Proxmox VE 5.3-12 server.

I have detached the disk and re-added it on the VirtIo bus device. I have changed the boot order to bot from the VirtIo disk.

The /etc/fstab file is unchanged as the virtio disk has the same UUID:
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=82686cca-5f45-4544-bf04-e034174ea20f / ext4 errors=remount-ro 0 1
# swap
UUID=a6a8fc8c-2f69-4925-b904-1ad871fa657b none swap sw 0 0


When I start the server again, it does not boot. I see the following errors in the VM console:
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /run on /root/dev failed: No such file or directory
run-init: opening console: No such file or directory
Target filesystem doesn't have requested /sbin/init.
run-init: opening console: No such file or directory
run-init: opening console: No such file or directory
run-init: opening console: No such file or directory
run-init: opening console: No such file or directory
No Init found. Try passing init= bootarg.

BusyBox v1.22.1 (Debian 1:1.22.0-19+b3) built-in shell (ash)
(initramfs)


With blkid I can see that the disk is there as /dev/vda1:
(initramfs) blkid
/dev/vda1: UUID="82686cca-5f45-4544-bf04-e034174ea20f" TYPE="ext4" PARTUUID="d6022cd6-01"
/dev/vda5: UUID="a6a8fc8c-2f69-4925-b904-1ad871fa657b" TYPE="swap" PARTUUID="d6022cd6-05"


but cannot be mounted:
(initramfs) mkdir /tmp/aaa
(initramfs) mount /dev/vda1 /tmp/aaa
[ 378.110453] EXT4-fs (vda1): couldn't mount as ext3 due to feature incompatibilities
[ 378.110453] EXT4-fs (vda1): couldn't mount as ext2 due to feature incompatibilities
(initramfs) mount -t ext4 /dev/vda1 /tmp/aaa
mount: mounting /dev/vda1 on /tmp/foo failed: Device or resource busy


Can someone give me a hint on how to proceed to convert the SCSI virtual hard disk to Virtio ?
Any help would be sincerely appreciated...

Apax
 

LnxBil

Well-Known Member
Feb 21, 2015
3,940
366
83
Germany
Can someone give me a hint on how to proceed to convert the SCSI virtual hard disk to Virtio ?
Normally, it's just like you tried. I've done this over a hundred times (but from virtio to virtio SCSI) with only changes to /etc/fstab if there is not UUID boot, but devices names. Had to change vda to sda.

Why do you want to change from SCSI (hopefully virtio SCSI) to virtio? virtio SCSI has the advantage of beeing TRIM-able.
 

apax

New Member
Apr 3, 2019
5
0
1
55
LnxBil, thanks for your answer.

My motivation for this change comes from the understanding that I would have better performance using the virtio.driver.

Am I wrong ?
 

LnxBil

Well-Known Member
Feb 21, 2015
3,940
366
83
Germany
My motivation for this change comes from the understanding that I would have better performance using the virtio.driver.
The difference between SCSI virtio und plan virtio is minimal and if you need TRIM support inside of your VM, just stick with SCSI virtio.
What is your current SCSI driver? What is your backend storage type?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!