Re: [OpenIndiana-discuss] vboxsvc and zvolrights
Hi, scenario: blade server with blades running vmware hypervisors, gigabit storage with openindiana zfs pool, 2nd storage (commodity level) as a backup. Is there a script similar to the one u cited on vbox that: 1. Stops vmachine 2. Starts snapshot 3. Restarts vmachine when snapshot completed 4. Starts rsync of snapshot with backup machine Thanks Paolo Il 18/ott/2013 06:45 Jim Klimov jimkli...@cos.ru ha scritto: On 2013-10-17 23:35, Geoff Nordli wrote: I use the built in vbox initiator. Not the highest performing setup, but these are small business services and disk IO isn't the biggest issue we have. I am using it for automated backup system. I virtualize their servers into vbox, pause the VM(s), zfs snapshot, send to a different pool and send another copy offsite. In such case note that the recent versions (circa one year now) of the script support creation of automatic ZFS snapshots of the backend storage after VM stop and before VM start, and at least for file-based VMs (including over NFS) and for local zvols it should be able to detect the list of involved ZFS datasets, as well as you can provide a list of other datasets you know as related (i.e. iSCSI LUN zvols). I did not have a scenario exactly like yours, but it may be possible (either out of the box or after minor scripting) to use the shutdown action to pause and un-pause the VMs and have this action wrap the creation of the snapshots. Certainly (right now) you can use the vbox.sh zfssnap method between your own pause/unpause calls with just one generic command to call from your automation scripts. I am not sure if pause/unpause provide for very good backups, since they would seem like a reset upon recovery (unlike savestate/restore, but at the cost of some more downtime). Feel free to ask for more features, I might get around to implementing them one day... or send patches :) //Jim __**_ OpenIndiana-discuss mailing list OpenIndiana-discuss@**openindiana.orgOpenIndiana-discuss@openindiana.org http://openindiana.org/**mailman/listinfo/openindiana-**discusshttp://openindiana.org/mailman/listinfo/openindiana-discuss ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 2013-10-20 12:50, Paolo Aglialoro wrote: Hi, scenario: blade server with blades running vmware hypervisors, gigabit storage with openindiana zfs pool, 2nd storage (commodity level) as a backup. Is there a script similar to the one u cited on vbox that: 1. Stops vmachine 2. Starts snapshot 3. Restarts vmachine when snapshot completed 4. Starts rsync of snapshot with backup machine I am not sure, did not program for VMWare - but I know there is an API for calling various actions. My colleagues use Veem backup for many data/VM backup scenarios - I can only suggest to look at that... Sorry, got little personal experience with that... //Jim ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On Oct 20, 2013, at 9:36, Jim Klimov jimkli...@cos.ru wrote: On 2013-10-20 12:50, Paolo Aglialoro wrote: Hi, scenario: blade server with blades running vmware hypervisors, gigabit storage with openindiana zfs pool, 2nd storage (commodity level) as a backup. Is there a script similar to the one u cited on vbox that: 1. Stops vmachine 2. Starts snapshot 3. Restarts vmachine when snapshot completed 4. Starts rsync of snapshot with backup machine I am not sure, did not program for VMWare - but I know there is an API for calling various actions. My colleagues use Veem backup for many data/VM backup scenarios - I can only suggest to look at that... Sorry, got little personal experience with that... http://www.vmware.com/support/pubs/sdk_pubs.html There are toolkits provided by VMware both in perl and PowerShell. I think someone also wrote some python tools. -brian ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 2013-10-20 15:36, Jim Klimov wrote: On 2013-10-20 12:50, Paolo Aglialoro wrote: Hi, scenario: blade server with blades running vmware hypervisors, gigabit storage with openindiana zfs pool, 2nd storage (commodity level) as a backup. I am not sure, did not program for VMWare - but I know there is an API for calling various actions. My colleagues use Veem backup for many data/VM backup scenarios - I can only suggest to look at that... Now that I thought a bit more about it, I believe you can use either APIs (i.e. in PERL over HTTP(S)) or SSH CLI on the ESX hosts (AFAIK you can also unlock the smaller-footprint ESXi OS access). One way or another, technically your storage system (OI) can initiate actions on the VMWare host(s) such as pause or shutdown, then snapshot its local datasets involved in the VM storage, unpause/restart the VMs and rsync the snapshot'ed file images (from context, I guess you use files over NFS?) Alternately, for the case of NFS-served images, you can mkdir the $SHAREPATH/.zfs/snapshots/$SNAPNAME over NFS/CIFS to create the ZFS snapshots over network, i.e. from scripts running on the VMWare side. The trick would be to have some database (dynamic queries to VMWare? LDAP catalog?) which would correlate your hosts, VMs and ZFS storage dataset backends, so that you know what to snapshot when. HTH, and good luck :) //Jim ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 13-10-17 09:42 PM, Jim Klimov wrote: On 2013-10-17 23:35, Geoff Nordli wrote: I use the built in vbox initiator. Not the highest performing setup, but these are small business services and disk IO isn't the biggest issue we have. I am using it for automated backup system. I virtualize their servers into vbox, pause the VM(s), zfs snapshot, send to a different pool and send another copy offsite. In such case note that the recent versions (circa one year now) of the script support creation of automatic ZFS snapshots of the backend storage after VM stop and before VM start, and at least for file-based VMs (including over NFS) and for local zvols it should be able to detect the list of involved ZFS datasets, as well as you can provide a list of other datasets you know as related (i.e. iSCSI LUN zvols). I did not have a scenario exactly like yours, but it may be possible (either out of the box or after minor scripting) to use the shutdown action to pause and un-pause the VMs and have this action wrap the creation of the snapshots. Certainly (right now) you can use the vbox.sh zfssnap method between your own pause/unpause calls with just one generic command to call from your automation scripts. I am not sure if pause/unpause provide for very good backups, since they would seem like a reset upon recovery (unlike savestate/restore, but at the cost of some more downtime). Feel free to ask for more features, I might get around to implementing them one day... or send patches :) The vboxmanage pause works great with vbox, because it just pauses all activity and it doesn't drop connections to anything that is going on. It also flushes the disk buffers and it only takes a few seconds for this to happen. With the script I have, it does backups in batches, so it will pause all of the VMs in the batch, then does the snapshot, then resumes all of the VMs, which guarantees that everything is at the exactly same point. Couple feature requests. If we had volumes linked to a controller/port, then if it could automatically create the iscsi target and check to make sure that it is attached to the VM, that would be awesome. Related to that, if you had the option to control flushing. Any production system should not have flushing enabled. http://www.virtualbox.org/manual/ch12.html#idp56076560 To enable flushing for SATA disks, issue the following command: VBoxManage setextradata VM name VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush 0 I don't know if something like this would go in the vboxsvc, but there are three different things that happen with my backups: 1) snapshots 2) replication 3) purging/retention. 1) when I snapshot, it reads a config file, which allows you to have multiple targets to send the snapshot to. I create a touch file in a directory structure that the replication script reads, after successful replication it deletes the touch file. 2) replication looks at the targets that were created when the snapshot happened. I normally run the replication at night. 3) retention cleans up snapshots (when you run a snapshot you set retention policies). my scripts are a spaghetti mess though :) have a great day! Geoff ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 13-10-09 06:48 PM, Jim Klimov wrote: On 2013-10-09 08:18, Geoff Nordli wrote: I was doing an upgrade of vboxsvc on one of my machines and I noticed the zvolrights smf: http://sourceforge.net/p/vboxsvc/code/HEAD/tree/usr/share/doc/vboxsvc/README-zvolrights.txt Are people using that successfully to be able to run VirtualBox VMs under a non-root level user? Right now I use iscsi targets to expose my zvols, but being able to access them directly would be a lot easier to manage. Well, I did run it in testing (but use more portable files or dual-booted raw partitions for production), and I believe Edward Ned Harvey used his (different) script to set rights and he used zvols a lot more, though with a different solution to maintain the access rights. So far nobody reported use of this script/service for their non-root VMs, so I can't say how well it works outside of my greenhouse lab testing. Feel free to be the first reporter :) But Ned's example may prove that generally such usage exists. //Jim Hi Jim. I decided to just go with the iscsi targets for now. Thanks for the vboxsvc, it works great. Geoff ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 2013-10-17 21:11, Geoff Nordli wrote: I decided to just go with the iscsi targets for now. I wonder if they too have implications of access rights (to device nodes). BTW, what do you use as initiator - the VirtualBox itself, or the OS it runs on (and provides a local block device to the vbox)? I think both ways are possible... Thanks for the vboxsvc, it works great. Thanks for the warm words, these are always nice to hear ;) //Jim ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 13-10-17 12:46 PM, Jim Klimov wrote: On 2013-10-17 21:11, Geoff Nordli wrote: I decided to just go with the iscsi targets for now. I wonder if they too have implications of access rights (to device nodes). BTW, what do you use as initiator - the VirtualBox itself, or the OS it runs on (and provides a local block device to the vbox)? I think both ways are possible... I use the built in vbox initiator. Not the highest performing setup, but these are small business services and disk IO isn't the biggest issue we have. I am using it for automated backup system. I virtualize their servers into vbox, pause the VM(s), zfs snapshot, send to a different pool and send another copy offsite. have a great day! Geoff ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 2013-10-17 23:35, Geoff Nordli wrote: I use the built in vbox initiator. Not the highest performing setup, but these are small business services and disk IO isn't the biggest issue we have. I am using it for automated backup system. I virtualize their servers into vbox, pause the VM(s), zfs snapshot, send to a different pool and send another copy offsite. In such case note that the recent versions (circa one year now) of the script support creation of automatic ZFS snapshots of the backend storage after VM stop and before VM start, and at least for file-based VMs (including over NFS) and for local zvols it should be able to detect the list of involved ZFS datasets, as well as you can provide a list of other datasets you know as related (i.e. iSCSI LUN zvols). I did not have a scenario exactly like yours, but it may be possible (either out of the box or after minor scripting) to use the shutdown action to pause and un-pause the VMs and have this action wrap the creation of the snapshots. Certainly (right now) you can use the vbox.sh zfssnap method between your own pause/unpause calls with just one generic command to call from your automation scripts. I am not sure if pause/unpause provide for very good backups, since they would seem like a reset upon recovery (unlike savestate/restore, but at the cost of some more downtime). Feel free to ask for more features, I might get around to implementing them one day... or send patches :) //Jim ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss
Re: [OpenIndiana-discuss] vboxsvc and zvolrights
On 2013-10-09 08:18, Geoff Nordli wrote: I was doing an upgrade of vboxsvc on one of my machines and I noticed the zvolrights smf: http://sourceforge.net/p/vboxsvc/code/HEAD/tree/usr/share/doc/vboxsvc/README-zvolrights.txt Are people using that successfully to be able to run VirtualBox VMs under a non-root level user? Right now I use iscsi targets to expose my zvols, but being able to access them directly would be a lot easier to manage. Well, I did run it in testing (but use more portable files or dual-booted raw partitions for production), and I believe Edward Ned Harvey used his (different) script to set rights and he used zvols a lot more, though with a different solution to maintain the access rights. So far nobody reported use of this script/service for their non-root VMs, so I can't say how well it works outside of my greenhouse lab testing. Feel free to be the first reporter :) But Ned's example may prove that generally such usage exists. //Jim ___ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss