Closed timurb closed 5 years ago
Is there a way to check if vmotion is enabled with the exicli? IMHO we should refuse to build on an ESXi with it enabled.
No idea, I'm just starting to learn the VMWare and its internal stuff. Probably not as it's configured for the whole vSphere cluster, not specific node. But if you decide to drop the build instantly please make that configurable - for us there's no option at the moment of running dedicated ESX host just for building the images. We are willing to accept the risk of failing the build (and it can be lowered or even eliminated by reducing DRS aggressiveness) just make it more explicit.
You can always run a nested ESXi on vSphere.
Does vicfg-advcfg --list
list anything with motion?
What is the output of vim-cmd hostsvc/vmotion/netconfig_get
? It should probably tell if vMotion is enabled. (See Configuring a VMkernel port and enable vMotion via command line
I don't understand the output of the second command -- just see that there are some references to VMotion there. And the first command didn't work for me. Here is the output.
~ # vmware -vl
VMware ESXi 5.5.0 build-4345813
VMware ESXi 5.5.0 Update 3
~ # vicfg-advcfg --list
-sh: vicfg-advcfg: not found
~ # vim-cmd hostsvc/vmotion/netconfig_get
(vim.host.VMotionSystem.NetConfig) {
dynamicType = <unset>,
candidateVnic = (vim.host.VirtualNic) [
(vim.host.VirtualNic) {
dynamicType = <unset>,
device = "vmk0",
key = "VMotionConfig.vmotion.key-vim.host.VirtualNic-vmk0",
portgroup = "Management Network",
spec = (vim.host.VirtualNic.Specification) {
dynamicType = <unset>,
ip = (vim.host.IpConfig) {
dynamicType = <unset>,
dhcp = false,
ipAddress = "10.XX.XX.XX",
subnetMask = "255.255.252.0",
ipV6Config = (vim.host.IpConfig.IpV6AddressConfiguration) null,
},
mac = "XX:XX:XX:XX:XX:XX",
distributedVirtualPort = (vim.dvs.PortConnection) null,
portgroup = "Management Network",
mtu = 1500,
tsoEnabled = true,
netStackInstanceKey = "defaultTcpipStack",
},
},
(vim.host.VirtualNic) {
dynamicType = <unset>,
device = "vmk1",
key = "VMotionConfig.vmotion.key-vim.host.VirtualNic-vmk1",
portgroup = "",
spec = (vim.host.VirtualNic.Specification) {
dynamicType = <unset>,
ip = (vim.host.IpConfig) {
dynamicType = <unset>,
dhcp = false,
ipAddress = "10.XX.XX.YY",
subnetMask = "255.255.255.0",
ipV6Config = (vim.host.IpConfig.IpV6AddressConfiguration) null,
},
mac = "YY:YY:YY:YY:YY:YY",
distributedVirtualPort = (vim.dvs.PortConnection) {
dynamicType = <unset>,
switchUuid = "XX XX XX XX XX XX XX XX-XX XX XX XX XX XX XX XX",
portgroupKey = "dvportgroup-27",
portKey = "130",
connectionCookie = XXXXXXXXXXXX,
},
portgroup = <unset>,
mtu = 9000,
tsoEnabled = true,
netStackInstanceKey = "defaultTcpipStack",
},
}
],
selectedVnic = <vim.host.VirtualNic:VMotionConfig.vmotion.key-vim.host.VirtualNic-vmk1>,
}
Don't really remember but maybe you have to first run esxcli
to enter the cli and then vicfg-advcfg --list
.
I think I posted a comment here yesterday but it seems to have disappeared.
vicfg-advcfg
is a command from ESX3.5/4.0 and I'm running ESX5.5 and there is different command for that. I'll post its output next week.
Here is output of the command relevant to 5.5:
~ # esxcli system settings advanced list | egrep -i -A9 '^\s*Path:.*motion'
Path: /Migrate/VMotionStreamHelpers
Type: integer
Int Value: 2
Default Int Value: 2
Min Value: 1
Max Value: 32
String Value:
Default String Value:
Valid Characters:
Description: Number of helpers to allocate for VMotion streams
--
Path: /Migrate/VMotionStreamDisable
Type: integer
Int Value: 0
Default Int Value: 0
Min Value: 0
Max Value: 1
String Value:
Default String Value:
Valid Characters:
Description: Pretend to not support streams
--
Path: /Migrate/VMotionLatencySensitivity
Type: integer
Int Value: 1
Default Int Value: 1
Min Value: 0
Max Value: 1
String Value:
Default String Value:
Valid Characters:
Description: Make vMotion helper worlds latency sensitive, avoid transmit delays.
--
Path: /Migrate/VMotionResolveSwapType
Type: integer
Int Value: 1
Default Int Value: 1
Min Value: 0
Max Value: 1
String Value:
Default String Value:
Valid Characters:
Description: Attempt to resolve swap type during VMotion initialization
--
Path: /SvMotion/SvMotionAvgDisksPerVM
Type: integer
Int Value: 8
Default Int Value: 8
Min Value: 4
Max Value: 1024
String Value:
Default String Value:
Valid Characters:
Description: Initial Storage vMotion Heap Size is proportional to this setting
--
Path: /XvMotion/VMFSOptimizations
Type: integer
Int Value: 1
Default Int Value: 1
Min Value: 0
Max Value: 1
String Value:
Default String Value:
Valid Characters:
Description: Enable VMFS-specific IO optimizations
My work around for this was to provision a datastore that was only on the ESXi host that I wanted to run packer against. This way DRS would never move the VM while it was building.
We want fully automated DRS to be enabled for normal cluster operations however for packer we only want to talk to one ESXi node.
I have no idea how we'd go about checking for this from within Packer, and it sounds like there's a reasonable architectural workaround. I think the best we're going to be able to do here is add a warning in the docs.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
I'm using
vmware-iso
builder to produce base images for my system usingesx5
remote type. All was fine until recently I started to get errors for exact same template which worked before.The messages in packer log were
Error getting SSH address: EOF
in place of usualError getting SSH address: No interface on the VM has an IP address ready
(see logs in the bottom of the issue).After some unsuccessful googling and after logs inspection I found out that the problem was vmotion event moving my VM away from the host on which I was running the build.
I would expect Packer to catch such events and crash/produce some clue about that.
Some more info below.
ESXCLI output during normal waiting for VM ip:
ESXCLI output after vmotion happened:
That is my host is no longer in the list.
This case is probably a good sign for producing error -- for example, as far as I understand this could happen also when you manually destroy the VM which is being processed by Packer.
And here is output logs from Packer:
I'm using Packer 0.12.3 running on Ubuntu 12.04. Relevant
builders
section of a template: