KCM guest SLES 11 SP2 only working with ide? no virtio possible?

tafkaz

Renowned Member
Dec 1, 2010
147
7
83
Geilenkirchen Germany
Hi,
i was wondering, if by any chance it was possible to change the harddisk bus from ide to virtio in a SLES 11 KVM guest.
It just doesn't seem t o boot properly with virtio, as assumingly ther's no virtio support in the kernel of SLES.
Anyone been through this before, and able to help me?

thank you very much
Sascha
 
Hi,
i was wondering, if by any chance it was possible to change the harddisk bus from ide to virtio in a SLES 11 KVM guest.
It just doesn't seem t o boot properly with virtio, as assumingly ther's no virtio support in the kernel of SLES.
Anyone been through this before, and able to help me?

thank you very much
Sascha
Hi Sascha,
work for me without problems (one SLES 11 and one SLES 12).
Code:
cat /etc/pve/qemu-server/110.conf 
bootdisk: virtio0
cores: 4
cpu: kvm64
ide2: none,media=cdrom
memory: 32768
name: sles-srv
net0: virtio=26:E3:35:AA:93:07,bridge=vmbr1,tag=20
numa: 1
ostype: l26
sockets: 2
virtio0: ceph_file:vm-110-disk-1,cache=writethrough,size=32G
virtio1: ceph_file:vm-110-disk-2,cache=writethrough,backup=no,size=100G
Udo
 
Hi Sascha,
work for me without problems (one SLES 11 and one SLES 12).
Udo

Hi Udo,

thanks for helping.
Maybe the problem is a bit different here.
The machine was initially converted from a vmware image, thus SLES allready had all the /dev/sda entries for grub and fstab.
So when i wanted to switch from ide to virtio, the machine will not properly boot anymore...
I guess there will be something i need to do, to make the switch work with SLES.

just changing sda to vda in /etc/fstab and /boot/grub/menu.1st doesn't seem to do the trick.

Thanks again for your assistance
Sascha
 
Hi Udo,

thanks for helping.
Maybe the problem is a bit different here.
The machine was initially converted from a vmware image, thus SLES allready had all the /dev/sda entries for grub and fstab.
So when i wanted to switch from ide to virtio, the machine will not properly boot anymore...
I guess there will be something i need to do, to make the switch work with SLES.

just changing sda to vda in /etc/fstab and /boot/grub/menu.1st doesn't seem to do the trick.

Thanks again for your assistance
Sascha

Hi Sascha,
I assume the initrd don't have virtio_blk installed.

Look at /etc/sysconfig/kernel
Code:
/etc/sysconfig/kernel:INITRD_MODULES="virtio_blk ata_piix ata_generic virtio_pci"
On my system this virtio-modules are loaded
Code:
lsmod | grep virtio
virtio_net             23032  0 
virtio_balloon         13267  0 
virtio_pci             17783  0 
virtio_blk             17392  11 
virtio                 14222  4 virtio_net,virtio_balloon,virtio_pci,virtio_blk
virtio_ring            16374  4 virtio_net,virtio_balloon,virtio_pci,virtio_blk
Udo
 
no...not yet...hm...


this is what i did so far:

1.) changed the /dev/sd entires to UUID entries in fstab

Code:
# former /dev/sda1
UUID=fc8599e5-8ba9-4878-85f7-8304b8bd5aeb           swap                 swap       defaults              0 0

# former /dev/sda2
UUID=2344e881-2ad8-47ef-8d9f-713fbafcf64b             /                    ext3       acl,user_xattr        1 1

# former /dev/sdb1
UUID=3b349bac-dbd1-42a9-8d2c-410fa2767855           /fecher              ext3       acl,user_xattr        1 1

proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

2.) changed all /dev/sd eintries to /dev/vd entries in /boot/grub/menu.lst

