Migratin XEN LVM VM to Proxmox KVM

virtio is the best or, even better, for ZFS ZVOLs you will want virtio-scsi (select 'scsi' as disk and in 'Options', 'Controller Type', 'VIRTIO-SCSI'). It has TRIM/UNMAP support, so your zvols will shrink when deleting files in the guest (if the guest supports TRIM that is).
 
Hi,

root@proxmox01:~# cat /etc/pve/nodes/proxmox02/qemu-server/100.conf
boot: cdn
bootdisk: ide0
cores: 2
ide0: default:100/vm-100-disk-2.qcow2,size=55G
ide2: none,media=cdrom
keyboard: de
memory: 2048
name: monitoring
net0: e1000=FA:70:D0:DB:7C:B6,bridge=vmbr0
numa: 0
ostype: l26
smbios1: uuid=59921f99-3d59-434b-9d06-634ad77160dc
sockets: 1
unused0: default:100/vm-100-disk-1.raw


the unused disk is because i moved from raw to qcow2 because of snapshot fuctnionality.

do i have to modify my fstab or grub menu.lst on my vm when using virtio?

i think virtio is the best for me because im using glusterfs and not ZFS.

regards,
 
you replace this:

Code:
bootdisk: virtio0
virtio0: default:100/vm100-disk-2.qcow2,size=55G

Basically you replace in the file "ide0" with "virtio0" and pray that you guest kernel is virtio aware (usually they are).

There is a single reason to use IDE: a guest OS that doesn't know anything else besides IDE.
 
Hi,

do i have to modify my fstab or grub menu.lst on my vm when using virtio?

because when i try to start now it tell me that /dev/sda1 is not available.

regards,
bill
 
sure, your device will be /dev/vda.

best thing is to use UUIDs for fstab
Code:
blkid | grep vda1
in /etc/fstab you will put UUID=<the UUID from above> instead of /dev/vda1
 
Hi Bill
Before editing this file, it would be good to check inside that the VM that you're using UUIDS for your root partition because switchting from IDE to Virtio will rename the disk block device from /dev/sd to /dev/vd

What is content of cat /proc/cmdline in your guest and /etc/fstab in your guest ?

If you don't have the /boot and / partition pointing to /dev/sd* then you can just edit the line starting with ide0 and replace that with virtio0.
 
Hi,

root@monitoring:~# cat /proc/cmdline
root=/dev/sda1 ro
root@monitoring:~# blkid | grep sda1
/dev/sda1: UUID="d93bf78b-1045-4d55-a2de-e853898a61d2" TYPE="xfs"

changed /etc/fstab to:
UUID="d93bf78b-1045-4d55-a2de-e853898a61d2" / xfs defaults 0 1

do i have to modify grub menu.lst too? If yes, to what?

regards,
 
I don't know for grub1, for grub2, grub by default should automatically create a correct entry with a root=UUID=parameter in the grub menu
make a backup of your grub config file, call update-grub (debian,ubuntu) or
grub2-mkconfig -o /boot/grub2/grub.cfg

(redhat based)

and check that the root parameter in /boot/grub/grub.cfg is properly set
 
Hi,

ok, all done. The last thing was to edit grub menu.lst from sda1 to vda1. now it is working with virtio.

Thx

regards,
 

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!