You are not logged in.
Pages: 1
Hi!
I have set up a kvm virtual machine with windows 7 as guest.
To set the machine up in a host-only network, I followed the instructions in the wiki: https://wiki.archlinux.org/index.php/QE … networking and wrote them in a shell file:
#!/bin/bash
/usr/bin/brctl addbr br0
/usr/bin/ip addr add 10.0.2.0/24 dev br0
/usr/bin/ip link set br0 up
/usr/bin/dnsmasq --interface=br0 --bind-interfaces --dhcp-range=10.0.2.15,10.0.2.31The manual execution of this script gives the desired result.
Now to execute it on startup by systemd, I used the following .service-file:
[Unit]
Description=Host-only-VM-Network
After=network.target
[Service]
Type=simple
ExecStart=/home/bananajoe/.bin/kvm-network.sh
[Install]
WantedBy=multi-user.targetThis gives me the following result:
bananajoe@x86 ~ % sudo systemctl start kvm-network.service
bananajoe@x86 ~ % sudo systemctl status kvm-network.service
kvm-network.service - Host-only-VM-Network
Loaded: loaded (/etc/systemd/system/kvm-network.service; disabled)
Active: inactive (dead) since So 2013-06-30 20:06:19 CEST; 1s ago
Process: 1059 ExecStart=/home/bananajoe/.bin/kvm-network.sh (code=exited, status=0/SUCCESS)
Jun 30 20:06:19 x86 systemd[1]: Started Host-only-VM-Network.
Jun 30 20:06:19 x86 dnsmasq[1071]: started, version 2.66 cachesize 150
Jun 30 20:06:19 x86 dnsmasq[1071]: compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth
Jun 30 20:06:19 x86 dnsmasq-dhcp[1071]: DHCP, IP range 10.0.2.15 -- 10.0.2.31, lease time 1hSounds promising, but I don't get a proper network connection in the machine after that. Running the dnsmasq-command above by hand again fixes the problem and everything works as intended.
I don't get the issue here, what does systemd differently than a direct shell approach?
I'd appreciate any help to understand this problem.
Thanks,
Boris
Last edited by boris220 (2013-07-01 17:02:18)
Offline
Pages: 1