Code:
# Modified by YaST2. Last modification on Tue Oct 16 09:34:02 CEST 2012
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux Enterprise Server 11 SP2 - 3.0.42-0.7
    root (hd0,1)
    kernel /boot/vmlinuz-3.0.42-0.7-default root=/dev/vda2 resume=/dev/vda1 splash=silent crashkernel=128M-:64M showopts vga=0x317
    initrd /boot/initrd-3.0.42-0.7-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux Enterprise Server 11 SP2 - 3.0.42-0.7
    root (hd0,1)
    kernel /boot/vmlinuz-3.0.42-0.7-default root=/dev/vda2 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
    initrd /boot/initrd-3.0.42-0.7-default

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
    rootnoverify (fd0)
    chainloader +1

3.) changed /boot/grub/device.map accordingly

Code:
(fd0)   /dev/fd0
(hd0)   /dev/vda

4.) Changed /etc/sysconfig/kernel like you said

Code:
#INITRD_MODULES="mptspi ata_piix ata_generic"
INITRD_MODULES="virtio_blk ata_piix ata_generic virtio_pci"




As long as i leave the sda to ide in pve, everythings fine...even the second harddisk will get recognized and is fully working as virtio then.
but as soon as i switch the first HD to virtio, things go berserk...
I guess i am just not very familiar with SLES and its use of grub.

thanks
Sascha
 
no...not yet...hm...


...
4.) Changed /etc/sysconfig/kernel like you said

Code:
#INITRD_MODULES="mptspi ata_piix ata_generic"
INITRD_MODULES="virtio_blk ata_piix ata_generic virtio_pci"




As long as i leave the sda to ide in pve, everythings fine...even the second harddisk will get recognized and is fully working as virtio then.
but as soon as i switch the first HD to virtio, things go berserk...
I guess i am just not very familiar with SLES and its use of grub.

thanks
Sascha
Hi Sascha,
do you create an new initrd so that the booting kernel has the virtio-driver?? Sound for me, that you forget this step?

Udo
 
We have the same problem here. In the description of Sascha's steps, an important step is missing, namely, what exactly needs to be done to make sda1 vda1.
So I've gone through all the steps and would just need to run "mkinitrd -d / dev /?" To load the kernel modules, a mkinitrd -d / dev / vda1 will not work, and the uuids are still linked to sda1 has to be done?

Thank you and best regards
Richard
 
We have the same problem here. In the description of Sascha's steps, an important step is missing, namely, what exactly needs to be done to make sda1 vda1.
Hi,
if an guest reconiced the disk as vda or sda depends on the used driver.
virtio = vda
scsi* = sda

* also with virtio-scsi driver
So I've gone through all the steps and would just need to run "mkinitrd -d / dev /?" To load the kernel modules, a mkinitrd -d / dev / vda1 will not work, and the uuids are still linked to sda1 has to be done?

Thank you and best regards
Richard
The uuids (of filesystems) are independend from the driver - if you switch an disk from virtio to scsi, the uuids from the disks remained the same.

Udo
 
  • Like
Reactions: m4ak
Hi Udo,
I have probably a problem understanding?
uuids are independent of the driver = check
How the guest responds to the hard drive depends on the driver = Check

We want to migrate a Suse 11.4 vsphere client to Proxmox.
This does not work with the scsi = sda1 device.
Strangely enough, creating in Proxmox works with a SATA device?

Unfortunately I have to go back a few steps

lsmod | grep virtio shows that the virtio modules are loaded. So I have
mkinitrd -d / dev / sda1 executed

virtio_balloon 5137 0
virtio_pci 7982 0
virtio_blk 6400 0
virtio 5269 3 virtio_balloon, virtio_pci, virtio_blk
virtio_ring 7388 3 virtio_balloon, virtio_pci, virtio_blk


In / dev / disk / by-uuid are the softlinks of the uuids of sda1 and sda2
I entered these uuid's instead of the device name in / etc / fstab

Which step is still to be done so that I can start the guest successfully in Proxmox and he does not have to search desperately for sda1

richard
 

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!