- Use vm-list to determine the name of the vm you want to start
[root my-xen-server-box ~]# xe vm-list uuid ( RO) : 60c1607b-1e51-bfe7-088e-a4a868b80f7f name-label ( RW): docker power-state ( RO): running uuid ( RO) : 96b5c2e3-5c76-a354-74ef-c324069a7c91 name-label ( RW): jenkins power-state ( RO): running uuid ( RO) : e0bac120-5676-50fc-7989-c11f5cf1537d name-label ( RW): puppet_host1 power-state ( RO): running uuid ( RO) : cc502056-ee19-1c97-a90c-a6dfe766db67 name-label ( RW): devops power-state ( RO): halted uuid ( RO) : c4555386-c498-4434-8926-3a42e607aabc name-label ( RW): networkadmin power-state ( RO): running uuid ( RO) : f312e45d-506e-a626-5b28-ba9a179f5524 name-label ( RW): webserver power-state ( RO): halted uuid ( RO) : dc50cbba-ec9f-4fba-8135-d104a4dc0c61 name-label ( RW): Control domain on host: xenserver power-state ( RO): running uuid ( RO) : e4177291-c3e8-8f6c-93ad-a127fe4e9b62 name-label ( RW): puppet_host2 power-state ( RO): running uuid ( RO) : dbe265c4-a19d-8211-eb57-161359509a2c name-label ( RW): puppet_master power-state ( RO): running
- Now use the name-label to start the VM
[root xenserver ~]# xe vm-start vm=webserver [root xenserver ~]#
Xenserver list vms
[root my-xen-server-box ~]# xe vm-list uuid ( RO) : 60c1607b-1e51-bfe7-088e-a4a868b80f7f name-label ( RW): docker power-state ( RO): running uuid ( RO) : 96b5c2e3-5c76-a354-74ef-c324069a7c91 name-label ( RW): jenkins power-state ( RO): running ...
Connect to a xen vm from xenconsole
I’m having issues ssh’ing into a XenServer VM. Therefore, I want to connect via CMD line to control a xen vm.
-
ssh to my-xen-server-box
ssh my-xen-server-box
-
List your VMs & take note of the uuid’s
[root my-xen-server-box ~]# xe vm-list uuid ( RO) : 60c1607b-1e51-bfe7-088e-a4a868b80f7f name-label ( RW): docker power-state ( RO): running uuid ( RO) : 96b5c2e3-5c76-a354-74ef-c324069a7c91 name-label ( RW): jenkins power-state ( RO): running uuid ( RO) : e0bac120-5676-50fc-7989-c11f5cf1537d name-label ( RW): puppet_host1 power-state ( RO): running uuid ( RO) : cc502056-ee19-1c97-a90c-a6dfe766db67 name-label ( RW): devops power-state ( RO): halted uuid ( RO) : c4555386-c498-4434-8926-3a42e607aabc name-label ( RW): networkadmin power-state ( RO): running uuid ( RO) : f312e45d-506e-a626-5b28-ba9a179f5524 name-label ( RW): webserver power-state ( RO): halted uuid ( RO) : dc50cbba-ec9f-4fba-8135-d104a4dc0c61 name-label ( RW): Control domain on host: my-xen-server-box power-state ( RO): running uuid ( RO) : e4177291-c3e8-8f6c-93ad-a127fe4e9b62 name-label ( RW): puppet_host2 power-state ( RO): running uuid ( RO) : dbe265c4-a19d-8211-eb57-161359509a2c name-label ( RW): puppet_master power-state ( RO): running
-
List your domains. Note the uuid column.
[root my-xen-server-box ~]# list_domains id | uuid | state 0 | dc50cbba-ec9f-4fba-8135-d104a4dc0c61 | R 2 | 60c1607b-1e51-bfe7-088e-a4a868b80f7f | B 4 | e0bac120-5676-50fc-7989-c11f5cf1537d | B 5 | e4177291-c3e8-8f6c-93ad-a127fe4e9b62 | B 6 | dbe265c4-a19d-8211-eb57-161359509a2c | B 7 | 96b5c2e3-5c76-a354-74ef-c324069a7c91 | B 8 | c4555386-c498-4434-8926-3a42e607aabc | B
- Look in the uuid column for your vm’s uuid. Take note of the id column value to the left
-
Connect to this VM via xenconsole
[root my-xen-server-box ~]# /usr/lib/xen/bin/xenconsole 4 Ubuntu 14.04.1 LTS puppet-host1 hvc0 puppet-host1 login: username Password: Last login: Sun Jan 18 11:24:28 PST 2015 on hvc0 Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-44-generic x86_64) * Documentation: https://help.ubuntu.com/ System information as of Tue Jan 27 11:10:39 PST 2015 0 packages can be updated. 0 updates are security updates.
Convert flac to m4a
Since iTunes doesn’t support flac (Apple is just as proprietary as Micro$oft), I needed to convert a large number of flac files to m4a.
1) Download and setup ffmpeg . I dropped the 3 files in /usr/local/bin
2)
for i in `find . -type f -name "*.flac"`; do echo $i; ffmpeg -i "$i" -acodec alac "$i.m4a"; done;
3) Drop the files in your iTunes directory under iTunes/Automatically\ Add\ to\ iTunes.localized/
git logging
git log --pretty=oneline
git log --pretty=format:"%h - %cd - %an - %s"
git log --pretty=format:"%h - %cd - %an - %s" --graph
git checkout branch
-
Clone repo
git clone git@gitlab.sandlininc.com:product/component.git
-
List Branches
git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/add_javadocs remotes/origin/implementation-1.0.7 remotes/origin/implementation-1.0.8 remotes/origin/implementation-1.0.x remotes/origin/implementation-2.0 remotes/origin/implementation-2.0.0 remotes/origin/master remotes/origin/product-3.5 remotes/origin/product-4.0 remotes/origin/trunk
- Switch to branch
git checkout -b product-3.5 Switched to a new branch 'product-3.5'
push ssh key to server
cat ~/.ssh/id_rsa.pub | ssh user@server 'cat >> .ssh/authorized_keys'
List tags in GIT
List tags in repo
box:product user$ git tag product-0.3 product-0.4 ... product-1.7 product-1.8
With a little more detail:
box:product user$ git tag -l -n1 product-0.3 [maven-release-plugin] copy for tag product-0.3 product-0.4 [maven-release-plugin] copy for tag product-0.4 ... product-1.7 [maven-release-plugin] copy for tag product-1.7 product-1.8 [maven-release-plugin] copy for tag product-1.8
With more detail:
box:product user$ for t in `git tag -l`; do git cat-file -p `git rev-parse $t`; done object 965d40c9c8091c73871761034b78135793368fa0 type commit tag product-0.3 tagger company <devops@company.com> Mon Oct 7 11:57:00 2013 -0700 [maven-release-plugin] copy for tag product-0.3 object bff67daf9605abd87adb1122ea4e9081172ab99e type commit tag product-0.4 tagger company <devops@company.com> Mon Oct 7 12:26:45 2013 -0700 ... [maven-release-plugin] copy for tag product-1.7 object 6a9cbd9107c1ea18a9b9b540b19c93a57f0b515d type commit tag product-1.8 tagger company <devops@company.com> Tue Dec 3 11:19:43 2013 -0800
Delete tag in git
Delete a tag
box:product user$ git tag -d product-1.8 Deleted tag 'product-1.8' (was 2c41c34) box:product user$ git push origin :refs/tags/product-1.8 To git@gitlab.companycorp.com:product2/uikit.git - [deleted] product-1.8
Changing a remote’s URL
git remote -v # View existing remotes # origin https://github.com/user/repo.git (fetch) # origin https://github.com/user/repo.git (push) git remote set-url origin https://github.com/user/repo2.git # Change the 'origin' remote's URL git remote -v # Verify new remote URL # origin https://github.com/user/repo2.git (fetch) # origin https://github.com/user/repo2.git (push)