Univention Bugzilla – Attachment 3425 Details for
Bug 22221
qemu-0.14: restore snapshot defekt für ausgeschaltete VMs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Shell script zum 100%igen reproduzieren
22221_qemu_qcow2_bug.test (text/plain), 1.71 KB, created by
Philipp Hahn
on 2011-08-04 16:30:31 CEST
(
hide
)
Description:
Shell script zum 100%igen reproduzieren
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2011-08-04 16:30:31 CEST
Size:
1.71 KB
patch
obsolete
>#!/bin/sh ># Show Qcow2 image corruption bug <https://forge.univention.org/bugzilla/show_bug.cgi?id=22221> >set -e -x >trap 'set +e ; kill $pid_kvm $pid_monitor $pid_console ; rm -f ./{monitor,console}.{in,out}' EXIT > ># Restore image from backup >test -f pmh_squeeze-0.qcow2.bak2 && dd bs=1M if=pmh_squeeze-0.qcow2.bak2 of=pmh_squeeze-0.qcow2 > ># Create offline snapshot >qemu-img snapshot -c Off pmh_squeeze-0.qcow2 > ># Run VM >test -p ./monitor.in || mkfifo ./monitor.in >test -p ./monitor.out || mkfifo ./monitor.out >test -p ./console.in || mkfifo ./console.in >test -p ./console.out || mkfifo ./console.out >kvm -M pc-0.14 -cpu kvm32 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -nodefconfig -nodefaults \ > -chardev pipe,id=monitor,path=monitor,server,nowait -mon chardev=monitor,mode=readline \ > -rtc base=utc \ > -boot c \ > -drive file=/var/lib/libvirt/images/pmh_squeeze-0.qcow2,if=none,id=drive-virtio-disk0,boot=on,format=qcow2,cache=writethrough -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 \ > -chardev pipe,id=serial0,path=console -device isa-serial,chardev=serial0 -nographic & >pid_kvm=$! > >exec 3>./monitor.in # qemu monitor >cat ./monitor.out & >pid_monitor=$! > >exec 4>./console.in # vm console >cat ./console.out & >pid_console=$! > ># Wait for VM to boot >sleep 10 > ># Login >echo root >&4 >echo univention >&4 > ># Create online snapshot >echo savevm On >&3 # qemu monitor >echo info snapshots >&3 # qemu monitor > ># [Optional] Create modified clusters >echo dd if=/dev/zero bs=1M count=1k of=/dev/vda >&4 >echo sync >&4 >echo touch /boom >&4 > ># Quit qemu >echo quit >&3 # qemu monitor >wait > ># Revert to offline snapshot >while qemu-img check pmh_squeeze-0.qcow2 >do > qemu-img snapshot -a Off pmh_squeeze-0.qcow2 >done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 22221
:
3179
| 3425 |
3426