Skip to content
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

vmcloak in ubuntu 21.10 #196

Open
netpanda opened this issue Mar 9, 2022 · 4 comments
Open

vmcloak in ubuntu 21.10 #196

netpanda opened this issue Mar 9, 2022 · 4 comments

Comments

@netpanda
Copy link

netpanda commented Mar 9, 2022

vmcloak is not working on Ubuntu 21.10 with normal user permissions.

failed to create tun device: Operation not permitted

Full exit:

~/vmcloak/vmcloak$ vmcloak --debug init --win10x64 --hddsize 128 --cpus 2 --ramsize 4096 --network 192.168.122.0/24 --vm qemu --vrde --vrde-port 4600 --ip 192.168.122.20 --iso-mount /mnt/win10x64 --dns 208.67.222.222 win10base virbr0
2022-03-09 22:50:41,951 vmcloak INFO: Image IP: 192.168.122.20. Image network: 192.168.122.0/24
2022-03-09 22:50:52,524 vmcloak.abstract DEBUG: Executing genisoimage: /usr/bin/genisoimage -quiet -b boot.img -o /.vmcloak/iso/win10base.iso -no-emul-boot -iso-level 2 -udf -J -l -D -N -joliet-long -relaxed-filenames -allow-limited-size /.vmcloak/iso/tmpk4uivdcr
2022-03-09 22:51:06,786 vmcloak INFO: Created ISO:/.vmcloak/iso/win10base.iso
2022-03-09 22:51:06,786 vmcloak.platforms.qemu INFO: Create VM instance for win10base
2022-03-09 22:51:06,786 vmcloak.platforms.qemu INFO: Creating disk /.vmcloak/image/win10base.qcow2 with size 128G
Formatting '/.vmcloak/image/win10base.qcow2', fmt=qcow2 cluster_size=2097152 extended_l2=off compression_type=zlib size=137438953472 lazy_refcounts=on refcount_bits=16
2022-03-09 22:51:06,956 vmcloak.platforms.qemu DEBUG: Execute: qemu-system-x86_64 -monitor stdio -nodefaults -M q35 -vga std -smp 2 -overcommit mem-lock=off -rtc base=localtime,driftfix=slew -m 4096 -netdev type=bridge,br=virbr0,id=net0 -device rtl8139,netdev=net0,mac=00:06:5b:49:1c:04,bus=pcie.0,addr=3 -device ich9-ahci,id=ahci -device ide-hd,bus=ahci.0,unit=0,drive=disk,bootindex=2 -device ide-cd,bus=ahci.1,unit=0,drive=cdrom,bootindex=1 -device usb-ehci,id=ehci -device usb-tablet,bus=ehci.0 -soundhw hda -enable-kvm -drive file=/.vmcloak/iso/win10base.iso,format=raw,if=none,id=cdrom,readonly=on -drive file=/.vmcloak/image/win10base.qcow2,format=qcow2,if=none,id=disk -display none -vnc 0.0.0.0:4600
failed to create tun device: Operation not permitted
qemu-system-x86_64: -netdev type=bridge,br=virbr0,id=net0: bridge helper failed
2022-03-09 22:51:06,985 vmcloak ERROR: Failed to create 'win10base':
Traceback (most recent call last):
File "/.local/lib/python3.9/site-packages/vmcloak/main.py", line 361, in init
p.create_new_image(name, os, iso_path, attr)
File "/.local/lib/python3.9/site-packages/vmcloak/platforms/qemu.py", line 193, in create_new_image
raise ValueError(m.returncode)
ValueError: 1
2022-03-09 22:51:06,987 vmcloak.platforms.qemu INFO: Cleanup VM win10base

@ezavalar
Copy link

ezavalar commented Mar 21, 2022

That's because you should run this command on your virtualenv previously created, are you doing it like that?

@derfel1989
Copy link

@netpanda Could you let me know what tutorial you are using to deploy Cuckoo with Ubuntu 21.10 and Python 3.9 + Windows 10 as a guest?

Thank you.

@ezavalar
Copy link

ezavalar commented Apr 22, 2022

I'm using these ones...
Cuckoo tutorial part 1
Cuckoo tutorial part 2
It is on Ubuntu, but I think it's the same idea...

@geeksailor
Copy link

geeksailor commented Oct 26, 2023

Also just ran into this issue. Were any solutions ever found?
Thanks!

EDIT: I think I screwed up the part about changing chmod u+s /usr/lib/qemu/qemu-bridge-helper. It appears to be working now for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants