[SOLVED] Cannot use Ramdisk for KVM storage

S

smarteos

Guest
Hello,

I have a fresh setup with Proxmox 3.0 (manual install over Debian 7), and cannot start a newly created KVM (Windows) guest VM with storage based on /run/shm (tmpfs filesystem).

This is the output of the start command :

kvm: -drive file=/run/shm/images/260/vm-260-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none: could not open disk image /run/shm/images/260/vm-260-disk-1.qcow2: Invalid argument
TASK ERROR: start failed: command '/usr/bin/kvm -id 260 -chardev 'socket,id=qmp,path=/var/run/qemu-server/260.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/260.vnc,x509,password -pidfile /var/run/qemu-server/260.pid -daemonize -name xptmpfs1 -smp 'sockets=1,cores=1' -nodefaults -boot 'menu=on' -vga cirrus -k fr -m 512 -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -drive 'if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/run/shm/images/260/vm-260-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap260i0,script=/var/lib/qemu-server/pve-bridge,vhost=on' -device 'virtio-net-pci,mac=D6:5A:56:B6:EE:B2,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -rtc 'driftfix=slew,base=localtime'' failed: exit code 1

And here is pveversion -v :
pve-manager: 3.0-20 (pve-manager/3.0/0428106c)
running kernel: 2.6.32-20-pve
proxmox-ve-2.6.32: 3.0-100
pve-kernel-2.6.32-20-pve: 2.6.32-100
lvm2: 2.02.95-pve3
clvm: 2.02.95-pve3
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-1
pve-cluster: 3.0-4
qemu-server: 3.0-15
pve-firmware: 1.0-22
libpve-common-perl: 3.0-4
libpve-access-control: 3.0-4
libpve-storage-perl: 3.0-6
vncterm: 1.1-3
vzctl: 4.0-1pve3
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-12
ksm-control-daemon: 1.1-1


The goal is to locate a KVM template in RAM, and create in near realtime some new guests from this ramdisk template to get the best I/O.

Thanks a lot for your help

Best regards,

Smarteos


Thanks a lot for your help
 
Last edited by a moderator:
Try to use writeback cache settings for the disk.

Thank you so much Dietmar

It works perfectly now, and it's wonderfully fast ;-)

and associated with this new Kvm template function, it's a killing feature !!

Long life to your team

Best regards

Smarteos
 

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!