---
name: "dtc_write_xenhvm_conf"
section: "8"
platform: "linux"
package: "dtc-xen"
version: "0.5.17-1.2"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dtc_write_xenhvm_conf"
---

# dtc\_write\_xenhvm\_conf(8)

rewrites the xen startup script with selected params

## NAME

dtc\_write\_xenhvm\_conf - rewrites the xen startup script with selected params

## SYNOPSIS

**dtc\_write\_xenhvm\_conf** *VPS\_NUMBER* *MEMORY\_SIZE* *ALL\_IP\_ADDRESSES* *VNC\_CONSOLE\_PASSWORD* *HOW\_TO\_BOOT*

## DESCRIPTION

**dtc\_write\_xenhvm\_conf** This shell script is a part of the dtc-xen package that is to be used by the dtc panel to manage a Xen VPS server.

This script generate a Xen startup file with the parameters given to the script.

## PARAMETERS

Note that ALL parameters are mendatory.

**VPS\_NUMBER** has to be a number between 01 and 29

**MEMORY\_SIZE** is the amount of memory in mega bytes that you want to have setup in the Xen startup file for this VPS

**ALL\_IP\_ADDRESSES** is a list of IPs that you want to be set in the VM's startup file and in the VM's configuration. Note that the IPs have to be separated by spaces, and thus you might want to use single quotes like this: '1.2.3.4 1.2.3.5'. Note that only the first IP will be set in the VM's configuration, but the list will be set in the Xen startup file so you can use the anti-spoofing facilities of Xen if you need it (with untrusted users / unknown customers for example).

**VNC\_CONSOLE\_PASSWORD** This is the VNC console password that you want to have set-up in the Xen domU configuration file, so that you can connect using VNC to the the setup. Note that special value *no\_vnc* can be used to declare that you do not want the VNC console to be used at all.

**HOW\_TO\_BOOT** This controls what the VPS will use to boot. A special value of *hdd* can be used to tell dtc\_write\_xenhvm\_conf that you want to boot on the hard drive of the domU. Any other parameters will be used as a .iso file located in /var/lib/dtc-xen/ttyssh\_home/xenXX where xenXX equals to the VPS number set in the *VPS\_NUMBER* parameter (see above).

Note that whatever is set in this parameter, dtc\_write\_xenhvm\_conf will add as many cdrom devices as it finds .iso files in the /var/lib/dtc-xen/ttyssh\_home/xenXX folder.

## EXAMPLE

The following command:

dtc\_write\_xenhvm\_conf 14 512 '1.2.3.4 1.2.3.5' mYvNcPaSs boot.iso

will produce this config file in /etc/xen/xen14:

kernel = "/usr/lib/xen/boot/hvmloader"\
 builder = 'hvm'\
 memory = 512\
 name = "xen14${VPSNAME}"\
 vcpus=1\
 pae=0\
 acpi=0\
 apic=0\
 vif = \[ 'type=ioemu, mac=00:00:00:00:00:00, ip=1.2.3.4 1.2.3.5' \]\
 disk=\[ 'phy:/dev/mapper/lvm1-xen14,ioemu:hda,w', 'file:/var/lib/dtc-xen/ttyssh\_home/xen14/boot.iso,hdb:cdrom,r', 'file:/var/lib/dtc-xen/ttyssh\_home/xen14/cd2.iso,hdc:cdrom,r' \]\
 cdrom="/var/lib/dtc-xen/ttyssh\_home/xen14/boot.iso"\
 boot="d"\
 vfb = \[ "type=vnc,vncdisplay=21,vncpasswd=mYvNcPaSs" \]\
 nographic=0\
 vnc=1\
 stdvga=1\
 serial='pty'

Note that the above mac address will be calculated and depend on your node name: it will NOT be like the above example.

## UPDATES

See **http://www.gplhost.com/software-dtc-xen.html** for updates.
