dom0: Use 10.138.x.y for DispVMs and fix gateway/DNS addresses
This commit is contained in:
parent
fcd4cd44eb
commit
81ae4fafcf
@ -44,7 +44,7 @@ fi
|
|||||||
xenstore-write /local/domain/$ID/qubes_save_request 1
|
xenstore-write /local/domain/$ID/qubes_save_request 1
|
||||||
xenstore-watch-qubes /local/domain/$ID/device/qubes_used_mem
|
xenstore-watch-qubes /local/domain/$ID/device/qubes_used_mem
|
||||||
xenstore-read /local/domain/$ID/qubes_gateway | \
|
xenstore-read /local/domain/$ID/qubes_gateway | \
|
||||||
cut -d . -f 2 | tr -d "\n" > $VMDIR/netvm_id.txt
|
cut -d . -f 3 | tr -d "\n" > $VMDIR/netvm_id.txt
|
||||||
xl block-detach $1 /dev/xvdb
|
xl block-detach $1 /dev/xvdb
|
||||||
MEM=$(xenstore-read /local/domain/$ID/device/qubes_used_mem)
|
MEM=$(xenstore-read /local/domain/$ID/device/qubes_used_mem)
|
||||||
echo "DVM boot complete, memory used=$MEM. Saving image..."
|
echo "DVM boot complete, memory used=$MEM. Saving image..."
|
||||||
|
@ -258,8 +258,7 @@ char *dispname_by_dispid(int dispid)
|
|||||||
char *build_dvm_ip(int netvm, int id)
|
char *build_dvm_ip(int netvm, int id)
|
||||||
{
|
{
|
||||||
static char buf[256];
|
static char buf[256];
|
||||||
snprintf(buf, sizeof(buf), "10.%d.%d.%d", netvm, id / 254 + 200,
|
snprintf(buf, sizeof(buf), "10.138.%d.%d", netvm, (id % 254) + 1);
|
||||||
(id % 254) + 1);
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,9 +384,9 @@ void setup_xenstore(int netvm_id, int domid, int dvmid, char *name)
|
|||||||
write_xs_single(xs, domid, "qubes_ip",
|
write_xs_single(xs, domid, "qubes_ip",
|
||||||
build_dvm_ip(netvm_id, dvmid));
|
build_dvm_ip(netvm_id, dvmid));
|
||||||
write_xs_single(xs, domid, "qubes_netmask", "255.255.0.0");
|
write_xs_single(xs, domid, "qubes_netmask", "255.255.0.0");
|
||||||
snprintf(val, sizeof(val), "10.%d.0.1", netvm_id);
|
snprintf(val, sizeof(val), "10.137.%d.1", netvm_id);
|
||||||
write_xs_single(xs, domid, "qubes_gateway", val);
|
write_xs_single(xs, domid, "qubes_gateway", val);
|
||||||
snprintf(val, sizeof(val), "10.%d.255.254", netvm_id);
|
snprintf(val, sizeof(val), "10.137.%d.254", netvm_id);
|
||||||
write_xs_single(xs, domid, "qubes_secondary_dns", val);
|
write_xs_single(xs, domid, "qubes_secondary_dns", val);
|
||||||
write_xs_single(xs, domid, "qubes_vm_type", "AppVM");
|
write_xs_single(xs, domid, "qubes_vm_type", "AppVM");
|
||||||
write_xs_single(xs, domid, "qubes_restore_complete", "True");
|
write_xs_single(xs, domid, "qubes_restore_complete", "True");
|
||||||
|
Loading…
Reference in New Issue
Block a user