查看: 2183|回复: 3

修改的镜像压缩时报错

6

主题

78

回帖

908

积分

中级会员

Rank: 3Rank: 3

积分
908
virt-sparsify --compress virtioa.qcow2  compressvirtioa.qcow2  
[   0.0] Create overlay file in /tmp to protect source disk
[   0.0] Examine source disk
◓ 25% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒═════════════════════════════════════════════════════════════════════════════════════════⟧ --:--
virt-sparsify: error: libguestfs error: guestfs_launch failed.
This usually means the libguestfs appliance failed to start or crashed.
Do:
  export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again.  For further information, read:
  http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.

If reporting bugs, run virt-sparsify with debugging enabled and include the
complete output:

  virt-sparsify -v -x [...]
回复

使用道具 举报

发表于 2022-3-1 13:44:23 | 显示全部楼层
export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
先执行这条命令,然后重新执行压缩的那条命令
回复

使用道具 举报

6

主题

78

回帖

908

积分

中级会员

Rank: 3Rank: 3

积分
908
 楼主| 发表于 2022-3-1 13:58:44 | 显示全部楼层
熄灭的蜡烛 发表于 2022-3-1 13:44
export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
先执行这条命令,然后重新执行压缩的那条命令 ...

执行后报的错更多了
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x558a68ea1bd0, program = virt-sparsify
libguestfs: trace: disk_format "/tmp/virtioa.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /tmp/virtioa.qcow2
libguestfs: parse_json: qemu-img info JSON output:\n{\n    "virtual-size": 48318382080,\n    "filename": "/tmp/virtioa.qcow2",\n    "cluster-size": 65536,\n    "format": "qcow2",\n    "actual-size": 9849942016,\n    "format-specific": {\n        "type": "qcow2",\n        "data": {\n            "compat": "1.1",\n            "lazy-refcounts": false,\n            "refcount-bits": 16,\n            "corrupt": false\n        }\n    },\n    "dirty-flag": false\n}\n\n
libguestfs: trace: disk_format = "qcow2"
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x558a68ea5b50, program = virt-sparsify
libguestfs: trace: disk_virtual_size "/tmp/virtioa.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ /tmp/virtioa.qcow2
libguestfs: parse_json: qemu-img info JSON output:\n{\n    "virtual-size": 48318382080,\n    "filename": "/tmp/virtioa.qcow2",\n    "cluster-size": 65536,\n    "format": "qcow2",\n    "actual-size": 9849942016,\n    "format-specific": {\n        "type": "qcow2",\n        "data": {\n            "compat": "1.1",\n            "lazy-refcounts": false,\n            "refcount-bits": 16,\n            "corrupt": false\n        }\n    },\n    "dirty-flag": false\n}\n\n
libguestfs: trace: disk_virtual_size = 48318382080
[   0.0] Create overlay file in /tmp to protect source disk
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x558a68ea47b0, program = virt-sparsify
libguestfs: trace: disk_create "/tmp/sparsify40fbd0.qcow2" "qcow2" -1 "backingfile:/tmp/virtioa.qcow2" "compat:1.1"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/tmp/virtioa.qcow2,compat=1.1
libguestfs: command: run: \ /tmp/sparsify40fbd0.qcow2
Formatting '/tmp/sparsify40fbd0.qcow2', fmt=qcow2 size=48318382080 compat=1.1 backing_file=/tmp/virtioa.qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
libguestfs: trace: disk_create = 0
[   0.0] Examine source disk
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x558a68ea4d90, program = virt-sparsify
libguestfs: trace: add_drive "/tmp/sparsify40fbd0.qcow2" "readonly:false" "format:qcow2" "cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 36, release: 13, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=virt-sparsify
libguestfs: launch: version=1.36.13
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfs5fSfpT
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.19
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: checking for previously cached test results of /usr/bin/qemu-system-x86_64, in /var/tmp/.guestfs-0
libguestfs: loading previously cached test results
libguestfs: qemu version: 2.11
libguestfs: qemu mandatory locking: yes
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
[00014ms] /usr/bin/qemu-system-x86_64 \
    -global virtio-blk-pci.scsi=off \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=kvm:tcg \
    -cpu host \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /var/tmp/.guestfs-0/appliance.d/kernel \
    -initrd /var/tmp/.guestfs-0/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/tmp/sparsify40fbd0.qcow2,cache=unsafe,format=qcow2,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/tmp/libguestfs2hQADu/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color'
qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-jNW88T/qemu-2.11+dfsg/target/i386/kvm.c:1906: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
libguestfs: child_cleanup: 0x558a68ea4d90: child process died
libguestfs: sending SIGTERM to process 2254
libguestfs: trace: launch = -1 (error)
virt-sparsify: error: libguestfs error: guestfs_launch failed, see earlier
error messages

If reporting bugs, run virt-sparsify with debugging enabled and include the
complete output:

  virt-sparsify -v -x [...]
libguestfs: trace: close
libguestfs: closing guestfs handle 0x558a68ea4d90 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs5fSfpT
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs2hQADu
libguestfs: trace: close
libguestfs: closing guestfs handle 0x558a68ea47b0 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x558a68ea5b50 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x558a68ea1bd0 (state 0)
回复

使用道具 举报

发表于 2022-3-1 15:22:49 | 显示全部楼层
iseeyou0918 发表于 2022-3-1 13:58
执行后报的错更多了
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0

不知道为什么这个压缩的时候还启动了qemu,因为qemu启动失败导致压缩失败了。这个我也不知道怎么解决。
回复

使用道具 举报

本版积分规则

Copyright   ©2015-2024  EmulatedLab  Powered by Discuz!©   ( 浙ICP备2021010423号-1 )
快速回复 返回列表 返回顶部