-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add notes running vmware simulator #532
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,98 @@ | ||||||||||||||||||||||||||||||||||||||||||
# installing vmware simulator | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
cd ~/go/ | ||||||||||||||||||||||||||||||||||||||||||
git clone https://github.com/kbrock/govmomi | ||||||||||||||||||||||||||||||||||||||||||
cd govmomi | ||||||||||||||||||||||||||||||||||||||||||
git remote add upstream https://github.com/vmware/govmomi | ||||||||||||||||||||||||||||||||||||||||||
git checkout miq_counters_kb | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+5
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we be linking a personal fork/branch in the guides? Is this a missing feature on upstream? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed. we can now use master now that this is all merged |
||||||||||||||||||||||||||||||||||||||||||
# client | ||||||||||||||||||||||||||||||||||||||||||
pushd govc ; make clean && make && make install ; popd | ||||||||||||||||||||||||||||||||||||||||||
# server | ||||||||||||||||||||||||||||||||||||||||||
pushd vcsim ; make clean && make && make install ; popd | ||||||||||||||||||||||||||||||||||||||||||
ln -s ~/go/bin/vcsim ~/bin # or /usr/local/bin | ||||||||||||||||||||||||||||||||||||||||||
ln -s ~/go/bin/govc ~/bin # or /usr/local/bin | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personal preference, so not required for merge, but this format always messes with my head cause it makes me think the entire bin dir is going to be pointing to the target. I like it more explicit...something like:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it make more sense to either change your |
||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
# creating simulator provider | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
echo "127.0.0.1 vc91" > /etc/hosts | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary? You can just use (I know you were trying to avoid hostname collisions with >1 vcsim but that's also more advanced than the typical UI dev will need) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in the end of the day, vc91 (even if in |
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
# run temporary simulator | ||||||||||||||||||||||||||||||||||||||||||
vcsim -username root -password vmware -app 2 -cluster 2 -dc 1 -ds 2 -folder 2 \ | ||||||||||||||||||||||||||||||||||||||||||
-host 2 -nsx 2 -pg 2 -pg-nsx 2 -pod 2 -pool 1 -standalone-host 2 -vm 2 \ | ||||||||||||||||||||||||||||||||||||||||||
-l vc91:9191 & | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why run in the backround? Seems much simpler to leave it running in the foreground and let people ctrl-c to exit than telling them to do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's run in the background so it can be dumped to a directory in the next step. Then it can be reused in future runs of the simulator. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've made a few comments around this to beef up the comments/titles, which would make that clearer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right but that's only necessary so that you can hack in historical metrics, for normal vcsim running it isn't needed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is all moot now. vcsim out of the box properly creates those entries
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not required, but I tend to find guides more readable if they are one param per line (at least for very long sets of options). It also allows easier modification for things like removing lines.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
export GOVC_URL=https://root:vmware@vc91:9191/sdk GOVC_INSECURE=true | ||||||||||||||||||||||||||||||||||||||||||
govc object.save -d my-vcenter | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+27
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
# stop stop temporary simulator | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
kill %1 # or fg ; control-c | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
# adding historicals | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thinking this should be another level deep under the "Running a simulator"
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```xml | ||||||||||||||||||||||||||||||||||||||||||
<!-- | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
edit my-vcenter/0009-PerformanceManager-PerfMgr.xml | ||||||||||||||||||||||||||||||||||||||||||
find nistoricalInterval | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
--> | ||||||||||||||||||||||||||||||||||||||||||
<propSet> | ||||||||||||||||||||||||||||||||||||||||||
<name>historicalInterval</name> | ||||||||||||||||||||||||||||||||||||||||||
<val xmlns:XMLSchema-instance="http://www.w3.org/2001/XMLSchema-instance" XMLSchema-instance:type="ArrayOfPerfInterval"> | ||||||||||||||||||||||||||||||||||||||||||
<PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
<key>1</key>, | ||||||||||||||||||||||||||||||||||||||||||
<samplingPeriod>300</samplingPeriod> | ||||||||||||||||||||||||||||||||||||||||||
<length>86400</length> | ||||||||||||||||||||||||||||||||||||||||||
<name>Past Day</name> | ||||||||||||||||||||||||||||||||||||||||||
<level>1</level> | ||||||||||||||||||||||||||||||||||||||||||
<enabled>true</enabled> | ||||||||||||||||||||||||||||||||||||||||||
</PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
<PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
<key>2</key> | ||||||||||||||||||||||||||||||||||||||||||
<samplingPeriod>1800</samplingPeriod> | ||||||||||||||||||||||||||||||||||||||||||
<length>604800</length> | ||||||||||||||||||||||||||||||||||||||||||
<name>Past Week</name> | ||||||||||||||||||||||||||||||||||||||||||
<level>1</level> | ||||||||||||||||||||||||||||||||||||||||||
<enabled>true</enabled> | ||||||||||||||||||||||||||||||||||||||||||
</PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
<PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
<key>3</key> | ||||||||||||||||||||||||||||||||||||||||||
<samplingPeriod>7200</samplingPeriod> | ||||||||||||||||||||||||||||||||||||||||||
<length>2592000</length> | ||||||||||||||||||||||||||||||||||||||||||
<name>Past Month</name> | ||||||||||||||||||||||||||||||||||||||||||
<level>1</level> | ||||||||||||||||||||||||||||||||||||||||||
<enabled>true</enabled> | ||||||||||||||||||||||||||||||||||||||||||
</PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
<PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
<key>4</key> | ||||||||||||||||||||||||||||||||||||||||||
<samplingPeriod>86400</samplingPeriod> | ||||||||||||||||||||||||||||||||||||||||||
<length>31536000</length> | ||||||||||||||||||||||||||||||||||||||||||
<name>Past Year</name> | ||||||||||||||||||||||||||||||||||||||||||
<level>1</level> | ||||||||||||||||||||||||||||||||||||||||||
<enabled>true</enabled> | ||||||||||||||||||||||||||||||||||||||||||
</PerfInterval> | ||||||||||||||||||||||||||||||||||||||||||
</val> | ||||||||||||||||||||||||||||||||||||||||||
</propSet> | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
# better editing of historicals | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what this title means - feels like this is part of the previous section, so thinking it should just be removed. The TODO also make it clear of the intentions.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
TODO: please figure out a way to add historicals without editing the files. | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
That way we can just use the vmware simulator container | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
govc object.collect -s -dump PerformanceManager:PerfMgr historicalInterval | ||||||||||||||||||||||||||||||||||||||||||
govc metric.interval.info | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
govc metric.interval.change | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
# this one has a default (not sure if related or not) | ||||||||||||||||||||||||||||||||||||||||||
govc object.collect -s -dump PerformanceManager:PerfMgr perfCounter | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
# run | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
# I dumped to a local directory to add historical capture support | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's try to make the doc less of a brain dump and more of a guide to others. I'm not sure what this is supposed to me as an outside reader. |
||||||||||||||||||||||||||||||||||||||||||
vcsim -username root -password vmware -load my-vcenter -l vc91:9191 | ||||||||||||||||||||||||||||||||||||||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need an introduction of some sort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the title case change at the end too.