def removeNtpd(vm, prompt=Prompt, ntpPackage='ntp'):
 log('* Removing ntpd')
 vm.sendline(('sudo -n apt-get -qy remove ' + ntpPackage))
 vm.expect(prompt)
 vm.sendline('sudo -n pkill ntpd')
 vm.expect(prompt)
 log('* Getting seconds since epoch from this server')
 seconds = int(run('date +%s'))
 log('* Setting VM clock')
 vm.sendline(('sudo -n date -s @%d' % seconds))

def removeNtpd ( vm , prompt = Prompt , ntpPackage = 'ntp' ) : log ( '* Removing ntpd' ) vm . sendline ( ( 'sudo -n apt-get -qy remove ' + ntpPackage ) ) vm . expect ( prompt ) vm . sendline ( 'sudo -n pkill ntpd' ) vm . expect ( prompt ) log ( '* Getting seconds since epoch from this server' ) seconds = int ( run ( 'date +%s' ) ) log ( '* Setting VM clock' ) vm . sendline ( ( 'sudo -n date -s @%d' % seconds ) )
remove ntpd and set clock immediately .