Change Virtio block bus/device for a existing VM disk to SCSI bus/device...

Dubard

Active Member
Oct 5, 2016
61
2
28
48
Switzerland
Hi everybody !

I've VM's with virtio block bus/device and i noticed that I had better performances with a scsi bus/device.

How 'i can move that for an existing VM disk ?
Can someone give me a procedure to follow ?


Thanks !
 
Depending on the operating system running on your VM, you should just stop the VM, Remove the disk (hardware pane) and then Add the disk (shown as unused) using the desired controller type.
It's usually fine with linux based OS but may be problematic with Windows because of the driver used to access the disk ...
 
  • Like
Reactions: Dubard
Yes in Windows you need to add an extradisk, install drivers from virtio-iso, shutdown the machine, delete the extradisk, and change the bus from your productive disks. Done so often this way.
 
  • Like
Reactions: Dubard
Thanks @fireon and @Belokan for your reply !
So I found this link that helped me. Here's what I did:
  1. I create new disk with "scsi" bus/device and the same size to current disk (who use virtio bus/device)
  2. I shutdown the VM and use "dd" command to copy current virtual disk data to new virtual disk:
    1. Code:
      dd if=/dev/myzfsstorage/VM/vm-100-disk-2 of=/dev/myzfsstorage/VM/vm-100-disk-1
  3. I change VM boot disk options to replace old bus/device to the new (scsi bus/device)
  4. I delete old VM disk with virtio bus/device
  5. ...and restarted VM that worked normally.
Thanks again !
 
You don't need to do this with DD. Only add an scsi-disk to your running windows. Install drivers from ISO. Shutdown the machine, delete this one new scsidisk. After that detach all your virtiodisks, then attach it again with scsibus. Start VM, ready.
 
  • Like
Reactions: Dubard
Hi @fireon !
Thanks for your reply.

My VM is a Debian VM and not Windows ;)
Do you know how i can detach the main disk from Proxmox GUI to change the bus/device ?

Thanks
 
1.- Stop the VM
2.- In the GUI, select the VM -> Hardware -> Hard Disk -> Remove -> Yes
3.- Double click on the Unused Disk # (# should be 0), select the BUS type you want -> Add
4.- In Options, change the boot order to reflect the new BUS
5.- Start the VM
 
  • Like
Reactions: Dubard

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!