Difference between revisions of "Cool Solution - Run a virtualized Domain Controller Master with UVMM"
From Univention Wiki
m (→Install UVMM)
|Line 31:||Line 31:|
dd if=/dev/cdrom of=
dd if=/dev/cdrom of=.--amd64.iso
Revision as of 12:51, 14 October 2015
In a UCS domain, the first installed system should always be the DC Master. But when the DC Master should be virtualized via UVMM you can proceed as described in the following.
In a first step, install a DC Slave (or a DC Backup) onto your hardware. During installation it is necessary to:
- Deactivate the automatic domain join at the end of the installation process
- Choose at least KVM virtualization server and UCS Virtual Machine Manager as software components. All other components can be chosen regarding your needs.
Please update your system after successful installation:
It is recommended to restart your system after a successful update.
A harddisk image for the DC Master needs to be created. In this example we create a harddisk with 30 GB. Of course you can adjust the size to your needs.
cd /var/lib/libvirt/images/ qemu-img create -f qcow2 master.qcow2 30G
Additionally, a UCS installation image is needed. You can either download it from http://apt.univention.de/download/ucs-cds/ or create your own from an existing DVD, e.g.:
cd /var/lib/libvirt/images/ dd if=/dev/cdrom of=UCS_4.0-3-amd64.iso
At this point, UVMM is not accessible because of the missing DC Master. For this reason you need to define your virtual machine manually.
Install DC Master VM
Open your favorite editor, create a file called ucs-dcmaster.xml and copy the following content to it:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>master</name> <memory>1024000</memory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-1.1'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> </os> <features> <acpi/> <apic/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/master.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/UCS_4.0-3-amd64.iso'/> <target dev='hda' bus='ide'/> <readonly/> </disk> <interface type='bridge'> <source bridge='br0'/> <model type='virtio'/> </interface> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='de'/> </devices> </domain>
This is just an example. You can adjust the values to your needs. Subsequently the VM can be created using the xml-file:
virsh define ucs-dcmaster.xml
Now you can start the VM using virsh:
virsh start master
You need to install UCS as DC Master on this VM through VNC. For example you can use this command from a linux desktop system:
vncviewer <IP of UVMM/DC Slave>:0
Finishing the installation
Please update your DC Master after installation:
To ensure the correct installation of UVMM and KVM, the DC master packages must be installed on the new DC Master:
univention-add-app uvmm -m univention-add-app kvm -m
Now reboot your DC Master and log in to your DC Slave (or DC Backup). Change the first nameserver of the DC Slave (or DC Backup) to the IP address of the DC Master:
ucr set nameserver1="<IP address DC Master>"
Then you can start the domain join of the DC Slave (or DC Backup):
Afterwards reboot your UVMM host. Now you can access the UVMM module in the UMC (https://IP-address-DC-Slave/univention-management-console/).