Convert a SCSI disk to VIRTIO on a Debian VM

Discussion in 'Proxmox VE: Installation and configuration' started by apax, Apr 20, 2019.

  1. apax

    apax New Member

    Joined:
    Apr 3, 2019
    Messages:
    5
    Likes Received:
    0
    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
     
  2. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,645
    Likes Received:
    326
    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.
     
  3. apax

    apax New Member

    Joined:
    Apr 3, 2019
    Messages:
    5
    Likes Received:
    0
    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 ?
     
  4. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,645
    Likes Received:
    326
    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?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice