Hello, I've tried to use guestfish to lively mount virtual machine image. Here 
are some problems I met.

1. The name parameter in below command must be org.libguestfs.channel.0. or 
else the guest would produce error 'failed to connect to virtio-serial' and 
'/dev/virtio-ports/org.libguestfs.channel.0: No such file or directory' even 
though there did exists a file 'com.test.my' in 'dev/virtio-ports' directory.
sudo kvm -drive file=ubuntu-1204-vm.img -m 512 -vga std -k en-us -vnc :1 -net 
nic -net tap,ifname=tap1,script=./qemu-ifup,downscript=no -daemonize -device 
virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -chardev 
socket,id=charchannel0,path=/var/lib/libvirt/qemu/test.agent,server,nowait 
-device 
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.test.my

2. I leaved the first problem by altering the device name to default 
org.libguestfs.channel.0, now I can visit the live guest by guestfish. However, 
any write or edit operation like vi or write don't work even I set --rw option 
with guestfish. It seems like guestfish just write the results to a tmp file in 
/tmp/guestfish**/ directory rather than the guest image file. I don't know if 
it needs a writeback operation to make the changes happen. Besides, read 
operation like cat can only read files produced before the mount operation, any 
real time modification by the guest can't be found with guestfish --live. 

Any answers will be appreciated.
_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to