Networking in Template backed HVMs

21 views
Skip to first unread message

nicklaus...@gmail.com

unread,
May 25, 2016, 5:26:37 PM5/25/16
to qubes-users
The networking configuration is stored in the root file system, meaning the network needs to be reconfigured in each Template backed HVMs on boot, as the template and HVM have different IP addresses. Is there a way around this/am I configuring something wrong?

Andrew David Wong

unread,
May 25, 2016, 5:50:56 PM5/25/16
to nicklaus...@gmail.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
You can try putting any commands you need in /rw/config/rc.local (and
make it executable). All commands in that file will be executed as
root each time the VM starts up.

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXRh4yAAoJENtN07w5UDAwPEkP/i/Lo38GLbefhg+2j4nHQpQz
XONAGmlD6AeFcl4/9nINIe2g7x3V6WNGC5ll+FwJLjclhhQmBZmGRkrH1sqxt7aT
Zpm/OeHwwtHTFBQDXhnE4V6XWbxwCJcRBIm2JkMCLUz1mEBP0omILOKGb0zX01RI
vPQQVLgvxbnhI8SwMR8UZ5q2tTC8r0ZsJp99wGAaDtBYD/JRwY9sNXHE3nI+Px+a
BE5onhJPCWoQBuGplAHd4VuQpoqT+Qu5SjUde0eC3U1c0U6qd36EUxKBKzcACmzX
NLZ4myWuXahpEix1QiGsMx0jo/BSgzL5i7L3hNg4uLR4r7ngPlBX5sYfO0vgRwkK
rb/e27HLvtFtSYJqZEC+Qa+vciBUzIhn4S6H4P8gNRp7gjeZqvktYH7pqf5BzODS
Dudx6mBtt1V5TFGxerCw+yOkZnsDOw2G/3yLA8Oi6I5l4xB1VXsA82rAi1Szz1C8
TRWUTmy8p+dS9PdmXSI148uzRitnP6eds8tkx2nD6MBESeuRYCYx/9IF70W8OR2l
ZvYlYta3kYWizIqcbobu2kCO7+FgKgox9SrozJEQYErSD/fKPsDdEZczI6HxHh8Z
wCpgqZbeopsoB0AF2MeaS2VXdx+z+q+uUKMbVZ3ONFWLUR1lCOROCUamv3JS6okJ
3wWdhwJS5CBSdt26pf7T
=IPmb
-----END PGP SIGNATURE-----

Marek Marczykowski-Górecki

unread,
May 25, 2016, 7:04:59 PM5/25/16
to Andrew David Wong, nicklaus...@gmail.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wed, May 25, 2016 at 02:50:44PM -0700, Andrew David Wong wrote:
> On 2016-05-25 14:26, nicklaus...@gmail.com wrote:
> > The networking configuration is stored in the root file system,
> > meaning the network needs to be reconfigured in each Template
> > backed HVMs on boot, as the template and HVM have different IP
> > addresses. Is there a way around this/am I configuring something
> > wrong?
> >
>
> You can try putting any commands you need in /rw/config/rc.local (and
> make it executable). All commands in that file will be executed as
> root each time the VM starts up.

But /rw/config/rc.local applies only to Linux VMs with Qubes packages
installed. I *guess* it isn't the case in that HVM.
Yes, you need to configure IP each time the VM is started, but you can
automate this. In case of Windows - by installing windows tools (there
is "network-setup.exe" started automatically which do the job), or in
case of Linux writing some script to do that, see here:
https://github.com/QubesOS/qubes-core-agent-linux/blob/master/network/setup-ip
(this one is for the case of Linux PV VMs).

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXRi+SAAoJENuP0xzK19csqW4H+wXHKMJZWzU/VM1DyGa/lpWA
tVb0kg+vB8gr9W/HFMGRD5DdgrRdbja3reR08mdZCh8a4pWiBDppTZUKUN5+AosH
2cDTjEOUQb2Erlhhjc7qJ9LZ+AeJZcwyPtqv3AgypY3p93q5dcf6HOXq459/N+Gc
qleeM1DY01KiVDBYAzHlni/nv/s0Twf/d5SmpD1w9HhDLrJxaK2BGF7Glo3JiQqX
MlvF4vsTc3O3Lmj8aAQ6HFHDfCC5LF57cO0AqEQcnDD2a4I1ah3bymhRf4iN8D5/
13agVP0f4dAhtL+Bv0DqwVLqr43BT/u7WMUfyNbIZsikrJ367Uc36xS7l5t3PB8=
=5vA1
-----END PGP SIGNATURE-----

nicklaus...@gmail.com

unread,
May 25, 2016, 7:17:29 PM5/25/16
to qubes-users, a...@qubes-os.org, nicklaus...@gmail.com
On Wednesday, May 25, 2016 at 6:04:59 PM UTC-5, Marek Marczykowski-Górecki wrote:
>
> On Wed, May 25, 2016 at 02:50:44PM -0700, Andrew David Wong wrote:
> > On 2016-05-25 14:26, nicklaus...@gmail.com wrote:
> > > The networking configuration is stored in the root file system,
> > > meaning the network needs to be reconfigured in each Template
> > > backed HVMs on boot, as the template and HVM have different IP
> > > addresses. Is there a way around this/am I configuring something
> > > wrong?
> > >
> >
> > You can try putting any commands you need in /rw/config/rc.local (and
> > make it executable). All commands in that file will be executed as
> > root each time the VM starts up.
>
> But /rw/config/rc.local applies only to Linux VMs with Qubes packages
> installed. I *guess* it isn't the case in that HVM.
> Yes, you need to configure IP each time the VM is started, but you can
> automate this. In case of Windows - by installing windows tools (there
> is "network-setup.exe" started automatically which do the job), or in
> case of Linux writing some script to do that, see here:
> https://github.com/QubesOS/qubes-core-agent-linux/blob/master/network/setup-ip
> (this one is for the case of Linux PV VMs).

Yes, /rw does not exist in this instance. I'll write up a script similar to the Setup IP script. As I am writing this as part of the HVM Template documentation, is there a specific location I should put the script to match the rest of Qubes?

Marek Marczykowski-Górecki

unread,
May 25, 2016, 7:20:08 PM5/25/16
to nicklaus...@gmail.com, qubes-users, a...@qubes-os.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

If you don't have Qubes packages installed, there is no Qubes specific
directory. So probably something like /usr/sbin/ will do, then launch it
from some startup script (either /etc/rc.local of equivalent, or create
proper sysvinit/systemd/upstart/whatever service file).

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXRjMfAAoJENuP0xzK19csqH4H/AsgSnTtmzZYnR2wHDvKMloV
2IwvXD9+bKn5ETp0iiop1w5O3mlZv5pbGfnBjkxm2ydrJh0GKkMQyJIaj9LLurKQ
7x2et4zHBjOKnOqKMOUDaWQ+gTNcVbnKL4VHZWZ2B6ATbR6um3FRbCAYiTU1IwM7
7FIcMy9XKFJFJPSgEt5rDoqxDkSUlQlinj7Cwj9eg3DB052pXzeCIGyEFdgqkvtY
ZGuxikNfeNO8ca3ZeA5rHsOtmQza3qDb1qBAx4imYQ5TeVYorfDW3iYYCtPNO50Z
f3ni8xkiWLb/afMXjZnfUn9WU9fBnhP7Lcz2ogJkpkAypbuKuw9X5iQwXVLFFgA=
=QgQF
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages