How to get the same network with QEMU than VirtualBox
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I've 2 VMs Debian 9.4 : one working trough VirtualBox ; the other working trough QEMU. I configured a bridge on my workstation like this :
ip tuntap add dev tap0 mode tap group 1000
ip link set dev tap0 up promisc on
ip addr add 0.0.0.0 dev tap0
#Creating bridge br0
ip link add br0 type bridge
ip link set br0 up
ip link set tap0 master br0
echo "0" | tee --append /sys/class/net/br0/bridge/stp_state
ip addr add 192.168.2.1/24 dev br0
sysctl net.ipv4.conf.tap0.proxy_arp=1
sysctl net.ipv4.conf.enp6s0.proxy_arp=1
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o enp6s0 -j MASQUERADE
iptables -A FORWARD -i br0 -o enp6s0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp6s0 -o br0 -j ACCEPT
In VirtualBox network configuration panel I took tap0 as bridge. The VM can go on the WEB, do update of the system, recieve a connection with ssh and the mean action I expect, install npm package without PB as example : npm install color
I've problem with the QEMU virtual machine that I'm launching with this command :
qemu-system-x86_64 -hda Debian9_amd64_stretch_fr.qcow2 -m 1024 -device e1000,netdev=network0,mac=52:55:00:d1:55:01 -netdev tap,id=network0,ifname=tap0,script=no,downscript=no
With this virtual machine I can go on the WEB, do update of the system, receive a connection with ssh on the VM but I can not do the mean action I expect, install npm package. I've got this error message :
npm ERR! Invalid argument: family must be 4 or 6
You should know I passed many times before to know there is a network problem so is not coming from npm. Is the comparison with the both VM software told me where is coming out.
Thanks
virtualbox virtual-machine qemu
add a comment |Â
up vote
1
down vote
favorite
I've 2 VMs Debian 9.4 : one working trough VirtualBox ; the other working trough QEMU. I configured a bridge on my workstation like this :
ip tuntap add dev tap0 mode tap group 1000
ip link set dev tap0 up promisc on
ip addr add 0.0.0.0 dev tap0
#Creating bridge br0
ip link add br0 type bridge
ip link set br0 up
ip link set tap0 master br0
echo "0" | tee --append /sys/class/net/br0/bridge/stp_state
ip addr add 192.168.2.1/24 dev br0
sysctl net.ipv4.conf.tap0.proxy_arp=1
sysctl net.ipv4.conf.enp6s0.proxy_arp=1
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o enp6s0 -j MASQUERADE
iptables -A FORWARD -i br0 -o enp6s0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp6s0 -o br0 -j ACCEPT
In VirtualBox network configuration panel I took tap0 as bridge. The VM can go on the WEB, do update of the system, recieve a connection with ssh and the mean action I expect, install npm package without PB as example : npm install color
I've problem with the QEMU virtual machine that I'm launching with this command :
qemu-system-x86_64 -hda Debian9_amd64_stretch_fr.qcow2 -m 1024 -device e1000,netdev=network0,mac=52:55:00:d1:55:01 -netdev tap,id=network0,ifname=tap0,script=no,downscript=no
With this virtual machine I can go on the WEB, do update of the system, receive a connection with ssh on the VM but I can not do the mean action I expect, install npm package. I've got this error message :
npm ERR! Invalid argument: family must be 4 or 6
You should know I passed many times before to know there is a network problem so is not coming from npm. Is the comparison with the both VM software told me where is coming out.
Thanks
virtualbox virtual-machine qemu
Use libvirtd and virt-manager to run your VMs. It will take care of virtual networking for you. And save your sanity from having to create those lengthy command lines.
â Michael Hampton
Apr 18 at 21:27
Easy answer in this case I don't need QEMU and I keep Virtualbox working. How to configure the netdev and device options of QEMU ?
â dubis
Apr 19 at 13:31
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I've 2 VMs Debian 9.4 : one working trough VirtualBox ; the other working trough QEMU. I configured a bridge on my workstation like this :
ip tuntap add dev tap0 mode tap group 1000
ip link set dev tap0 up promisc on
ip addr add 0.0.0.0 dev tap0
#Creating bridge br0
ip link add br0 type bridge
ip link set br0 up
ip link set tap0 master br0
echo "0" | tee --append /sys/class/net/br0/bridge/stp_state
ip addr add 192.168.2.1/24 dev br0
sysctl net.ipv4.conf.tap0.proxy_arp=1
sysctl net.ipv4.conf.enp6s0.proxy_arp=1
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o enp6s0 -j MASQUERADE
iptables -A FORWARD -i br0 -o enp6s0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp6s0 -o br0 -j ACCEPT
In VirtualBox network configuration panel I took tap0 as bridge. The VM can go on the WEB, do update of the system, recieve a connection with ssh and the mean action I expect, install npm package without PB as example : npm install color
I've problem with the QEMU virtual machine that I'm launching with this command :
qemu-system-x86_64 -hda Debian9_amd64_stretch_fr.qcow2 -m 1024 -device e1000,netdev=network0,mac=52:55:00:d1:55:01 -netdev tap,id=network0,ifname=tap0,script=no,downscript=no
With this virtual machine I can go on the WEB, do update of the system, receive a connection with ssh on the VM but I can not do the mean action I expect, install npm package. I've got this error message :
npm ERR! Invalid argument: family must be 4 or 6
You should know I passed many times before to know there is a network problem so is not coming from npm. Is the comparison with the both VM software told me where is coming out.
Thanks
virtualbox virtual-machine qemu
I've 2 VMs Debian 9.4 : one working trough VirtualBox ; the other working trough QEMU. I configured a bridge on my workstation like this :
ip tuntap add dev tap0 mode tap group 1000
ip link set dev tap0 up promisc on
ip addr add 0.0.0.0 dev tap0
#Creating bridge br0
ip link add br0 type bridge
ip link set br0 up
ip link set tap0 master br0
echo "0" | tee --append /sys/class/net/br0/bridge/stp_state
ip addr add 192.168.2.1/24 dev br0
sysctl net.ipv4.conf.tap0.proxy_arp=1
sysctl net.ipv4.conf.enp6s0.proxy_arp=1
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o enp6s0 -j MASQUERADE
iptables -A FORWARD -i br0 -o enp6s0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp6s0 -o br0 -j ACCEPT
In VirtualBox network configuration panel I took tap0 as bridge. The VM can go on the WEB, do update of the system, recieve a connection with ssh and the mean action I expect, install npm package without PB as example : npm install color
I've problem with the QEMU virtual machine that I'm launching with this command :
qemu-system-x86_64 -hda Debian9_amd64_stretch_fr.qcow2 -m 1024 -device e1000,netdev=network0,mac=52:55:00:d1:55:01 -netdev tap,id=network0,ifname=tap0,script=no,downscript=no
With this virtual machine I can go on the WEB, do update of the system, receive a connection with ssh on the VM but I can not do the mean action I expect, install npm package. I've got this error message :
npm ERR! Invalid argument: family must be 4 or 6
You should know I passed many times before to know there is a network problem so is not coming from npm. Is the comparison with the both VM software told me where is coming out.
Thanks
virtualbox virtual-machine qemu
asked Apr 18 at 14:05
dubis
4281415
4281415
Use libvirtd and virt-manager to run your VMs. It will take care of virtual networking for you. And save your sanity from having to create those lengthy command lines.
â Michael Hampton
Apr 18 at 21:27
Easy answer in this case I don't need QEMU and I keep Virtualbox working. How to configure the netdev and device options of QEMU ?
â dubis
Apr 19 at 13:31
add a comment |Â
Use libvirtd and virt-manager to run your VMs. It will take care of virtual networking for you. And save your sanity from having to create those lengthy command lines.
â Michael Hampton
Apr 18 at 21:27
Easy answer in this case I don't need QEMU and I keep Virtualbox working. How to configure the netdev and device options of QEMU ?
â dubis
Apr 19 at 13:31
Use libvirtd and virt-manager to run your VMs. It will take care of virtual networking for you. And save your sanity from having to create those lengthy command lines.
â Michael Hampton
Apr 18 at 21:27
Use libvirtd and virt-manager to run your VMs. It will take care of virtual networking for you. And save your sanity from having to create those lengthy command lines.
â Michael Hampton
Apr 18 at 21:27
Easy answer in this case I don't need QEMU and I keep Virtualbox working. How to configure the netdev and device options of QEMU ?
â dubis
Apr 19 at 13:31
Easy answer in this case I don't need QEMU and I keep Virtualbox working. How to configure the netdev and device options of QEMU ?
â dubis
Apr 19 at 13:31
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f438513%2fhow-to-get-the-same-network-with-qemu-than-virtualbox%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Use libvirtd and virt-manager to run your VMs. It will take care of virtual networking for you. And save your sanity from having to create those lengthy command lines.
â Michael Hampton
Apr 18 at 21:27
Easy answer in this case I don't need QEMU and I keep Virtualbox working. How to configure the netdev and device options of QEMU ?
â dubis
Apr 19 at 13:31