You are not logged in.
Pages: 1
I have a guest that cannot access the internet I have, because I forgot to install dhcpcd.
But... I cannot get inside of the qcow2 with an installation nor can I install anything remotely needed to get it working.
So I wish to ask,
Is there a way to forcibly give internet to a vm? In either virt-manager, qemu, or virtualbox.
???
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD Gnuinos
Peace Be With us All!
Offline
Install libguestfs-tools and mount the qcow2 image as root:
# guestmount -a devuan.qcow2 -i /mntNow you can copy dhcpcd_*.deb and its dependencies to /mnt/root or wherever you want within /mnt, and safely remove the disk afterwards:
# guestunmount /mntBoot the image and install the packages via:
# dpkg -i /root/*.debYou can also configure /etc/network/interfaces if you wish:
auto eth0
allow-hotplug eth0
iface eth0 inet dhcphttps://dev1galaxy.org/viewtopic.php?id=6283
Last edited by aitor (Yesterday 17:02:52)
If you work systematically, things will come by itself (Lev D. Landau)
Offline
Another option...
With qemu, use -nic user option, and set up networking as follows
ip address add 10.0.2.15/24 dev eth0
ip link set dev eth0 up
ip route add 10.0.2.0/24 dev eth0
ip route add default via 10.0.2.2 dev eth0Also, your /etc/resolv.conf should contain
nameserver 10.0.2.3From there, you should be able to apt install dhcpcd-base or whatever package(s) you want.
With virtualbox, you could change the network to bridged, and set up static networking as though it were a physical device on your LAN. For example, if your LAN uses 192.168.1.0/24 with a gateway of 192.168.1.1 (I think this is a common default setup), you could do something like this
ip address add 192.168.1.20/24 dev eth0
ip link set dev eth0 up
ip route add 192.168.1.0/24 dev eth0
ip route add default via 192.168.1.1 dev eth0Obviously, you'd want to use an address not in use by another device. That was just an example.
Offline
Pages: 1