0

I was trying to create a snapshot of a virtual machine using powershell (Creating snapshot of VM in Azure) on Azure. For taking the snapshot of a vm I have to take backup of both OS disk and Data disk. When I checked the disk information from Azure portal it shows only OS disk as 30GB and there's no information about data disk. The powershell script also fails to take backup of data disk. I have created an A1 type of Linux machine which has data disk of 70GB. I connected to VM using ssh and executed df -h which is showing

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        29G  2.4G   25G   9% /
tmpfs           841M     0  841M   0% /dev/shm
/dev/sdb1        69G  180M   66G   1% /mnt/resource

What has to be done in order to make this /dev/sdb1 listed or detected through cmdlet? When I attach a data disk and run the snapshot script it's taking backup of both of os disk and the newly created data-disk. Also, it's shown in the Azure vm disks list.

Please give me some information regarding this.

Community
  • 1
  • 1
devd
  • 370
  • 10
  • 28
  • This should be posted on ServerFault, not StackOverflow. – David Makogon Aug 14 '15 at 12:45
  • Can you please edit your question to clarify what you're attempting to do? That is, are you trying to create a reusable image, or just take a moment-in-time snapshot? A VM snapshot is not the same as preparing a disk image for reuse. – David Makogon Aug 14 '15 at 12:48
  • Yes, I want to take a VM snapshot. I did some research and found what I am trying to do with the current snapshot PS script isn't possible after reading this (http://blogs.msdn.com/b/mast/archive/2013/12/07/understanding-the-temporary-drive-on-windows-azure-virtual-machines.aspx) as our data is going to temp disk. Not sure if there's a way to save the temp disk to a blob or something. – devd Aug 14 '15 at 12:53
  • 1
    Right - temp disk isn't in a VM. It's ephemeral, in-chassis. You'd just need to upload your data to blobs. How you do that is really app-specific. – David Makogon Aug 14 '15 at 13:49
  • How about adding a attaching [VHD](https://azure.microsoft.com/en-in/documentation/articles/storage-windows-attach-disk/) instead? – Hari Hara Chandan Aug 14 '15 at 15:45
  • @HariHaraChandan we don't want to do that. – devd Aug 15 '15 at 02:01

1 Answers1

1

Use Azure data disks to store your application data. As the name suggests, the temporary disk is just that - temporary. Avoid storing application data on the temporary disk. You can attach a data disk to your VM and copy data from your temporary disk to the data disk. Then, take snapshot of the data disk or use Azure Backup to keep backups of your VM and disks.

Azure Backup (https://azure.microsoft.com/en-us/documentation/articles/backup-azure-vms-introduction/)

Creating Snapshot of a Blob (https://msdn.microsoft.com/en-us/library/azure/hh488361.aspx)