Xen Manual

From $1

Table of contents
  1. 1. APT get :
  2. 2.  Xen Backup

Summary

This article describes how to disable clock synchronization on the Xen Virtual Machines (XenVMs). By default, the clocks are synchronized with their XenServer Host and changing the date and time on them is not possible.

Procedure

1. On the Text Console for the XenVM, type the command:
# echo 1 > /proc/sys/xen/independent_wallclock

2. Use the date command, which takes the form date <MMDDhhmm>, to set the date. For example, the following command would set the date to 21:21:00 3 May 2007:
# date 05032121

3. If you want this setting to persist through a reboot of the virtual machine, change the sysctl configuration file sysctl.conf by adding the following lines:
# Independent wall clock time to XenServer Host
xen/independent_wallclock = 1


You can also use the XenServer Administrator console to accomplish this by adding the following line as a boot parameter to the XenVM:
independent_wallclock = 1

 

APT get :

After not so long research I figured out, that this problem was caused by change of gpg key used by ftpmaster on Debian official repository servers. Google gave me some information and I found some fix which works fine for me:

1
2
3
4
5
6
# gpg --keyserver wwwkeys.eu.pgp.net --recv-keys XXXXXXXXXXXXXXXX
...
# apt-key add /root/.gnupg/pubring.gpg
...
# apt-get update
...

Where XXXXXXXXXXXXXXXX is your missing key (e.g A70DAF536070D3A1).

That’s it! Happy using Debian GNU/Linux!

 

 Xen Backup

#! /bin/bash
INPUT_FILE=/dev/virtuals/virtual.example.com-disk
OUTPUT_FILE=./virtual.example.com-disk.`date +%Y%m%d`.img
VIRTUAL_NAME=/etc/xen/defiant.conf
dd if=$INPUT_FILE of=$OUTPUT_FILE
xm create VIRTUAL_NAME
cksum $OUTPUT_FILE > $OUTPUT_FILE.cksum
bzip2 $OUTPUT_FILE
 

 

#! /bin/bash
INPUT_FILE=/dev/virtuals/virtual.example.com-disk
OUTPUT_FILE=./virtual.example.com-disk.`date +%Y%m%d`.img
VIRTUAL_NAME=example
VIRTUAL_ROOT=/dev/virtuals
xm shutdown $VIRTUAL_NAME -w
lvcreate -L 1G -n snap $INPUT_FILE
xm create /etc/xen/$VIRTUAL_NAME
dd if=$VIRTUAL_ROOT/snap | bzip2 > $OUTPUT_FILE.bz2
cksum $VIRTUAL_ROOT/snap > $OUTPUT_FILE.cksum
lvremove $VIRTUAL_ROOT/snap
Tags:
 
Images (0)
 
Comments (0)
You must login to post a comment.