The Blog

Export VM command line XenServer 6

Posted on

This tutorial walks you through how to export a VM via command line in XenServer6, this is helpful if you need to make a backup of a VM, or move to another pool. Let’s get started!

login, and su to root

from here we need to make a location to mount a NFS Share

mount the NFS share where you will export the VM to

from here issue the vm-list command

in this example, we are exporting the VM named “DNS3”

from the XenServer console, you should notice that the status has changed to “busy” or yellow

This will take some time, and it’s relative to your Storage, and Network. Usually the smaller the VMs, the better in this case.

you should see the following once completed:

 

You have successfully Exported your VM to .xva format.

You can additionally use this Script:

#!/bin/sh
# Created By Andrew Zwieg 2/23/2014
# Version 2.1

# Prompt for Server Name
echo Enter Server Name as it appears in XenServer, and hit Enter
read SERVERNAME

# export the VM to file
echo Enter the Location to Export VM to “ex: /mnt/Xen”
read MOUNT

# Export the VM to File
xe vm-export vm=$SERVERNAME filename=$MOUNT/$SERVERNAME.xva

 

That’s it!

Hosted Linux Servers at www.zwiegnet.com/go

Posted in Linux, XenServer Leave a comment

Citrix XenServer backup without downtime.

Posted on

I am working with Citrix XenServer from many years and managing all XenServers using XenCenter installed on a standalone windows machine. We regularly takes backup of VMs manually till today, I was taking backup after shutting down the VMs. Most of VM owner getting disappointed due to server down for a long time. While searching with the google I found a better way to back up VMs without shutdown them. It means we can take running vm backups and not downtime occurred.

Read More

Posted in Linux, Virtualization, XenServer Leave a comment

How to mount Amazon’s S3

Posted on

S3FS is FUSE (File System in User Space) based solution to mount an Amazon S3 buckets, We can use system commands with this drive just like as another Hard Disk in system. On s3fs mounted files systems we can simply use cp, mv and ls the basic Unix commands similar to run on locally attached disks.

If you like to access S3 buckets without mounting on system, use s3cmd command line utility to manage s3 buckets. s3cmd is also provides faster speed for data upload and download rather than s3fs. To work with s3cmd use next articles to install s3cmd in Linux systems and Windows systems.
Read More

Posted in Linux Leave a comment

Symfony2 Doctrin2 encode password using prePersist Event Listener

Posted on

Service needs to look like this

services:
    user.listener:
        class: AppBundle\EventListener\UserListener
        arguments: [ "@security.password_encoder" ]
        tags: [ { name: doctrine.event_listener, event: prePersist } ]

Listener should look like that

// AppBundle\EventListener\UserListener.php

namespace AppBundle\EventListener;

use Doctrine\ORM\Event\LifecycleEventArgs;
use AppBundle\Entity\User;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;

class UserListener
{
    protected $container;

    public function __construct(UserPasswordEncoderInterface $encoder)
    {
        $this->encoder = $encoder;
    }

    public function prePersist(LifecycleEventArgs $args)
    {
        $entity = $args->getEntity();

        $encodedPassword = $this->encoder->encodePassword($entity, $entity->getPassword());
        $entity->setPassword($encodedPassword);
    }
}
Posted in Symfony2 Leave a comment
Next Page »