Is it possible to write a script that takes automated snapshots of Oracle Virtual Box without shutting the VM.
The host operating system is Windows 7.
Try "VBoxManage.exe snapshot MyVM take MySnapshot".
I created a simple script to automatically snapshot my virtual machines.
GitHub: https://github.com/Meru3m/virtualbox-snapshotter
Related
I've spent ages going around in circles on this so I'm hoping someone will point me in the right direction.
I'm creating a SQL Server lab running under Hyper-V on an Azure Windows Server 2016 Datacenter Gen 1 virtual machine. So far so good as I've got an AG running on two replica VMs, however I want to expand the lab to inlude a Windows Failover Cluster so I need to be able to create a shared disk and that's where I'm stuck. Whenever I try and add a shared disk in the Hyper-V Manager (or PowerShell) I get the following error:
The storage where the virtual hard disk is located does not support virtual hard disk sharing
It can't be the type of Azure disk I'm using as I get the same problem trying to create the Hyper-V shared disk on a Standard HDD, Standard SSD and Premium SSD with sharing enabled so what else do I need to do?
Regards,
Gordon.
You can try below possible solutions:
Please check if you have enabled the Sharing while creating the managed disk in the portal. If not then please enable it while deploying and add the max shares as per your requirement .
Reference:
Share an Azure managed disk across VMs - Azure Virtual Machines | Microsoft Docs
Enable shared disks for Azure managed disks - Azure Virtual Machines | Microsoft Docs
Please try to attach the VHDx file to IDE controller as its a Gen 1 virtual machine because only the SCSI controller has the option "virtual hard disk sharing" and Gen 1 VM only can boot from IDE.
Note: Please do not use this feature without CSV or Scale-Out File Server with SMB 3.0 on file-based storage .
Reference :
the storage where the virtual hard disk is located does not support virtual disk sharing (microsoft.com)
Thank you Prabhu Dutta Mohanty for providing the reference link .
Note: If the issue is still not resolved , Please create a support request to Azure support from portal (Support+Help) for assistance.
I have just installed VMware ESXi 7 as a virtual machine just for learning. I have seen it is feasible to create nested vms using VMware Player Workstation plus Intel chipset: my testing purpose is to create a virtual machine inside a virtualized ESXi server.
Actually I cannot install any vm, probably due to the fact I have not created any datastore yet.
In order to create a datastore I thought to edit the partition of the free space avalaible (for a linux vm 20GB are enough), but when I try to edit partition I get such summary in which I cannot configure anything at all (see pics).
Have you any suggestion?
When you install SO it's not a good practice to add it as a datastore. Please turn off you VM and add another disk to ESXI. After you boot up server again you will be able to create a new datastore.
I'm using Genymotion with Oracle VirtualBox, however i do have 250 GB SSD and i'm facing an issue with ( Snapshots ) I googled & searched here, I couldn't find any possible way to disable Auto snap-shots, as i don't need it.
Thanks
When you deploy a new Genymotion virtual device, a snapshot called factory-backup is automatically created so that paid users can reset the device to the factory state via the Launcher GUI. If you don't want this snapshot, then just use VirtualBox Manager directly to delete it once the device is deployed. From the Manager interface, with the VM in question selected, click on Snapshots in the upper right corner, then select factory-backup and hit the delete button. As far as I can tell, there is no provision for disabling this initial snapshot creation via the Genymotion Launcher.
In my experiences, Genymotion does not create further snapshots during the lifetime of a virtual device, only upon initial deployment. But if you are experiencing this, then I recommend again using the VirtualBox Manager to set the Snapshot Folder to a non-existent directory once the device is deployed. This can be done via Settings->General->Advanced for each device you wish to disable snapshotting.
When building an OVF, you can specify a tag for VirtualSystemCollection that allows you to have multiple VMs to share the same base disk image, but any changes that the individual machines make are Copy-On-Write into a private disk area for each specific VM.
When you try to deploy images setup this way to EXSi, it complains Unsupported element 'VirtualSystemCollection'. It would appear that you need the commercial vCenter or vApp servers from VMWare to utilize this feature. (From what I've been able to grok so far)
Is there a way to do this through free software (Free like ESXi, or opensource)
The ultimate goal is that I want to have a single disk image that's used as a base - and to bring up a cluster of VMs that are then individually configured so that for a VM with a 500 meg disk, I only need '500M + (num_vms * delta_per_vm)' rather than '500M * num_vms'
An ESXi connected to a vCenter should support this via vApps but since you wanted a non-commercial solution, the closest things is to use VirtualBox.
The open source VirtualBox has multi-attach support to achieve this with different disk formats and it works very well. It also has special qcow, qemu copy on write disk support. Basically, you create a master disk and attach to multiple VMs. (Huge disk space saving.)
It can also happily import multiple VMs from a single OVA file with VirtualSystemCollection but unfortunately, it still requires manual intervention to tell VirtualBox that disks are shared after importing all the VMs. (Well, it defeats the appliance deployement in the first place...)
After creating master disk (or after deployment), attaching to multiple VMs can be done with GUI or with the following command:
VBoxManage storageattach "vm-name" --storagectl "sata1" --port 0 --device 0 --type hdd --medium base.vdi --mtype multiattach
For more information, see http://www.electricmonk.nl/log/2011/09/24/multiple-virtualbox-vms-using-one-base-image-copy-on-write/ and http://virtbjorn.blogspot.com.tr/2012/12/virtualbox-multi-attach-disk.html
If you really want to use VMWare ESXi, you can use data deduplication to achieve the same task on block level. (which is generally used with cloud hosting companies). You can see the deduplication success rates with open source tools here: http://opendedup.org/deduprates
In VMware products, a multi-tier appliance (VirtualSystemCollection) is called a vApp. In vSphere, vApps live in vCenter and not ESX. So yes, you need vCenter to import a VirtualSystemCollection.
If you are using Workstation, you can also try the free vApprun tool:
https://labs.vmware.com/flings/vapprun
Here is what I did successfully to have such OVF images imported into my free ESXi server.
In the OVF file a XML element VirtualSystemCollection defines the vApp.
You can manually edit the OVF file and remove or comment this part as shown bellow. This will allow to import the VM into ESXi without vCenter once the OVF image is converted using VMware OVF Tool.
<!-- ovf:VirtualSystemCollection ovf:id="dummy-id">
<ovf:Info>A collection of virtual machines</ovf:Info>
<ovf:Name>dummy-name</ovf:Name>
<ovf:StartupSection>
<ovf:Info>VApp startup section</ovf:Info>
<ovf:Item ovf:id="dummy-id" ovf:order="0" ovf:startAction="powerOn" ovf:startDelay="0" ovf:stopAction="powerOff" ovf:stopDelay="0"/>
</ovf:StartupSection-->
Keep the remaining part intact and remove the following line at the end.
</ovf:VirtualSystemCollection>
Also make sure you have the last ESXi Embedded Host Client installed to avoid other bug related problems during import.
https://labs.vmware.com/flings/esxi-embedded-host-client
Converting OVF to VMX can be done using VMWare OVF Tool. In command line it looks simply as following:
ovftool <path_to_source>/<myvm>.ovf <path_to_target>/<myvm>.vmx
Microsoft provides a way of mounting a read-only snapshot as a volume using their vshadow program. However, it does not provide a way to unmount the snapshot (I wonder what would happen if I deleted the snapshot?). Going through the documentation on MSDN I found UnexposeSnapshot Method, and added the ability to use it in the vshadow. However, it says that it's only supported for Vista and Server 2008 machines. Is there anyway around this? The XP configuration for vshadow won't compile. It would be really bizarre if Microsoft wrote a way to mount volume shadow copies in XP and server 2003, yet didn't provide a way to unmount them.
Any ideas?
Use Windows' built-in mount management utility mountvol.exe.
On API level, you should be able to use DeleteVolumeMountPoint.
There is a command line tool inside the Windows Vista platform sdk that can be used to create batch files that operate on snapshots. I don't know if you mean that one, but it definitively works this way: You invoke it and it will create the snapshot. Then it will launch another process that you specify. Then that process (e.g. another batch file or the same batch file) will run. When it ends, the command line tool will remove and delete the snapshot.