2015년 6월 18일 목요일

How to figure out VM Machine and VHD UUID using NFS.

List VHD uuid and its associated VM name and SR in XenServer


NFS share which in return is mounted as external storage in my XenServer.
Inside the NFS exported directory it created a directory that looked like a random generated set of characters:
Storage UUID: 4b929778-2e8f-7f73-4e52-e6804e7951e3
In windows, Storage UUID is the folder name. 

There are lots of vm images in this folder.
Now if you look at the UUID inside XenCenter, it does not resemble which one of the VHD images is linked to which UUID. 
xe vdi-list  
: to find which VM is linked to vm image files. 

uuid ( RO)                : 6d644eb5-faaf-4cc5-bddd-7e939c43d7e5  : VHD Filename in the folder.
          name-label ( RW): VM Name
    name-description ( RW): VM Name Description
             sr-uuid ( RO): 4b929778-2e8f-7f73-4e52-e6804e7951e3 : Storage UUID
        virtual-size ( RO): 107374182400
            sharable ( RO): false
           read-only ( RO): false 

So, when you need to restore from the backup, you need to find uuid and map vhd file to right VM. 

2015년 6월 2일 화요일


How to block Country IP arranges in Linux


Go to the link
http://dev.maxmind.com/geoip/legacy/geolite/
you are able to download IP Range database.

Download : GeoLite Country---> Download CSV/zip
http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip

Upload the csv file.



# iptables -L | grep range | wc -L
# service iptables save

That's all for today.