VM disks get reordered

Oct 24, 2009
54
0
6
When the kvm command is run, the vm disks are passed through in the wrong order. here is my conf file.

name: library
bootdisk: virtio0
ostype: l26
memory: 512
onboot: 1
sockets: 1
virtio0: os-images:vm-102-disk-1
description: torrents,samba,irssi<br>10.0.1.5
cores: 1
localtime: 1
boot: c
freeze: 0
cpuunits: 1000
acpi: 1
kvm: 1
vlan3: virtio=10:10:10:10:10:10
virtio1: os-images:vm-102-disk-2

here is the kvm command generated by it:
/usr/bin/kvm -monitor unix:/var/run/qemu-server/102.mon,server,nowait -vnc unix:/var/run/qemu-server/102.vnc,password -pidfile /var/run/qemu-server/102.pid -daemonize -usbdevice tablet -name library -smp sockets=1,cores=1 -nodefaults -boot menu=on,order=c -vga cirrus -tdf -localtime -k en-us -drive file=/dev/raid/vm-102-disk-2,if=virtio,index=1 -drive file=/dev/raid/vm-102-disk-1,if=virtio,index=0,boot=on -m 512 -net tap,vlan=3,ifname=vmtab102i3,script=/var/lib/qemu-server/bridge-vlan -net nic,vlan=3,model=virtio,macaddr=10:10:10:10:10:10

here is the command that I want to be run:
/usr/bin/kvm -monitor unix:/var/run/qemu-server/102.mon,server,nowait -vnc unix:/var/run/qemu-server/102.vnc,password -pidfile /var/run/qemu-server/102.pid -daemonize -usbdevice tablet -name library -smp sockets=1,cores=1 -nodefaults -boot menu=on,order=c -vga cirrus -tdf -localtime -k en-us -drive file=/dev/raid/vm-102-disk-1,if=virtio,index=0,boot=on -drive file=/dev/raid/vm-102-disk-2,if=virtio,index=1 -m 512 -net tap,vlan=3,ifname=vmtab102i3,script=/var/lib/qemu-server/bridge-vlan -net nic,vlan=3,model=virtio,macaddr=10:10:10:10:10:10

here is my pveversion --verbose:
pve-manager: 1.5-8 (pve-manager/1.5/4674)
running kernel: 2.6.32-1-pve
proxmox-ve-2.6.32: 1.5-4
pve-kernel-2.6.32-1-pve: 2.6.32-4
pve-kernel-2.6.18-2-pve: 2.6.18-5
pve-kernel-2.6.24-5-pve: 2.6.24-6
pve-kernel-2.6.18-1-pve: 2.6.18-4
qemu-server: 1.1-12
pve-firmware: 1.0-4
libpve-storage-perl: 1.0-10
vncterm: 0.9-2
vzctl: 3.0.23-1pve8
vzdump: 1.2-5
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.12.3-1
ksm-control-daemon: 1.0-3

what happened is that between the stable version of kvm (0.11) to the new version (0.12.3) your code decided to reverse the order that the drives were sent into the kvm command. This causes the drives to be switched around (vda becomes vdb and visa versa).
 
what happened is that between the stable version of kvm (0.11) to the new version (0.12.3) your code decided to reverse the order that the drives were sent into the kvm command. This causes the drives to be switched around (vda becomes vdb and visa versa).

The order of the arguments should not have any impact. We use "index=X" to order the drives. Can someone else confirm that bug?
 
I can confirm that i today experienced that my disk's got switched around after upgrading to kvm 0.12.3.
The VM got two disks and the one called vda is now called vdb, and vdb is vda. (not a major problem but annoying ;-) )
Haven't testet if running the vm manually with the disk order switched around fixes it.
 
I can also confirm the problem with reordered disks an qemu-server: 1.1-12

After adding a virtio1 disk the virtio1 disk becomes vda while the virtio0 disk becomes vdb
even more worse: I have no idea of how to fix it, i cannot reconfigure all vms ...
The command line seems to be correct but qemu does not care, cmdline is:
/usr/bin/kvm -monitor unix:/var/run/qemu-server/133.mon,server,nowait -vnc unix:/var/run/qemu-server/133.vnc,password -pidfile /var/run/qemu-server/133.pid -daemonize -usbdevice tablet -name customerweb1 -smp sockets=2,cores=1 -nodefaults -boot menu=on -vga cirrus -tdf -k de -drive file=/dev/cdrom1,if=ide,index=2,media=cdrom -drive file=/vms01/images/133/vm-133-disk-1.qcow2,if=virtio,index=0,boot=on -m 512 -net tap,vlan=1,ifname=vmtab133i1,script=/var/lib/qemu-server/bridge-vlan -net nic,vlan=1,model=virtio,macaddr=FE:48:EF:FC:AE:F5
 
Does anybody know a trick of how i can force a correct drive order using proxmox ?
Or any hint in which file is the source code to build the argument line so that I might be able to resort them by myself ?
 
we also seen this issue here, hopefully we will get a fix soon.
 
It is now the 9 of august 2010 and still got the same problem with proxmox.
I run now kernel 2.6.24-11-pve. Can someone give me a status?

This is fixed since 28 April:

Code:
qemu-server (1.1-14) unstable; urgency=low

  *  correct order of config option (prevent virtio reordering)

 -- Proxmox Support Team <support@proxmox.com>  Wed, 28 Apr 2010 09:05:15 +0200

What version do you use?
 
Code:
vmh01:~# apt-cache policy qemu-server
qemu-server:
  Installed: 1.1-11
  Candidate: 1.1-16
  Version table:
     1.1-16 0
        500 http://download.proxmox.com lenny/pve Packages
 *** 1.1-11 0
        100 /var/lib/dpkg/status
I see that i use a old version.
I try to update it? Check of it will fix my problem.

Thanks for your help
 
Last edited:

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!