The Collection

A collection of useful information.

Filtering by Tag: line

App-V: Scripting Multi-Line Batch Files.

Adding a script to an App-V package is all fine and good (even though it doesn't support anything beyond batch file era scripting languages) but if your script consists of multiple lines and you are adding it after the fact (especially for testing purposes) you may very well find it likes to butcher the script, condensing it all down to one long line.

The solution is very simple.

\r\n

Put that at the end of each line. It is the equivalent of a carriage return (enter...ish), and a new-line.

Is this a bit duct-tapey? Why yes, yes it is. But I suppose pointlessly "enhancing" the UI is a lot more important than making a sophisticated product, so get used to duct taping App-V together.

XenServer: Add/Remove Network Interface.

Remove:

  • xe vm-list
  • Copy the uuid for the VM you want to remove the interface.
  • xe vif-list vm-uuid=<vm-uuid>
  • Copy the uuid for the vif you want to destroy.
  • xe vif-destroy uuid=<vif-uuid>
Note you will need to know which device you want to remove if there is more than one interface attached to the VM.

Add:

  • xe list-network (you can add "name-label=<label>" if you know the networks name, in my case Bond 0+1)
  • Copy the networks uuid.
  • xe vif-create network-uuid=<network-uuid> vm-uuid=<vm-uuid> device=#

See above for how to find the VM's uuid, for device replace # with the device number, you can find a list of supported VIF devices by typing "xe vm-param-list uuid=<vm-uuid> | more" and looking for allowed-VIF-devices, if theres no interface currently on the VM you will most likely use 0.

As for why you would want to do all of this...well, sometimes you either don't have access to XenCenter, or it decides it doesn't want to play, it's always a good idea to bring your own ball.

Service Manager 7.11: Command Line Options

Don't ask me why I'm posting this here, Service Manager is one of the worst written things I've ever used, and I use App-V. No surprise it's written in Java. The developers need to be drawn and quartered.

-silent

-options-record <answer file>

-options <answer file>

For a silent default install just use -silent, for one that uses the answer file, just do -option AND -silent.

Ugh.