-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can the default qcow2 provided by Panda for x86_64 be replaced? If so, what issues might there be with my operation steps? #1493
Comments
Why are you using workstation? Just use panda/qemu/kvm with the original qcow. You can install software into the qcow filesystem as needed. You can't take a snapshot with qemu/kvm that can then be loaded into panda, but after modifying the filesystem with qemu/kvm you can boot it under panda and then take a new snapshot. Also try interacting with your guest instead of using the python interface, it's likely printing something other than a PS1 style prompt via the serial console which is causing your exception. You can run |
I'm just an undergraduate student majoring in Computer Science and Technology who use Panda for my undergraduate project. I'm not very familiar with this field. That's why I was using workstation(It's very stupid). I followed your guidance to boot the original image using Panda (specifically, ./panda/bionic-server-cloudimg-amd64-noaslr-nokaslr.qcow2), then enabled networking, and installed software (i.e., modified the file system). After that, I rebooted this qcow2 under Panda and took a new snapshot named "root." However, it seems that this snapshot cannot be used with PyPanda. What issues might there be with my steps? Here are my steps:
Then, I wrote a short Python code to test if the new snapshot is usable, and PyPanda threw a timeout exception. from pandare import Panda panda = Panda(generic="x86_64") @panda.queue_blocking panda.run() but I got the exception: Does Panda have any special requirements for newly created snapshots? |
If you want to use a new snapshot with |
I don't think there's much documentation around this (sorry!) it's not a feature that gets much use. If you want to help fix that PRs are always welcome :) |
Here are my steps:
qemu-img convert -f qcow2 -O vmdk bionic-server-cloudimg-amd64-noaslr-nokaslr.qcow2 bionic-server-cloudimg-amd64-noaslr-nokaslr.vmdk
3.Log in, enable networking, and then install the software I need.
1./panda-system-x86_64 -hda ~/.panda/bionic-server-cloudimg-amd64-noaslr-nokaslr.qcow2 -monitor hda -m 1G
2.(qemu) savevm root
However, it does NOT work for me. Is there an issue with the timing of creating the "root" snapshot at the login screen?
Should I create the snapshot after entering the login username "root" or before?
Here is the trace:
File "/usr/local/lib/python3.10/dist-packages/pandare/utils.py", line 106, in wrapper
return func(*args, **kwargs)
File "/home/test/PycharmProjects/graduationProject/check/main_copy_20240407.py", line 77, in my_runcmd
print(panda.run_serial_cmd("ls -a /"))
File "/usr/local/lib/python3.10/dist-packages/pandare/utils.py", line 106, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pandare/panda.py", line 2416, in run_serial_cmd
result = self.serial_console.expect(timeout=timeout)
File "/usr/local/lib/python3.10/dist-packages/pandare/panda_expect.py", line 435, in expect
raise TimeoutExpired(f"{self.name} Read message \n{full_buffer}\n")
pandare.panda_expect.TimeoutExpired: serial Read message
[bytearray(b'l')]
The text was updated successfully, but these errors were encountered: